Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » validate constraints added to profile
validate constraints added to profile [message #22472] Thu, 10 May 2007 03:46 Go to next message
Eclipse UserFriend
Originally posted by: asma.charfi.com

hi
I spcify some constraints in my profile (on stereotypes) and I want to
verify if the model which apply this profile respect these constraints
Ii installed emft (validation, transaction...) and tried to follow the
tutorial but it deals with adding constraints to metamodel and not to a
profile
how can I do ?
thank you for your help
Re: validate constraints added to profile [message #22560 is a reply to message #22472] Wed, 09 May 2007 19:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Charfi,

The latest integration build of OCL 1.1 (and the M7 milestone building
coming tomorrow) has enhancements to the Interactive OCL Console example
plug-in that should help you to validate your constraints.

If you are using the basic UML2 editor to create your profile, you can (with
the console example installed) use the "Show OCL Console" action in the
context menu to open the OCL console. Switch the console to "M1" mode
(targeting your UML model, not the metamodel), select your stereotype, and
enter the constraint in the bottom panel of the console. The results of
parsing it (either success or some error message) will be shown in the top
panel of the console.

See the Examples Guide in the OCL on-line help for details of how to install
and use this example.

You might also ask on the MDT UML2Tools project newsgroup
(eclipse.modeling.mdt.uml2tools) to ask whether they have any OCL
validation support.

HTH,

Christian


charfi asma wrote:

> hi
> I spcify some constraints in my profile (on stereotypes) and I want to
> verify if the model which apply this profile respect these constraints
> Ii installed emft (validation, transaction...) and tried to follow the
> tutorial but it deals with adding constraints to metamodel and not to a
> profile
> how can I do ?
> thank you for your help
Re: validate constraints added to profile [message #23198 is a reply to message #22560] Wed, 16 May 2007 06:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: asma.charfi.com

hi,

the "Show OCL Console" appear only in the model "extlibrary" using the
org.eclipse.emf.ocl.examples.interpreter

I tried to use this plugin to have my OCL console in the employee model but
it did not work.
how can I obtein the OCL console?

in the OCL's Help "EMFT OCL Developer Guide->Tutorials->OCL interpreter
Example, there was Query that we should create :
"boolean valid;

try {
Query query = QueryFactory.eINSTANCE.createQuery(
"self.books->collect(b : Book | b.category)->asSet()",
LibraryPackage.eINSTANCE.getWriter());

// record success
valid = true;
} catch (IllegalArgumentException e) {
// record failure to parse
valid = false;
System.err.println(e.getLocalizedMessage());
}" where did we should create this query (in witch file)?thank you in
advanceasma"Christian W. Damus" <cdamus@ca.ibm.com> a
Re: validate constraints added to profile [message #23541 is a reply to message #23198] Wed, 16 May 2007 13:26 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Asma,

The "Show OCL Console" menu on the UML and Ecore model editors is new in the
OCL 1.1 M7 milestone.

It sounds like you are using OCL 1.0.x, from the reference to "EMFT OCL" in
the help documentation. In that case, you can open the Console view using
the "Window -> Show View..." menu. Then, pull down the "Open Console" menu
button in the console view's action bar and select the "Interactive OCL"
option to open the console in any editor context.

Cheers,

Christian


charfi asma wrote:

> hi,
>
> the "Show OCL Console" appear only in the model "extlibrary" using the
> org.eclipse.emf.ocl.examples.interpreter
>
> I tried to use this plugin to have my OCL console in the employee model
> but it did not work.
> how can I obtein the OCL console?
>
> in the OCL's Help "EMFT OCL Developer Guide->Tutorials->OCL interpreter
> Example, there was Query that we should create :
> "boolean valid;
>
> try {
> Query query = QueryFactory.eINSTANCE.createQuery(
> "self.books->collect(b : Book | b.category)->asSet()",
> LibraryPackage.eINSTANCE.getWriter());
>
> // record success
> valid = true;
> } catch (IllegalArgumentException e) {
> // record failure to parse
> valid = false;
> System.err.println(e.getLocalizedMessage());
> }" where did we should create this query (in witch file)?thank you in
> advanceasma"Christian W. Damus" <cdamus@ca.ibm.com> a �rit dans le message
> de news: f1t6fl$4cf$1@build.eclipse.org...
Previous Topic:Re: integrating ocl with emf
Next Topic:compilation phases
Goto Forum:
  


Current Time: Thu Apr 25 17:40:05 GMT 2024

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

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

Back to the top