Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Library EXT Example (Live Validation)
Library EXT Example (Live Validation) [message #639] Wed, 02 November 2005 20:34 Go to next message
Eclipse UserFriend
Originally posted by: zx.us.ibm.com

How does live validation work with the example?

I enable it, and I'm assuming it should check whether the library has a
name set or not (it doesn't). No error comes up... I'm assuming when I
add a new book, an error should come up too addressing the no title issue.

Am I read live validation wrong?

Cheers,

~ Chris
Re: Library EXT Example (Live Validation) [message #654 is a reply to message #639] Thu, 03 November 2005 15:38 Go to previous messageGo to next message
Chris McGee is currently offline Chris McGeeFriend
Messages: 99
Registered: July 2009
Member
Hi Chris,

To demonstrate live validation in the example, you first enable it on
the resource right-click->Validation->Enable Live Validation. To trigger
the element should have a name constraint, you take any library, writer
or book and create a change that would make the name empty or null when
it was not empty or null. This may involve given the element a name in
the properties view and then making the name empty.

The reason that live validation is not triggered when a new book is
added is that the title feature is never changed. I did not augment this
constraint to be triggered on the adding of new books and writers
because every time a new library element is added in the EMF generated
reflective editor, the name is empty and a validation error would be
produced. This could be quite annoying. :-)

Ideally, an application using the EXT library metamodel with this
constraint would implement some semantic procedures or specialized
commands that would provide a default name to each new library, writer
and book.

I hope this helps,
Chris McGee


Chris Aniszczyk wrote:
> How does live validation work with the example?
>
> I enable it, and I'm assuming it should check whether the library has a
> name set or not (it doesn't). No error comes up... I'm assuming when I
> add a new book, an error should come up too addressing the no title issue.
>
> Am I read live validation wrong?
>
> Cheers,
>
> ~ Chris
Re: Library EXT Example (Live Validation) [message #32018 is a reply to message #654] Wed, 19 April 2006 09:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: binhduong.cybersoft-vn.com

Hi Chris,

I have tried to enable the Live validation function and I got the
message "The chosen operation is not enabled.". After that the "Enable
Live Validation" menu item is disable.

I have tried the Batch validation function but I always get the
"Validation passed" message instead an error message as I expected
(Library's name must not empty).

Now I'm trying the "emft-validation-examples-1.0.0M6a.zip" package. Is
there any wrong with this example?

Cheers,
Binh

Chris McGee wrote:
> Hi Chris,
>
> To demonstrate live validation in the example, you first enable it on
> the resource right-click->Validation->Enable Live Validation. To trigger
> the element should have a name constraint, you take any library, writer
> or book and create a change that would make the name empty or null when
> it was not empty or null. This may involve given the element a name in
> the properties view and then making the name empty.
>
> The reason that live validation is not triggered when a new book is
> added is that the title feature is never changed. I did not augment this
> constraint to be triggered on the adding of new books and writers
> because every time a new library element is added in the EMF generated
> reflective editor, the name is empty and a validation error would be
> produced. This could be quite annoying. :-)
>
> Ideally, an application using the EXT library metamodel with this
> constraint would implement some semantic procedures or specialized
> commands that would provide a default name to each new library, writer
> and book.
>
> I hope this helps,
> Chris McGee
>
>
> Chris Aniszczyk wrote:
>> How does live validation work with the example?
>>
>> I enable it, and I'm assuming it should check whether the library has
>> a name set or not (it doesn't). No error comes up... I'm assuming when
>> I add a new book, an error should come up too addressing the no title
>> issue.
>>
>> Am I read live validation wrong?
>>
>> Cheers,
>>
>> ~ Chris
Re: Library EXT Example (Live Validation) [message #37797 is a reply to message #32018] Mon, 19 June 2006 01:34 Go to previous messageGo to next message
A. Jibran Shidqie is currently offline A. Jibran ShidqieFriend
Messages: 26
Registered: July 2009
Junior Member
Hi Chris,

I've got the same problem like Binh, the Enable Live Validation menu item is
disable.
I've take a look into the code, and I found this code in the
selectionChanged method of EnableLiveValidationDelegate Class.
-------
..
..
..
for (Iterator i = selectedEObjects.iterator(); i.hasNext();) {
Object o = i.next();
if (!(o instanceof Resource)) {
action.setEnabled(false);
} else if (resourceHasAdapter((Resource)o)) {
action.setEnabled(false);
}
}
-------

When the debugging process is running, I found that, the object inside the
selectedEObjects is not instanceOf Resource. Everytime the pop up menu of
the model is activated, this method will be invoked. Since the o is not
instanceof Resource, the action, the "Enable Live Validation" menu, always
disable.

Currently, I can run the batch validation of the example given, while live
validation mode can't.

Thank you

--
Jibran


"Binh DUONG" <binhduong@cybersoft-vn.com> wrote in message
news:e25031$lap$1@utils.eclipse.org...
> Hi Chris,
>
> I have tried to enable the Live validation function and I got the message
> "The chosen operation is not enabled.". After that the "Enable Live
> Validation" menu item is disable.
>
> I have tried the Batch validation function but I always get the
> "Validation passed" message instead an error message as I expected
> (Library's name must not empty).
>
> Now I'm trying the "emft-validation-examples-1.0.0M6a.zip" package. Is
> there any wrong with this example?
>
> Cheers,
> Binh
>
> Chris McGee wrote:
>> Hi Chris,
>>
>> To demonstrate live validation in the example, you first enable it on the
>> resource right-click->Validation->Enable Live Validation. To trigger the
>> element should have a name constraint, you take any library, writer or
>> book and create a change that would make the name empty or null when it
>> was not empty or null. This may involve given the element a name in the
>> properties view and then making the name empty.
>>
>> The reason that live validation is not triggered when a new book is added
>> is that the title feature is never changed. I did not augment this
>> constraint to be triggered on the adding of new books and writers because
>> every time a new library element is added in the EMF generated reflective
>> editor, the name is empty and a validation error would be produced. This
>> could be quite annoying. :-)
>>
>> Ideally, an application using the EXT library metamodel with this
>> constraint would implement some semantic procedures or specialized
>> commands that would provide a default name to each new library, writer
>> and book.
>>
>> I hope this helps,
>> Chris McGee
>>
>>
>> Chris Aniszczyk wrote:
>>> How does live validation work with the example?
>>>
>>> I enable it, and I'm assuming it should check whether the library has a
>>> name set or not (it doesn't). No error comes up... I'm assuming when I
>>> add a new book, an error should come up too addressing the no title
>>> issue.
>>>
>>> Am I read live validation wrong?
>>>
>>> Cheers,
>>>
>>> ~ Chris
Re: Library EXT Example (Live Validation) [message #37864 is a reply to message #37797] Mon, 19 June 2006 15:59 Go to previous messageGo to next message
Vishy Ramaswamy is currently offline Vishy RamaswamyFriend
Messages: 30
Registered: July 2009
Member
Hi Jibran,
The "Enable Live Validation" is currently enabled for toggling its state
only when the selection in the editor is the resource (the root of the
tree).
Select the root and then use the context menu to diable or enable live
validation.

Thanks
Vishy
"A. Jibran Shidqie" <ajibrans@yahoo.com> wrote in message
news:e74uvl$akh$1@utils.eclipse.org...
> Hi Chris,
>
> I've got the same problem like Binh, the Enable Live Validation menu item
is
> disable.
> I've take a look into the code, and I found this code in the
> selectionChanged method of EnableLiveValidationDelegate Class.
> -------
> .
> .
> .
> for (Iterator i = selectedEObjects.iterator(); i.hasNext();) {
> Object o = i.next();
> if (!(o instanceof Resource)) {
> action.setEnabled(false);
> } else if (resourceHasAdapter((Resource)o)) {
> action.setEnabled(false);
> }
> }
> -------
>
> When the debugging process is running, I found that, the object inside the
> selectedEObjects is not instanceOf Resource. Everytime the pop up menu of
> the model is activated, this method will be invoked. Since the o is not
> instanceof Resource, the action, the "Enable Live Validation" menu, always
> disable.
>
> Currently, I can run the batch validation of the example given, while live
> validation mode can't.
>
> Thank you
>
> --
> Jibran
>
>
> "Binh DUONG" <binhduong@cybersoft-vn.com> wrote in message
> news:e25031$lap$1@utils.eclipse.org...
> > Hi Chris,
> >
> > I have tried to enable the Live validation function and I got the
message
> > "The chosen operation is not enabled.". After that the "Enable Live
> > Validation" menu item is disable.
> >
> > I have tried the Batch validation function but I always get the
> > "Validation passed" message instead an error message as I expected
> > (Library's name must not empty).
> >
> > Now I'm trying the "emft-validation-examples-1.0.0M6a.zip" package. Is
> > there any wrong with this example?
> >
> > Cheers,
> > Binh
> >
> > Chris McGee wrote:
> >> Hi Chris,
> >>
> >> To demonstrate live validation in the example, you first enable it on
the
> >> resource right-click->Validation->Enable Live Validation. To trigger
the
> >> element should have a name constraint, you take any library, writer or
> >> book and create a change that would make the name empty or null when it
> >> was not empty or null. This may involve given the element a name in the
> >> properties view and then making the name empty.
> >>
> >> The reason that live validation is not triggered when a new book is
added
> >> is that the title feature is never changed. I did not augment this
> >> constraint to be triggered on the adding of new books and writers
because
> >> every time a new library element is added in the EMF generated
reflective
> >> editor, the name is empty and a validation error would be produced.
This
> >> could be quite annoying. :-)
> >>
> >> Ideally, an application using the EXT library metamodel with this
> >> constraint would implement some semantic procedures or specialized
> >> commands that would provide a default name to each new library, writer
> >> and book.
> >>
> >> I hope this helps,
> >> Chris McGee
> >>
> >>
> >> Chris Aniszczyk wrote:
> >>> How does live validation work with the example?
> >>>
> >>> I enable it, and I'm assuming it should check whether the library has
a
> >>> name set or not (it doesn't). No error comes up... I'm assuming when I
> >>> add a new book, an error should come up too addressing the no title
> >>> issue.
> >>>
> >>> Am I read live validation wrong?
> >>>
> >>> Cheers,
> >>>
> >>> ~ Chris
>
>
Re: Library EXT Example (Live Validation) [message #38261 is a reply to message #37864] Wed, 21 June 2006 01:56 Go to previous message
A. Jibran Shidqie is currently offline A. Jibran ShidqieFriend
Messages: 26
Registered: July 2009
Junior Member
Hi Vishy,

You are correct. It's work now :)
Thank you very much.

--
Jibran


"Vishy Ramaswamy" <vramaswa@ca.ibm.com> wrote in message
news:e76hlp$pcv$1@utils.eclipse.org...
> Hi Jibran,
> The "Enable Live Validation" is currently enabled for toggling its state
> only when the selection in the editor is the resource (the root of the
> tree).
> Select the root and then use the context menu to diable or enable live
> validation.
>
> Thanks
> Vishy
> "A. Jibran Shidqie" <ajibrans@yahoo.com> wrote in message
> news:e74uvl$akh$1@utils.eclipse.org...
>> Hi Chris,
>>
>> I've got the same problem like Binh, the Enable Live Validation menu item
> is
>> disable.
>> I've take a look into the code, and I found this code in the
>> selectionChanged method of EnableLiveValidationDelegate Class.
>> -------
>> .
>> .
>> .
>> for (Iterator i = selectedEObjects.iterator(); i.hasNext();) {
>> Object o = i.next();
>> if (!(o instanceof Resource)) {
>> action.setEnabled(false);
>> } else if (resourceHasAdapter((Resource)o)) {
>> action.setEnabled(false);
>> }
>> }
>> -------
>>
>> When the debugging process is running, I found that, the object inside
>> the
>> selectedEObjects is not instanceOf Resource. Everytime the pop up menu of
>> the model is activated, this method will be invoked. Since the o is not
>> instanceof Resource, the action, the "Enable Live Validation" menu,
>> always
>> disable.
>>
>> Currently, I can run the batch validation of the example given, while
>> live
>> validation mode can't.
>>
>> Thank you
>>
>> --
>> Jibran
>>
>>
>> "Binh DUONG" <binhduong@cybersoft-vn.com> wrote in message
>> news:e25031$lap$1@utils.eclipse.org...
>> > Hi Chris,
>> >
>> > I have tried to enable the Live validation function and I got the
> message
>> > "The chosen operation is not enabled.". After that the "Enable Live
>> > Validation" menu item is disable.
>> >
>> > I have tried the Batch validation function but I always get the
>> > "Validation passed" message instead an error message as I expected
>> > (Library's name must not empty).
>> >
>> > Now I'm trying the "emft-validation-examples-1.0.0M6a.zip" package. Is
>> > there any wrong with this example?
>> >
>> > Cheers,
>> > Binh
>> >
>> > Chris McGee wrote:
>> >> Hi Chris,
>> >>
>> >> To demonstrate live validation in the example, you first enable it on
> the
>> >> resource right-click->Validation->Enable Live Validation. To trigger
> the
>> >> element should have a name constraint, you take any library, writer or
>> >> book and create a change that would make the name empty or null when
>> >> it
>> >> was not empty or null. This may involve given the element a name in
>> >> the
>> >> properties view and then making the name empty.
>> >>
>> >> The reason that live validation is not triggered when a new book is
> added
>> >> is that the title feature is never changed. I did not augment this
>> >> constraint to be triggered on the adding of new books and writers
> because
>> >> every time a new library element is added in the EMF generated
> reflective
>> >> editor, the name is empty and a validation error would be produced.
> This
>> >> could be quite annoying. :-)
>> >>
>> >> Ideally, an application using the EXT library metamodel with this
>> >> constraint would implement some semantic procedures or specialized
>> >> commands that would provide a default name to each new library, writer
>> >> and book.
>> >>
>> >> I hope this helps,
>> >> Chris McGee
>> >>
>> >>
>> >> Chris Aniszczyk wrote:
>> >>> How does live validation work with the example?
>> >>>
>> >>> I enable it, and I'm assuming it should check whether the library has
> a
>> >>> name set or not (it doesn't). No error comes up... I'm assuming when
>> >>> I
>> >>> add a new book, an error should come up too addressing the no title
>> >>> issue.
>> >>>
>> >>> Am I read live validation wrong?
>> >>>
>> >>> Cheers,
>> >>>
>> >>> ~ Chris
>>
>>
>
>
Re: Library EXT Example (Live Validation) [message #561046 is a reply to message #639] Thu, 03 November 2005 15:38 Go to previous message
Chris McGee is currently offline Chris McGeeFriend
Messages: 99
Registered: July 2009
Member
Hi Chris,

To demonstrate live validation in the example, you first enable it on
the resource right-click->Validation->Enable Live Validation. To trigger
the element should have a name constraint, you take any library, writer
or book and create a change that would make the name empty or null when
it was not empty or null. This may involve given the element a name in
the properties view and then making the name empty.

The reason that live validation is not triggered when a new book is
added is that the title feature is never changed. I did not augment this
constraint to be triggered on the adding of new books and writers
because every time a new library element is added in the EMF generated
reflective editor, the name is empty and a validation error would be
produced. This could be quite annoying. :-)

Ideally, an application using the EXT library metamodel with this
constraint would implement some semantic procedures or specialized
commands that would provide a default name to each new library, writer
and book.

I hope this helps,
Chris McGee


Chris Aniszczyk wrote:
> How does live validation work with the example?
>
> I enable it, and I'm assuming it should check whether the library has a
> name set or not (it doesn't). No error comes up... I'm assuming when I
> add a new book, an error should come up too addressing the no title issue.
>
> Am I read live validation wrong?
>
> Cheers,
>
> ~ Chris
Re: Library EXT Example (Live Validation) [message #575456 is a reply to message #654] Wed, 19 April 2006 09:31 Go to previous message
Eclipse UserFriend
Originally posted by: binhduong.cybersoft-vn.com

Hi Chris,

I have tried to enable the Live validation function and I got the
message "The chosen operation is not enabled.". After that the "Enable
Live Validation" menu item is disable.

I have tried the Batch validation function but I always get the
"Validation passed" message instead an error message as I expected
(Library's name must not empty).

Now I'm trying the "emft-validation-examples-1.0.0M6a.zip" package. Is
there any wrong with this example?

Cheers,
Binh

Chris McGee wrote:
> Hi Chris,
>
> To demonstrate live validation in the example, you first enable it on
> the resource right-click->Validation->Enable Live Validation. To trigger
> the element should have a name constraint, you take any library, writer
> or book and create a change that would make the name empty or null when
> it was not empty or null. This may involve given the element a name in
> the properties view and then making the name empty.
>
> The reason that live validation is not triggered when a new book is
> added is that the title feature is never changed. I did not augment this
> constraint to be triggered on the adding of new books and writers
> because every time a new library element is added in the EMF generated
> reflective editor, the name is empty and a validation error would be
> produced. This could be quite annoying. :-)
>
> Ideally, an application using the EXT library metamodel with this
> constraint would implement some semantic procedures or specialized
> commands that would provide a default name to each new library, writer
> and book.
>
> I hope this helps,
> Chris McGee
>
>
> Chris Aniszczyk wrote:
>> How does live validation work with the example?
>>
>> I enable it, and I'm assuming it should check whether the library has
>> a name set or not (it doesn't). No error comes up... I'm assuming when
>> I add a new book, an error should come up too addressing the no title
>> issue.
>>
>> Am I read live validation wrong?
>>
>> Cheers,
>>
>> ~ Chris
Re: Library EXT Example (Live Validation) [message #580948 is a reply to message #32018] Mon, 19 June 2006 01:34 Go to previous message
A. Jibran Shidqie is currently offline A. Jibran ShidqieFriend
Messages: 26
Registered: July 2009
Junior Member
Hi Chris,

I've got the same problem like Binh, the Enable Live Validation menu item is
disable.
I've take a look into the code, and I found this code in the
selectionChanged method of EnableLiveValidationDelegate Class.
-------
..
..
..
for (Iterator i = selectedEObjects.iterator(); i.hasNext();) {
Object o = i.next();
if (!(o instanceof Resource)) {
action.setEnabled(false);
} else if (resourceHasAdapter((Resource)o)) {
action.setEnabled(false);
}
}
-------

When the debugging process is running, I found that, the object inside the
selectedEObjects is not instanceOf Resource. Everytime the pop up menu of
the model is activated, this method will be invoked. Since the o is not
instanceof Resource, the action, the "Enable Live Validation" menu, always
disable.

Currently, I can run the batch validation of the example given, while live
validation mode can't.

Thank you

--
Jibran


"Binh DUONG" <binhduong@cybersoft-vn.com> wrote in message
news:e25031$lap$1@utils.eclipse.org...
> Hi Chris,
>
> I have tried to enable the Live validation function and I got the message
> "The chosen operation is not enabled.". After that the "Enable Live
> Validation" menu item is disable.
>
> I have tried the Batch validation function but I always get the
> "Validation passed" message instead an error message as I expected
> (Library's name must not empty).
>
> Now I'm trying the "emft-validation-examples-1.0.0M6a.zip" package. Is
> there any wrong with this example?
>
> Cheers,
> Binh
>
> Chris McGee wrote:
>> Hi Chris,
>>
>> To demonstrate live validation in the example, you first enable it on the
>> resource right-click->Validation->Enable Live Validation. To trigger the
>> element should have a name constraint, you take any library, writer or
>> book and create a change that would make the name empty or null when it
>> was not empty or null. This may involve given the element a name in the
>> properties view and then making the name empty.
>>
>> The reason that live validation is not triggered when a new book is added
>> is that the title feature is never changed. I did not augment this
>> constraint to be triggered on the adding of new books and writers because
>> every time a new library element is added in the EMF generated reflective
>> editor, the name is empty and a validation error would be produced. This
>> could be quite annoying. :-)
>>
>> Ideally, an application using the EXT library metamodel with this
>> constraint would implement some semantic procedures or specialized
>> commands that would provide a default name to each new library, writer
>> and book.
>>
>> I hope this helps,
>> Chris McGee
>>
>>
>> Chris Aniszczyk wrote:
>>> How does live validation work with the example?
>>>
>>> I enable it, and I'm assuming it should check whether the library has a
>>> name set or not (it doesn't). No error comes up... I'm assuming when I
>>> add a new book, an error should come up too addressing the no title
>>> issue.
>>>
>>> Am I read live validation wrong?
>>>
>>> Cheers,
>>>
>>> ~ Chris
Re: Library EXT Example (Live Validation) [message #581000 is a reply to message #37797] Mon, 19 June 2006 15:59 Go to previous message
Vishy Ramaswamy is currently offline Vishy RamaswamyFriend
Messages: 30
Registered: July 2009
Member
Hi Jibran,
The "Enable Live Validation" is currently enabled for toggling its state
only when the selection in the editor is the resource (the root of the
tree).
Select the root and then use the context menu to diable or enable live
validation.

Thanks
Vishy
"A. Jibran Shidqie" <ajibrans@yahoo.com> wrote in message
news:e74uvl$akh$1@utils.eclipse.org...
> Hi Chris,
>
> I've got the same problem like Binh, the Enable Live Validation menu item
is
> disable.
> I've take a look into the code, and I found this code in the
> selectionChanged method of EnableLiveValidationDelegate Class.
> -------
> .
> .
> .
> for (Iterator i = selectedEObjects.iterator(); i.hasNext();) {
> Object o = i.next();
> if (!(o instanceof Resource)) {
> action.setEnabled(false);
> } else if (resourceHasAdapter((Resource)o)) {
> action.setEnabled(false);
> }
> }
> -------
>
> When the debugging process is running, I found that, the object inside the
> selectedEObjects is not instanceOf Resource. Everytime the pop up menu of
> the model is activated, this method will be invoked. Since the o is not
> instanceof Resource, the action, the "Enable Live Validation" menu, always
> disable.
>
> Currently, I can run the batch validation of the example given, while live
> validation mode can't.
>
> Thank you
>
> --
> Jibran
>
>
> "Binh DUONG" <binhduong@cybersoft-vn.com> wrote in message
> news:e25031$lap$1@utils.eclipse.org...
> > Hi Chris,
> >
> > I have tried to enable the Live validation function and I got the
message
> > "The chosen operation is not enabled.". After that the "Enable Live
> > Validation" menu item is disable.
> >
> > I have tried the Batch validation function but I always get the
> > "Validation passed" message instead an error message as I expected
> > (Library's name must not empty).
> >
> > Now I'm trying the "emft-validation-examples-1.0.0M6a.zip" package. Is
> > there any wrong with this example?
> >
> > Cheers,
> > Binh
> >
> > Chris McGee wrote:
> >> Hi Chris,
> >>
> >> To demonstrate live validation in the example, you first enable it on
the
> >> resource right-click->Validation->Enable Live Validation. To trigger
the
> >> element should have a name constraint, you take any library, writer or
> >> book and create a change that would make the name empty or null when it
> >> was not empty or null. This may involve given the element a name in the
> >> properties view and then making the name empty.
> >>
> >> The reason that live validation is not triggered when a new book is
added
> >> is that the title feature is never changed. I did not augment this
> >> constraint to be triggered on the adding of new books and writers
because
> >> every time a new library element is added in the EMF generated
reflective
> >> editor, the name is empty and a validation error would be produced.
This
> >> could be quite annoying. :-)
> >>
> >> Ideally, an application using the EXT library metamodel with this
> >> constraint would implement some semantic procedures or specialized
> >> commands that would provide a default name to each new library, writer
> >> and book.
> >>
> >> I hope this helps,
> >> Chris McGee
> >>
> >>
> >> Chris Aniszczyk wrote:
> >>> How does live validation work with the example?
> >>>
> >>> I enable it, and I'm assuming it should check whether the library has
a
> >>> name set or not (it doesn't). No error comes up... I'm assuming when I
> >>> add a new book, an error should come up too addressing the no title
> >>> issue.
> >>>
> >>> Am I read live validation wrong?
> >>>
> >>> Cheers,
> >>>
> >>> ~ Chris
>
>
Re: Library EXT Example (Live Validation) [message #581313 is a reply to message #37864] Wed, 21 June 2006 01:56 Go to previous message
A. Jibran Shidqie is currently offline A. Jibran ShidqieFriend
Messages: 26
Registered: July 2009
Junior Member
Hi Vishy,

You are correct. It's work now :)
Thank you very much.

--
Jibran


"Vishy Ramaswamy" <vramaswa@ca.ibm.com> wrote in message
news:e76hlp$pcv$1@utils.eclipse.org...
> Hi Jibran,
> The "Enable Live Validation" is currently enabled for toggling its state
> only when the selection in the editor is the resource (the root of the
> tree).
> Select the root and then use the context menu to diable or enable live
> validation.
>
> Thanks
> Vishy
> "A. Jibran Shidqie" <ajibrans@yahoo.com> wrote in message
> news:e74uvl$akh$1@utils.eclipse.org...
>> Hi Chris,
>>
>> I've got the same problem like Binh, the Enable Live Validation menu item
> is
>> disable.
>> I've take a look into the code, and I found this code in the
>> selectionChanged method of EnableLiveValidationDelegate Class.
>> -------
>> .
>> .
>> .
>> for (Iterator i = selectedEObjects.iterator(); i.hasNext();) {
>> Object o = i.next();
>> if (!(o instanceof Resource)) {
>> action.setEnabled(false);
>> } else if (resourceHasAdapter((Resource)o)) {
>> action.setEnabled(false);
>> }
>> }
>> -------
>>
>> When the debugging process is running, I found that, the object inside
>> the
>> selectedEObjects is not instanceOf Resource. Everytime the pop up menu of
>> the model is activated, this method will be invoked. Since the o is not
>> instanceof Resource, the action, the "Enable Live Validation" menu,
>> always
>> disable.
>>
>> Currently, I can run the batch validation of the example given, while
>> live
>> validation mode can't.
>>
>> Thank you
>>
>> --
>> Jibran
>>
>>
>> "Binh DUONG" <binhduong@cybersoft-vn.com> wrote in message
>> news:e25031$lap$1@utils.eclipse.org...
>> > Hi Chris,
>> >
>> > I have tried to enable the Live validation function and I got the
> message
>> > "The chosen operation is not enabled.". After that the "Enable Live
>> > Validation" menu item is disable.
>> >
>> > I have tried the Batch validation function but I always get the
>> > "Validation passed" message instead an error message as I expected
>> > (Library's name must not empty).
>> >
>> > Now I'm trying the "emft-validation-examples-1.0.0M6a.zip" package. Is
>> > there any wrong with this example?
>> >
>> > Cheers,
>> > Binh
>> >
>> > Chris McGee wrote:
>> >> Hi Chris,
>> >>
>> >> To demonstrate live validation in the example, you first enable it on
> the
>> >> resource right-click->Validation->Enable Live Validation. To trigger
> the
>> >> element should have a name constraint, you take any library, writer or
>> >> book and create a change that would make the name empty or null when
>> >> it
>> >> was not empty or null. This may involve given the element a name in
>> >> the
>> >> properties view and then making the name empty.
>> >>
>> >> The reason that live validation is not triggered when a new book is
> added
>> >> is that the title feature is never changed. I did not augment this
>> >> constraint to be triggered on the adding of new books and writers
> because
>> >> every time a new library element is added in the EMF generated
> reflective
>> >> editor, the name is empty and a validation error would be produced.
> This
>> >> could be quite annoying. :-)
>> >>
>> >> Ideally, an application using the EXT library metamodel with this
>> >> constraint would implement some semantic procedures or specialized
>> >> commands that would provide a default name to each new library, writer
>> >> and book.
>> >>
>> >> I hope this helps,
>> >> Chris McGee
>> >>
>> >>
>> >> Chris Aniszczyk wrote:
>> >>> How does live validation work with the example?
>> >>>
>> >>> I enable it, and I'm assuming it should check whether the library has
> a
>> >>> name set or not (it doesn't). No error comes up... I'm assuming when
>> >>> I
>> >>> add a new book, an error should come up too addressing the no title
>> >>> issue.
>> >>>
>> >>> Am I read live validation wrong?
>> >>>
>> >>> Cheers,
>> >>>
>> >>> ~ Chris
>>
>>
>
>
Previous Topic:ocl and database(future plans)
Next Topic:CDO
Goto Forum:
  


Current Time: Sat Jul 13 17:06:19 GMT 2024

Powered by FUDForum. Page generated in 0.05930 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top