Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » OCL expression updates(How to link to meta-model element)
OCL expression updates [message #1295463] Mon, 14 April 2014 09:37 Go to next message
Missing name Mising name is currently offline Missing name Mising name
Messages: 9
Registered: March 2011
Junior Member
Hey,

Maybe I've not work enough with OCL API but....I've a "problem".

Note that I use Rational Software Modeler.

OCL is stored as a String so when I change the name of a property in a class (for example), when I load an OCL expression that use this property, my expression becomes invalid.
The reason is that OCL store the name of the property and not its internal ID.

So, if I'm right, don't you think that it could have been a good idea to store the ID of any meta-model element instead of its name. The OCL expression with the name will be built by the editor when necessary.

Note that I've created a basic SQL expression editor in for an UML profile and I store the ID so that the expressions becomes "renaming agnostic".

[Updated on: Mon, 14 April 2014 09:37]

Report message to a moderator

Re: OCL expression updates [message #1295498 is a reply to message #1295463] Mon, 14 April 2014 10:10 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4046
Registered: July 2009
Senior Member
Hi

You are reporting a bug in the refactoring operation.

As you say a String representation of OCL is blind to refactoring.

However a compiled representation such as an ExpressionInOCL contains
metamodel references as you suggest and will track many refactorings.

So you should report a bug against RSM for failing to
compile/pretty-print all OCL around refactoring operations.

Regards

Ed Willink


On 14/04/2014 10:37, Missing name Mising name wrote:
> Hey,
>
> Maybe I've not work enough with OCL API but....I've a "problem".
>
> Note that I use Rational Software Modeler.
>
> OCL is stored as a String so when I change the name of a property in a
> class (for example), when I load an OCL expression that use this
> property, my expression becomes invalid.
> The reason is that OCL store the name of the property and not its
> internal ID.
>
> So, if I'm right, don't you think that it could have been a good idea
> to store the ID of any meta-model element instead of its name. The OCL
> expression with the name will be built by the editor when necessary.
>
> Note that I've created a basic SQL expression editor in for an UML
> profile and I store the ID so that the expressions becomes "renaming
> agnostic".
Re: OCL expression updates [message #1295503 is a reply to message #1295498] Mon, 14 April 2014 10:18 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4046
Registered: July 2009
Senior Member
Hi

https://bugs.eclipse.org/bugs/show_bug.cgi?id=432720

is the corresponding bug report for Papyrus.

Regards

Ed Willink

On 14/04/2014 11:10, Ed Willink wrote:
> Hi
>
> You are reporting a bug in the refactoring operation.
>
> As you say a String representation of OCL is blind to refactoring.
>
> However a compiled representation such as an ExpressionInOCL contains
> metamodel references as you suggest and will track many refactorings.
>
> So you should report a bug against RSM for failing to
> compile/pretty-print all OCL around refactoring operations.
>
> Regards
>
> Ed Willink
>
>
> On 14/04/2014 10:37, Missing name Mising name wrote:
>> Hey,
>>
>> Maybe I've not work enough with OCL API but....I've a "problem".
>>
>> Note that I use Rational Software Modeler.
>>
>> OCL is stored as a String so when I change the name of a property in
>> a class (for example), when I load an OCL expression that use this
>> property, my expression becomes invalid.
>> The reason is that OCL store the name of the property and not its
>> internal ID.
>>
>> So, if I'm right, don't you think that it could have been a good idea
>> to store the ID of any meta-model element instead of its name. The
>> OCL expression with the name will be built by the editor when necessary.
>>
>> Note that I've created a basic SQL expression editor in for an UML
>> profile and I store the ID so that the expressions becomes "renaming
>> agnostic".
>
Previous Topic:Recalling an invariant from an another invariant in OCLinEcore
Next Topic:oclAsType in xtext console
Goto Forum:
  


Current Time: Tue Sep 23 04:40:41 GMT 2014

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

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