Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » VariableExp in OCL 1.2.0 breaks compatibility to 1.1.2?
VariableExp in OCL 1.2.0 breaks compatibility to 1.1.2? [message #60321] Thu, 07 August 2008 23:45 Go to next message
Stefan Schulze is currently offline Stefan SchulzeFriend
Messages: 70
Registered: July 2009
Member
Hi...

I developed my program using OCL 1.1.2 and now I tried to run against 1.2.0.
Thereby I got NPEs because VariableExp#getName() always returns null. In
version 1.1.2 it seems to return
VariableExp#getReferredVariable().getName().
It's no big deal for me to replace the usage of VariableExpr#getName() by
VariableExp#getReferredVariable().getName(), but I'm curious whether I did
something wrong so VariableExp#name is always null or it's a bug or a
volitional compatibility-breach.
Re: VariableExp in OCL 1.2.0 breaks compatibility to 1.1.2? [message #60346 is a reply to message #60321] Fri, 08 August 2008 00:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Stefan,

An accurate but not very helpful answer is that a correspondence of the
VariableExp name with the referred variable name never was in the API
contract. Hopefully a more helpful answer follows ...

I can see that in the 1.1.x release, the OCLParser always set a
VariableExp name to the name of its referredVariable when creating it.
Early in the 1.2 release, this class was significantly refactored when
the LPG grammar was reworked to support extension of the OCL language by
QVT implementations. The initial version of the AbstractOCLAnalyzer
(which the former OCLParser became) has all but one occurrences of this
name transference removed.

I vaguely recall some conversation with Ed W. about the value of having
a name on OperationCallExp, when the name doesn't serve much use and the
called operation has its own name anyway (in a namespace, to boot). I
don't recall any discussion of VariableExp, but it would seem to be a
similar question.

In any case, it isn't a nice surprise for clients that seemed to be able
to rely on this name. If you care to raise a bug, I'll be happy to
address this regression in the 1.2.1 release.

Cheers,

Christian


Stefan Schulze wrote:
> Hi...
>
> I developed my program using OCL 1.1.2 and now I tried to run against 1.2.0.
> Thereby I got NPEs because VariableExp#getName() always returns null. In
> version 1.1.2 it seems to return
> VariableExp#getReferredVariable().getName().
> It's no big deal for me to replace the usage of VariableExpr#getName() by
> VariableExp#getReferredVariable().getName(), but I'm curious whether I did
> something wrong so VariableExp#name is always null or it's a bug or a
> volitional compatibility-breach.
>
>
Re: VariableExp in OCL 1.2.0 breaks compatibility to 1.1.2? [message #60370 is a reply to message #60346] Fri, 08 August 2008 01:39 Go to previous message
Stefan Schulze is currently offline Stefan SchulzeFriend
Messages: 70
Registered: July 2009
Member
Hi Christian,

I raised https://bugs.eclipse.org/bugs/show_bug.cgi?id=243526.


"Christian W. Damus" <cdamus@zeligsoft.com> schrieb im Newsbeitrag
news:g7g4q0$aga$1@build.eclipse.org...
> Hi, Stefan,
>
> An accurate but not very helpful answer is that a correspondence of the
> VariableExp name with the referred variable name never was in the API
> contract. Hopefully a more helpful answer follows ...
>
> I can see that in the 1.1.x release, the OCLParser always set a
> VariableExp name to the name of its referredVariable when creating it.
> Early in the 1.2 release, this class was significantly refactored when the
> LPG grammar was reworked to support extension of the OCL language by QVT
> implementations. The initial version of the AbstractOCLAnalyzer (which
> the former OCLParser became) has all but one occurrences of this name
> transference removed.
>
> I vaguely recall some conversation with Ed W. about the value of having a
> name on OperationCallExp, when the name doesn't serve much use and the
> called operation has its own name anyway (in a namespace, to boot). I
> don't recall any discussion of VariableExp, but it would seem to be a
> similar question.
>
> In any case, it isn't a nice surprise for clients that seemed to be able
> to rely on this name. If you care to raise a bug, I'll be happy to
> address this regression in the 1.2.1 release.
>
> Cheers,
>
> Christian
>
>
> Stefan Schulze wrote:
>> Hi...
>>
>> I developed my program using OCL 1.1.2 and now I tried to run against
>> 1.2.0. Thereby I got NPEs because VariableExp#getName() always returns
>> null. In version 1.1.2 it seems to return
>> VariableExp#getReferredVariable().getName().
>> It's no big deal for me to replace the usage of VariableExpr#getName() by
>> VariableExp#getReferredVariable().getName(), but I'm curious whether I
>> did something wrong so VariableExp#name is always null or it's a bug or a
>> volitional compatibility-breach.
>>
Previous Topic:[Announce] MDT OCL 1.3.0 I200808061438 is available
Next Topic:EDataType support in OCL
Goto Forum:
  


Current Time: Mon Sep 23 08:51:53 GMT 2024

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

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

Back to the top