Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Static Profiles with OCL Integration possible?
Static Profiles with OCL Integration possible? [message #627654] Tue, 02 June 2009 14:30
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Hey all,

i've created a static profile with success and now, i've tried to enable
the automatically OCL integration for the profile. Well, by using the
origin UML model as input for the Genmodel of the profile, the necessary
OCL statements are generated, but when i apply the profile to a model
and violate the constraint, the violation won't be found.

I've done this with a normal ecore instance (not an UML profile) and it
worked as it should be, so that i'm sure, that depends on the profile
nature of the model. Will the OCL integration by recognized by the
default UML tree editor?

Here is the generated code:

public boolean weightening(DiagnosticChain diagnostics, Map<Object,
Object> context) {
OCL.Helper helper = EOCL_ENV.createOCLHelper();
helper.setContext(MiscellaneousProfilePackage.Literals.WEIGH T);
try {
catch (ParserException pe) {
throw new UnsupportedOperationException(pe.getLocalizedMessage());
if (diagnostics != null) {
(new BasicDiagnostic
EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic ",
new Object[] { "weightening", EObjectValidator.getObjectLabel(this,
context) }),
new Object [] { this }));
return false;
return true;

Regards Timothy
Previous Topic:UML2 + CDO
Next Topic:Strategy for loading commercial UML XMI 2.1 (MaicDraw)
Goto Forum:

Current Time: Thu Apr 26 19:37:31 GMT 2018

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

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