| Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Library EXT Example (Live Validation)
 Goto Forum:| 
| Library EXT Example (Live Validation) [message #639] | Wed, 02 November 2005 15:34  |  | 
| Eclipse User  |  |  |  |  | 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 10:38   |  | 
| Eclipse User  |  |  |  |  | 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 05:31   |  | 
| Eclipse User  |  |  |  |  | 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] | Sun, 18 June 2006 21:34   |  | 
| Eclipse User  |  |  |  |  | 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 11:59   |  | 
| Eclipse User  |  |  |  |  | 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] | Tue, 20 June 2006 21:56  |  | 
| Eclipse User  |  |  |  |  | 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 10:38  |  | 
| Eclipse User  |  |  |  |  | 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 05:31  |  | 
| Eclipse User  |  |  |  |  | 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] | Sun, 18 June 2006 21:34  |  | 
| Eclipse User  |  |  |  |  | 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 11:59  |  | 
| Eclipse User  |  |  |  |  | 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] | Tue, 20 June 2006 21:56  |  | 
| Eclipse User  |  |  |  |  | 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
 >>
 >>
 >
 >
 |  |  |  | 
 
 
 Current Time: Fri Oct 31 04:29:22 EDT 2025 
 Powered by FUDForum . Page generated in 0.06414 seconds |