Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Question about EMF Validation Example
Question about EMF Validation Example [message #428441] Fri, 20 March 2009 20:55 Go to next message
wws_ques wws_ques is currently offline wws_ques wws_quesFriend
Messages: 64
Registered: July 2009
Member
I tried to run the EMF general validation example. After I do
File -> New -> Examples -> EMF Validation Framework Plug-ins ->
General Validation Example, there are four project
validation.example.general,
three emf.example.library related projects. Why there are these
four projects created? When right-clicking on validation.example.general
project,
I choose run as -> Eclipse Application and a second eclipse windows pops
up. Then
I get lost about how to create an application model to check constraints
given
in the validation.example.general project? If I want to change some
constraints
given in the validation.example.general project, what should I recompile
and run it? Thanks.
W.
Re: Question about EMF Validation Example [message #428446 is a reply to message #428441] Fri, 20 March 2009 23:17 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
W,

I hope Christian answers, but he's soon to be AWOL...


Wuwei wrote:
> I tried to run the EMF general validation example. After I do
> File -> New -> Examples -> EMF Validation Framework Plug-ins ->
> General Validation Example, there are four project
> validation.example.general,
> three emf.example.library related projects. Why there are these
> four projects created? When right-clicking on
> validation.example.general project,
> I choose run as -> Eclipse Application and a second eclipse windows
> pops up. Then
> I get lost about how to create an application model to check
> constraints given
> in the validation.example.general project? If I want to change some
> constraints
> given in the validation.example.general project, what should I
> recompile and run it? Thanks.
> W.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Question about EMF Validation Example [message #428448 is a reply to message #428446] Sat, 21 March 2009 12:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: give.a.damus.gmail.com

Hi, Ed,

I can't be AWOL as there is no protocol that requires leave. :-P

Besides, I can still participate in the newsgroups whenever I feel like
spending a little time ... and I plan to. I should still be able to
help until either my memory of the code fades or the code drifts away
from what I remember of it.

cW

Ed Merks wrote:
> W,
>
> I hope Christian answers, but he's soon to be AWOL...
>
>
> Wuwei wrote:
>> I tried to run the EMF general validation example. After I do
>> File -> New -> Examples -> EMF Validation Framework Plug-ins ->
>> General Validation Example, there are four project
>> validation.example.general,
>> three emf.example.library related projects. Why there are these
>> four projects created? When right-clicking on
>> validation.example.general project,
>> I choose run as -> Eclipse Application and a second eclipse windows
>> pops up. Then
>> I get lost about how to create an application model to check
>> constraints given
>> in the validation.example.general project? If I want to change some
>> constraints
>> given in the validation.example.general project, what should I
>> recompile and run it? Thanks.
>> W.
>>
Re: Question about EMF Validation Example [message #428449 is a reply to message #428441] Sat, 21 March 2009 12:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: give.a.damus.gmail.com

Hi, W.,

There is a brief introduction to the examples in the on-line help (if
you have the EMF Validation SDK installed, and not just the examples).
Look for the Examples Guide under the EMF Validation Framework Developer
Guide.

One point that the help doesn't mention is that it's a good idea to
install all three examples, especially as the OCL example contributes
some constraints that make it more interesting.

HTH,

Christian


Wuwei wrote:
> I tried to run the EMF general validation example. After I do
> File -> New -> Examples -> EMF Validation Framework Plug-ins ->
> General Validation Example, there are four project
> validation.example.general,
> three emf.example.library related projects. Why there are these
> four projects created? When right-clicking on validation.example.general
> project,
> I choose run as -> Eclipse Application and a second eclipse windows pops
> up. Then
> I get lost about how to create an application model to check constraints
> given
> in the validation.example.general project? If I want to change some
> constraints
> given in the validation.example.general project, what should I recompile
> and run it? Thanks.
> W.
>
Re: Question about EMF Validation Example [message #428452 is a reply to message #428449] Sat, 21 March 2009 14:22 Go to previous messageGo to next message
wws_ques wws_ques is currently offline wws_ques wws_quesFriend
Messages: 64
Registered: July 2009
Member
Thanks, Christian. I did install the Validation SDK and see the on-line
help from Eclipse.But, I dont understand how to run it. Here is the
Validation Example:

> References
> Please refer to the document EMF Validation Framework Examples Overview for
> reviewing the library meta-model used as the basis for demonstrating the >
capabilities in this example.

Are the EMF Validation Framework Examples are given in the three
org.eclipse.emf.examples.library related projects?

> Description
> This example plug-in is named org.eclipse.emf.validation.examples. This
> plug-in contributes the Validation menu to the library editor's main menu
> and context menu. The menu has two items:

> Enable Live Validation: This actions registers a EContentAdapter against the
> library Resource to receive immediate notifications. Within the
> notifyChanged callback the model validation service is called to provide a
> live validation f the Notification object.
> Validate Elements: This action calls upon the model validation service to
> provide a batch validation of the selected EObjects and their children.

Should I run org.eclipse.emf.validation.examples.general by choosing run
as Eclipse Application to get the above description? How to create a
project in
the second Eclipse? I cannot see the submenu under validation menu? Thanks.
Wuwei



Christian W. Damus wrote:

> Hi, W.,

> There is a brief introduction to the examples in the on-line help (if
> you have the EMF Validation SDK installed, and not just the examples).
> Look for the Examples Guide under the EMF Validation Framework Developer
> Guide.

> One point that the help doesn't mention is that it's a good idea to
> install all three examples, especially as the OCL example contributes
> some constraints that make it more interesting.

> HTH,

> Christian


> Wuwei wrote:
>> I tried to run the EMF general validation example. After I do
>> File -> New -> Examples -> EMF Validation Framework Plug-ins ->
>> General Validation Example, there are four project
>> validation.example.general,
>> three emf.example.library related projects. Why there are these
>> four projects created? When right-clicking on validation.example.general
>> project,
>> I choose run as -> Eclipse Application and a second eclipse windows pops
>> up. Then
>> I get lost about how to create an application model to check constraints
>> given
>> in the validation.example.general project? If I want to change some
>> constraints
>> given in the validation.example.general project, what should I recompile
>> and run it? Thanks.
>> W.
>>
Re: Question about EMF Validation Example [message #428471 is a reply to message #428452] Mon, 23 March 2009 13:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: give.a.damus.gmail.com

--=-2jRE39LQrUZUbztvfYAi
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi, Wuwei,

The reason why the three EXTLibrary example plug-ins are installed with
the validation examples is simply to provide a model, that anyone can
easily understand, with which to demonstrate the validation concepts.
So, the validation example plug-ins contribute menu actions to the
EXTLibrary editor and constraints on the EClasses in the EXTLibrary
model. Have a look in the plugin.xml files to see this.

In your run-time workbench, just create a plain project and use the
"File -> New -> Other..." menu to create an EXTLibrary model instance
with a library as the root element. You will get the same kind of
editor that EMF always generates, except that the validation examples
have added a few actions.

HTH,

Christian

On Sat, 2009-03-21 at 14:22 +0000, Wuwei wrote:

> Thanks, Christian. I did install the Validation SDK and see the on-line
> help from Eclipse.But, I dont understand how to run it. Here is the
> Validation Example:
>
> > References
> > Please refer to the document EMF Validation Framework Examples Overview for
> > reviewing the library meta-model used as the basis for demonstrating the >
> capabilities in this example.
>
> Are the EMF Validation Framework Examples are given in the three
> org.eclipse.emf.examples.library related projects?
>
> > Description
> > This example plug-in is named org.eclipse.emf.validation.examples. This
> > plug-in contributes the Validation menu to the library editor's main menu
> > and context menu. The menu has two items:
>
> > Enable Live Validation: This actions registers a EContentAdapter against the
> > library Resource to receive immediate notifications. Within the
> > notifyChanged callback the model validation service is called to provide a
> > live validation f the Notification object.
> > Validate Elements: This action calls upon the model validation service to
> > provide a batch validation of the selected EObjects and their children.
>
> Should I run org.eclipse.emf.validation.examples.general by choosing run
> as Eclipse Application to get the above description? How to create a
> project in
> the second Eclipse? I cannot see the submenu under validation menu? Thanks.
> Wuwei
>
>
>
> Christian W. Damus wrote:
>
> > Hi, W.,
>
> > There is a brief introduction to the examples in the on-line help (if
> > you have the EMF Validation SDK installed, and not just the examples).
> > Look for the Examples Guide under the EMF Validation Framework Developer
> > Guide.
>
> > One point that the help doesn't mention is that it's a good idea to
> > install all three examples, especially as the OCL example contributes
> > some constraints that make it more interesting.
>
> > HTH,
>
> > Christian
>
>
> > Wuwei wrote:
> >> I tried to run the EMF general validation example. After I do
> >> File -> New -> Examples -> EMF Validation Framework Plug-ins ->
> >> General Validation Example, there are four project
> >> validation.example.general,
> >> three emf.example.library related projects. Why there are these
> >> four projects created? When right-clicking on validation.example.general
> >> project,
> >> I choose run as -> Eclipse Application and a second eclipse windows pops
> >> up. Then
> >> I get lost about how to create an application model to check constraints
> >> given
> >> in the validation.example.general project? If I want to change some
> >> constraints
> >> given in the validation.example.general project, what should I recompile
> >> and run it? Thanks.
> >> W.
> >>
>
>

--=-2jRE39LQrUZUbztvfYAi
Content-Type: text/html; charset="utf-8"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Wuwei,<BR>
<BR>
The reason why the three EXTLibrary example plug-ins are installed with the validation examples is simply to provide a model, that anyone can easily understand, with which to demonstrate the validation concepts.&nbsp; So, the validation example plug-ins contribute menu actions to the EXTLibrary editor and constraints on the EClasses in the EXTLibrary model.&nbsp; Have a look in the plugin.xml files to see this.<BR>
<BR>
In your run-time workbench, just create a plain project and use the &quot;File -&gt; New -&gt; Other...&quot; menu to create an EXTLibrary model instance with a library as the root element.&nbsp; You will get the same kind of editor that EMF always generates, except that the validation examples have added a few actions.<BR>
<BR>
HTH,<BR>
<BR>
Christian<BR>
<BR>
On Sat, 2009-03-21 at 14:22 +0000, Wuwei wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Thanks, Christian. I did install the Validation SDK and see the on-line
help from Eclipse.But, I dont understand how to run it. Here is the
Validation Example:

&gt; References
&gt; Please refer to the document EMF Validation Framework Examples Overview for
&gt; reviewing the library meta-model used as the basis for demonstrating the &gt;
capabilities in this example.

Are the EMF Validation Framework Examples are given in the three
org.eclipse.emf.examples.library related projects?

&gt; Description
&gt; This example plug-in is named org.eclipse.emf.validation.examples. This
&gt; plug-in contributes the Validation menu to the library editor's main menu
&gt; and context menu. The menu has two items:

&gt; Enable Live Validation: This actions registers a EContentAdapter against the
&gt; library Resource to receive immediate notifications. Within the
&gt; notifyChanged callback the model validation service is called to provide a
&gt; live validation f the Notification object.
&gt; Validate Elements: This action calls upon the model validation service to
&gt; provide a batch validation of the selected EObjects and their children.

Should I run org.eclipse.emf.validation.examples.general by choosing run
as Eclipse Application to get the above description? How to create a
project in
the second Eclipse? I cannot see the submenu under validation menu? Thanks.
Wuwei



Christian W. Damus wrote:

&gt; Hi, W.,

&gt; There is a brief introduction to the examples in the on-line help (if
&gt; you have the EMF Validation SDK installed, and not just the examples).
&gt; Look for the Examples Guide under the EMF Validation Framework Developer
&gt; Guide.

&gt; One point that the help doesn't mention is that it's a good idea to
&gt; install all three examples, especially as the OCL example contributes
&gt; some constraints that make it more interesting.

&gt; HTH,

&gt; Christian


&gt; Wuwei wrote:
&gt;&gt; I tried to run the EMF general validation example. After I do
&gt;&gt; File -&gt; New -&gt; Examples -&gt; EMF Validation Framework Plug-ins -&gt;
&gt;&gt; General Validation Example, there are four project
&gt;&gt; validation.example.general,
&gt;&gt; three emf.example.library related projects. Why there are these
&gt;&gt; four projects created? When right-clicking on validation.example.general
&gt;&gt; project,
&gt;&gt; I choose run as -&gt; Eclipse Application and a second eclipse windows pops
&gt;&gt; up. Then
&gt;&gt; I get lost about how to create an application model to check constraints
&gt;&gt; given
&gt;&gt; in the validation.example.general project? If I want to change some
&gt;&gt; constraints
&gt;&gt; given in the validation.example.general project, what should I recompile
&gt;&gt; and run it? Thanks.
&gt;&gt; W.
&gt;&gt;


</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-2jRE39LQrUZUbztvfYAi--
Re: Question about EMF Validation Example [message #428639 is a reply to message #428471] Wed, 25 March 2009 16:21 Go to previous messageGo to next message
wws_ques wws_ques is currently offline wws_ques wws_quesFriend
Messages: 64
Registered: July 2009
Member
Thanks, Christian. It works.I also tried the adapter and OCL examples.
They all work. But, when I go back to validation.general plug-in,
I still see "The Evalidator Adapter succesfully delegrated validation
of ...", which I think did appear before running the adapter example.
Also, I dont give the name for the library when running validation.general
plug-in. But, I did not get the error msg. Does that mean I need to
remove the adapter plug-in example? Thanks.
Wuwei




Christian W. Damus wrote:

> Hi, Wuwei,

> The reason why the three EXTLibrary example plug-ins are installed with
> the validation examples is simply to provide a model, that anyone can
> easily understand, with which to demonstrate the validation concepts.
> So, the validation example plug-ins contribute menu actions to the
> EXTLibrary editor and constraints on the EClasses in the EXTLibrary
> model. Have a look in the plugin.xml files to see this.

> In your run-time workbench, just create a plain project and use the
> "File -> New -> Other..." menu to create an EXTLibrary model instance
> with a library as the root element. You will get the same kind of
> editor that EMF always generates, except that the validation examples
> have added a few actions.

> HTH,

> Christian

> On Sat, 2009-03-21 at 14:22 +0000, Wuwei wrote:

>> Thanks, Christian. I did install the Validation SDK and see the on-line
>> help from Eclipse.But, I dont understand how to run it. Here is the
>> Validation Example:
>>
>> > References
>> > Please refer to the document EMF Validation Framework Examples Overview
for
>> > reviewing the library meta-model used as the basis for demonstrating the
>
>> capabilities in this example.
>>
>> Are the EMF Validation Framework Examples are given in the three
>> org.eclipse.emf.examples.library related projects?
>>
>> > Description
>> > This example plug-in is named org.eclipse.emf.validation.examples. This
>> > plug-in contributes the Validation menu to the library editor's main menu
>> > and context menu. The menu has two items:
>>
>> > Enable Live Validation: This actions registers a EContentAdapter against
the
>> > library Resource to receive immediate notifications. Within the
>> > notifyChanged callback the model validation service is called to provide
a
>> > live validation f the Notification object.
>> > Validate Elements: This action calls upon the model validation service to
>> > provide a batch validation of the selected EObjects and their children.
>>
>> Should I run org.eclipse.emf.validation.examples.general by choosing run
>> as Eclipse Application to get the above description? How to create a
>> project in
>> the second Eclipse? I cannot see the submenu under validation menu? Thanks.
>> Wuwei
>>
>>
>>
>> Christian W. Damus wrote:
>>
>> > Hi, W.,
>>
>> > There is a brief introduction to the examples in the on-line help (if
>> > you have the EMF Validation SDK installed, and not just the examples).
>> > Look for the Examples Guide under the EMF Validation Framework Developer
>> > Guide.
>>
>> > One point that the help doesn't mention is that it's a good idea to
>> > install all three examples, especially as the OCL example contributes
>> > some constraints that make it more interesting.
>>
>> > HTH,
>>
>> > Christian
>>
>>
>> > Wuwei wrote:
>> >> I tried to run the EMF general validation example. After I do
>> >> File -> New -> Examples -> EMF Validation Framework Plug-ins ->
>> >> General Validation Example, there are four project
>> >> validation.example.general,
>> >> three emf.example.library related projects. Why there are these
>> >> four projects created? When right-clicking on validation.example.general
>> >> project,
>> >> I choose run as -> Eclipse Application and a second eclipse windows pops
>> >> up. Then
>> >> I get lost about how to create an application model to check constraints
>> >> given
>> >> in the validation.example.general project? If I want to change some
>> >> constraints
>> >> given in the validation.example.general project, what should I recompile
>> >> and run it? Thanks.
>> >> W.
>> >>
>>
>>
Re: Question about EMF Validation Example [message #428671 is a reply to message #428639] Thu, 26 March 2009 12:19 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

--=-1VUi/hMErMF8QAQ30bQw
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi, Wuwei,

Right, the adapter example adds a "hack" (I think it's an early startup
extension, but I don't have the code with me to verify it) that replaces
the default EValidator for the EXTLibrary in the registry, by one that
delegates to the ModelValidationService.

Again, I don't have the code, but I think the library-name constraint is
a "live" constraint, so it will only trip if you select the "Enable Live
Validation" action in the context menu of the Resource or if you run
batch validation. It's also possible that the constraint is defined in
the OCL example plug-in ... the three really need to be used together,
and should probably be combined (there is a bug on that).

Cheers,

Christian

On Wed, 2009-03-25 at 16:21 +0000, Wuwei wrote:

> Thanks, Christian. It works.I also tried the adapter and OCL examples.
> They all work. But, when I go back to validation.general plug-in,
> I still see "The Evalidator Adapter succesfully delegrated validation
> of ...", which I think did appear before running the adapter example.
> Also, I dont give the name for the library when running validation.general
> plug-in. But, I did not get the error msg. Does that mean I need to
> remove the adapter plug-in example? Thanks.
> Wuwei
>
>
>
>
> Christian W. Damus wrote:
>
> > Hi, Wuwei,
>
> > The reason why the three EXTLibrary example plug-ins are installed with
> > the validation examples is simply to provide a model, that anyone can
> > easily understand, with which to demonstrate the validation concepts.
> > So, the validation example plug-ins contribute menu actions to the
> > EXTLibrary editor and constraints on the EClasses in the EXTLibrary
> > model. Have a look in the plugin.xml files to see this.
>
> > In your run-time workbench, just create a plain project and use the
> > "File -> New -> Other..." menu to create an EXTLibrary model instance
> > with a library as the root element. You will get the same kind of
> > editor that EMF always generates, except that the validation examples
> > have added a few actions.
>
> > HTH,
>
> > Christian
>
> > On Sat, 2009-03-21 at 14:22 +0000, Wuwei wrote:
>
> >> Thanks, Christian. I did install the Validation SDK and see the on-line
> >> help from Eclipse.But, I dont understand how to run it. Here is the
> >> Validation Example:
> >>
> >> > References
> >> > Please refer to the document EMF Validation Framework Examples Overview
> for
> >> > reviewing the library meta-model used as the basis for demonstrating the
> >
> >> capabilities in this example.
> >>
> >> Are the EMF Validation Framework Examples are given in the three
> >> org.eclipse.emf.examples.library related projects?
> >>
> >> > Description
> >> > This example plug-in is named org.eclipse.emf.validation.examples. This
> >> > plug-in contributes the Validation menu to the library editor's main menu
> >> > and context menu. The menu has two items:
> >>
> >> > Enable Live Validation: This actions registers a EContentAdapter against
> the
> >> > library Resource to receive immediate notifications. Within the
> >> > notifyChanged callback the model validation service is called to provide
> a
> >> > live validation f the Notification object.
> >> > Validate Elements: This action calls upon the model validation service to
> >> > provide a batch validation of the selected EObjects and their children.
> >>
> >> Should I run org.eclipse.emf.validation.examples.general by choosing run
> >> as Eclipse Application to get the above description? How to create a
> >> project in
> >> the second Eclipse? I cannot see the submenu under validation menu? Thanks.
> >> Wuwei
> >>
> >>
> >>
> >> Christian W. Damus wrote:
> >>
> >> > Hi, W.,
> >>
> >> > There is a brief introduction to the examples in the on-line help (if
> >> > you have the EMF Validation SDK installed, and not just the examples).
> >> > Look for the Examples Guide under the EMF Validation Framework Developer
> >> > Guide.
> >>
> >> > One point that the help doesn't mention is that it's a good idea to
> >> > install all three examples, especially as the OCL example contributes
> >> > some constraints that make it more interesting.
> >>
> >> > HTH,
> >>
> >> > Christian
> >>
> >>
> >> > Wuwei wrote:
> >> >> I tried to run the EMF general validation example. After I do
> >> >> File -> New -> Examples -> EMF Validation Framework Plug-ins ->
> >> >> General Validation Example, there are four project
> >> >> validation.example.general,
> >> >> three emf.example.library related projects. Why there are these
> >> >> four projects created? When right-clicking on validation.example.general
> >> >> project,
> >> >> I choose run as -> Eclipse Application and a second eclipse windows pops
> >> >> up. Then
> >> >> I get lost about how to create an application model to check constraints
> >> >> given
> >> >> in the validation.example.general project? If I want to change some
> >> >> constraints
> >> >> given in the validation.example.general project, what should I recompile
> >> >> and run it? Thanks.
> >> >> W.
> >> >>
> >>
> >>
>
>

--=-1VUi/hMErMF8QAQ30bQw
Content-Type: text/html; charset="utf-8"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Wuwei,<BR>
<BR>
Right, the adapter example adds a &quot;hack&quot; (I think it's an early startup extension, but I don't have the code with me to verify it) that replaces the default EValidator for the EXTLibrary in the registry, by one that delegates to the ModelValidationService.<BR>
<BR>
Again, I don't have the code, but I think the library-name constraint is a &quot;live&quot; constraint, so it will only trip if you select the &quot;Enable Live Validation&quot; action in the context menu of the Resource or if you run batch validation.&nbsp; It's also possible that the constraint is defined in the OCL example plug-in ... the three really need to be used together, and should probably be combined (there is a bug on that).<BR>
<BR>
Cheers,<BR>
<BR>
Christian<BR>
<BR>
On Wed, 2009-03-25 at 16:21 +0000, Wuwei wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Thanks, Christian. It works.I also tried the adapter and OCL examples.
They all work. But, when I go back to validation.general plug-in,
I still see &quot;The Evalidator Adapter succesfully delegrated validation
of ...&quot;, which I think did appear before running the adapter example.
Also, I dont give the name for the library when running validation.general
plug-in. But, I did not get the error msg. Does that mean I need to
remove the adapter plug-in example? Thanks.
Wuwei




Christian W. Damus wrote:

&gt; Hi, Wuwei,

&gt; The reason why the three EXTLibrary example plug-ins are installed with
&gt; the validation examples is simply to provide a model, that anyone can
&gt; easily understand, with which to demonstrate the validation concepts.
&gt; So, the validation example plug-ins contribute menu actions to the
&gt; EXTLibrary editor and constraints on the EClasses in the EXTLibrary
&gt; model. Have a look in the plugin.xml files to see this.

&gt; In your run-time workbench, just create a plain project and use the
&gt; &quot;File -&gt; New -&gt; Other...&quot; menu to create an EXTLibrary model instance
&gt; with a library as the root element. You will get the same kind of
&gt; editor that EMF always generates, except that the validation examples
&gt; have added a few actions.

&gt; HTH,

&gt; Christian

&gt; On Sat, 2009-03-21 at 14:22 +0000, Wuwei wrote:

&gt;&gt; Thanks, Christian. I did install the Validation SDK and see the on-line
&gt;&gt; help from Eclipse.But, I dont understand how to run it. Here is the
&gt;&gt; Validation Example:
&gt;&gt;
&gt;&gt; &gt; References
&gt;&gt; &gt; Please refer to the document EMF Validation Framework Examples Overview
for
&gt;&gt; &gt; reviewing the library meta-model used as the basis for demonstrating the
&gt;
&gt;&gt; capabilities in this example.
&gt;&gt;
&gt;&gt; Are the EMF Validation Framework Examples are given in the three
&gt;&gt; org.eclipse.emf.examples.library related projects?
&gt;&gt;
&gt;&gt; &gt; Description
&gt;&gt; &gt; This example plug-in is named org.eclipse.emf.validation.examples. This
&gt;&gt; &gt; plug-in contributes the Validation menu to the library editor's main menu
&gt;&gt; &gt; and context menu. The menu has two items:
&gt;&gt;
&gt;&gt; &gt; Enable Live Validation: This actions registers a EContentAdapter against
the
&gt;&gt; &gt; library Resource to receive immediate notifications. Within the
&gt;&gt; &gt; notifyChanged callback the model validation service is called to provide
a
&gt;&gt; &gt; live validation f the Notification object.
&gt;&gt; &gt; Validate Elements: This action calls upon the model validation service to
&gt;&gt; &gt; provide a batch validation of the selected EObjects and their children.
&gt;&gt;
&gt;&gt; Should I run org.eclipse.emf.validation.examples.general by choosing run
&gt;&gt; as Eclipse Application to get the above description? How to create a
&gt;&gt; project in
&gt;&gt; the second Eclipse? I cannot see the submenu under validation menu? Thanks.
&gt;&gt; Wuwei
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; Christian W. Damus wrote:
&gt;&gt;
&gt;&gt; &gt; Hi, W.,
&gt;&gt;
&gt;&gt; &gt; There is a brief introduction to the examples in the on-line help (if
&gt;&gt; &gt; you have the EMF Validation SDK installed, and not just the examples).
&gt;&gt; &gt; Look for the Examples Guide under the EMF Validation Framework Developer
&gt;&gt; &gt; Guide.
&gt;&gt;
&gt;&gt; &gt; One point that the help doesn't mention is that it's a good idea to
&gt;&gt; &gt; install all three examples, especially as the OCL example contributes
&gt;&gt; &gt; some constraints that make it more interesting.
&gt;&gt;
&gt;&gt; &gt; HTH,
&gt;&gt;
&gt;&gt; &gt; Christian
&gt;&gt;
&gt;&gt;
&gt;&gt; &gt; Wuwei wrote:
&gt;&gt; &gt;&gt; I tried to run the EMF general validation example. After I do
&gt;&gt; &gt;&gt; File -&gt; New -&gt; Examples -&gt; EMF Validation Framework Plug-ins -&gt;
&gt;&gt; &gt;&gt; General Validation Example, there are four project
&gt;&gt; &gt;&gt; validation.example.general,
&gt;&gt; &gt;&gt; three emf.example.library related projects. Why there are these
&gt;&gt; &gt;&gt; four projects created? When right-clicking on validation.example.general
&gt;&gt; &gt;&gt; project,
&gt;&gt; &gt;&gt; I choose run as -&gt; Eclipse Application and a second eclipse windows pops
&gt;&gt; &gt;&gt; up. Then
&gt;&gt; &gt;&gt; I get lost about how to create an application model to check constraints
&gt;&gt; &gt;&gt; given
&gt;&gt; &gt;&gt; in the validation.example.general project? If I want to change some
&gt;&gt; &gt;&gt; constraints
&gt;&gt; &gt;&gt; given in the validation.example.general project, what should I recompile
&gt;&gt; &gt;&gt; and run it? Thanks.
&gt;&gt; &gt;&gt; W.
&gt;&gt; &gt;&gt;
&gt;&gt;
&gt;&gt;


</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-1VUi/hMErMF8QAQ30bQw--
Re: Question about EMF Validation Example [message #428685 is a reply to message #428671] Thu, 26 March 2009 15:24 Go to previous messageGo to next message
wws_ques wws_ques is currently offline wws_ques wws_quesFriend
Messages: 64
Registered: July 2009
Member
Thanks, Christian.
I have another question. When I enable live validation, i get a msg
box "The chosen operation is not enabled". What is wrong with my change
from batch to live mode. Thanks.
Wuwei
Re: Question about EMF Validation Example [message #428698 is a reply to message #428671] Thu, 26 March 2009 19:40 Go to previous messageGo to next message
wws_ques wws_ques is currently offline wws_ques wws_quesFriend
Messages: 64
Registered: July 2009
Member
I still get confused here. Is it possible for me to remove the adapter
plugin
bc I want to get rid of msg "The Evalidator Adapter succesfully delegrated
validation of ...". More general question is after I install a plugin, is
it possible to remove that plugin later? Thanks.
Wuwei

Christian W. Damus wrote:

> Hi, Wuwei,

> Right, the adapter example adds a "hack" (I think it's an early startup
> extension, but I don't have the code with me to verify it) that replaces
> the default EValidator for the EXTLibrary in the registry, by one that
> delegates to the ModelValidationService.

> Again, I don't have the code, but I think the library-name constraint is
> a "live" constraint, so it will only trip if you select the "Enable Live
> Validation" action in the context menu of the Resource or if you run
> batch validation. It's also possible that the constraint is defined in
> the OCL example plug-in ... the three really need to be used together,
> and should probably be combined (there is a bug on that).

> Cheers,

> Christian

> On Wed, 2009-03-25 at 16:21 +0000, Wuwei wrote:

>> Thanks, Christian. It works.I also tried the adapter and OCL examples.
>> They all work. But, when I go back to validation.general plug-in,
>> I still see "The Evalidator Adapter succesfully delegrated validation
>> of ...", which I think did appear before running the adapter example.
>> Also, I dont give the name for the library when running validation.general
>> plug-in. But, I did not get the error msg. Does that mean I need to
>> remove the adapter plug-in example? Thanks.
>> Wuwei
>>
>>
>>
>>
>> Christian W. Damus wrote:
>>
>> > Hi, Wuwei,
>>
>> > The reason why the three EXTLibrary example plug-ins are installed with
>> > the validation examples is simply to provide a model, that anyone can
>> > easily understand, with which to demonstrate the validation concepts.
>> > So, the validation example plug-ins contribute menu actions to the
>> > EXTLibrary editor and constraints on the EClasses in the EXTLibrary
>> > model. Have a look in the plugin.xml files to see this.
>>
>> > In your run-time workbench, just create a plain project and use the
>> > "File -> New -> Other..." menu to create an EXTLibrary model instance
>> > with a library as the root element. You will get the same kind of
>> > editor that EMF always generates, except that the validation examples
>> > have added a few actions.
>>
>> > HTH,
>>
>> > Christian
>>
>> > On Sat, 2009-03-21 at 14:22 +0000, Wuwei wrote:
>>
>> >> Thanks, Christian. I did install the Validation SDK and see the on-line
>> >> help from Eclipse.But, I dont understand how to run it. Here is the
>> >> Validation Example:
>> >>
>> >> > References
>> >> > Please refer to the document EMF Validation Framework Examples
Overview
>> for
>> >> > reviewing the library meta-model used as the basis for demonstrating
the
>> >
>> >> capabilities in this example.
>> >>
>> >> Are the EMF Validation Framework Examples are given in the three
>> >> org.eclipse.emf.examples.library related projects?
>> >>
>> >> > Description
>> >> > This example plug-in is named org.eclipse.emf.validation.examples.
This
>> >> > plug-in contributes the Validation menu to the library editor's main
menu
>> >> > and context menu. The menu has two items:
>> >>
>> >> > Enable Live Validation: This actions registers a EContentAdapter
against
>> the
>> >> > library Resource to receive immediate notifications. Within the
>> >> > notifyChanged callback the model validation service is called to
provide
>> a
>> >> > live validation f the Notification object.
>> >> > Validate Elements: This action calls upon the model validation service
to
>> >> > provide a batch validation of the selected EObjects and their
children.
>> >>
>> >> Should I run org.eclipse.emf.validation.examples.general by choosing run
>> >> as Eclipse Application to get the above description? How to create a
>> >> project in
>> >> the second Eclipse? I cannot see the submenu under validation menu?
Thanks.
>> >> Wuwei
>> >>
>> >>
>> >>
>> >> Christian W. Damus wrote:
>> >>
>> >> > Hi, W.,
>> >>
>> >> > There is a brief introduction to the examples in the on-line help (if
>> >> > you have the EMF Validation SDK installed, and not just the examples).
>> >> > Look for the Examples Guide under the EMF Validation Framework
Developer
>> >> > Guide.
>> >>
>> >> > One point that the help doesn't mention is that it's a good idea to
>> >> > install all three examples, especially as the OCL example contributes
>> >> > some constraints that make it more interesting.
>> >>
>> >> > HTH,
>> >>
>> >> > Christian
>> >>
>> >>
>> >> > Wuwei wrote:
>> >> >> I tried to run the EMF general validation example. After I do
>> >> >> File -> New -> Examples -> EMF Validation Framework Plug-ins ->
>> >> >> General Validation Example, there are four project
>> >> >> validation.example.general,
>> >> >> three emf.example.library related projects. Why there are these
>> >> >> four projects created? When right-clicking on
validation.example.general
>> >> >> project,
>> >> >> I choose run as -> Eclipse Application and a second eclipse windows
pops
>> >> >> up. Then
>> >> >> I get lost about how to create an application model to check
constraints
>> >> >> given
>> >> >> in the validation.example.general project? If I want to change some
>> >> >> constraints
>> >> >> given in the validation.example.general project, what should I
recompile
>> >> >> and run it? Thanks.
>> >> >> W.
>> >> >>
>> >>
>> >>
>>
>>
Re: Question about EMF Validation Example [message #428708 is a reply to message #428698] Fri, 27 March 2009 02:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: give.a.damus.gmail.com

Hi, Wuwei,

You need only to close or delete the plug-in project that you don't
want, then it will no longer be in your run-time workbench's configuration.

If you installed the example plug-ins into your development workbench
(which I don't recommend doing) then you would have to uninstall the
entire examples feature, because I don't think that p2 provides a UI for
removing a single plug-in (it would invalidate the feature, anyway).

Cheers,

Christian


Wuwei wrote:
> I still get confused here. Is it possible for me to remove the adapter
> plugin
> bc I want to get rid of msg "The Evalidator Adapter succesfully
> delegrated validation of ...". More general question is after I install
> a plugin, is it possible to remove that plugin later? Thanks.
> Wuwei
>

-----8<-----
Re: Question about EMF Validation Example [message #428709 is a reply to message #428685] Fri, 27 March 2009 02:13 Go to previous message
Eclipse UserFriend
Originally posted by: give.a.damus.gmail.com

Hi, Wuwei,

It sounds like you tried it on the wrong element. This action is
applicable only to Resources. What's more, the enablement is computed
at run-time, which requires Eclipse to create the action object when you
first select it in the menu, resulting in the message that you saw if it
isn't enabled. Also, once live validation is enabled for a resource, I
see in the code that it can't be disabled without closing and re-opening
the editor ...

Cheers,

Christian

Wuwei wrote:
> Thanks, Christian.
> I have another question. When I enable live validation, i get a msg
> box "The chosen operation is not enabled". What is wrong with my change
> from batch to live mode. Thanks.
> Wuwei
>
Previous Topic:editingDomain sometimes null when using AdapterFactoryEditingDomain.getEditingDomainFor (EObject)
Next Topic:no remove notifications for changeable volatile list
Goto Forum:
  


Current Time: Sat Apr 27 04:03:46 GMT 2024

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

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

Back to the top