Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » name and type of a Variable(Declaration)
name and type of a Variable(Declaration) [message #21355] Fri, 03 February 2006 13:18 Go to next message
Eclipse UserFriend
VariableDeclaration extends ENamedElement, so it inherits a name.

But VariableDeclaration adds a varName.

What is the significance of the second name? It just seems to
break all code that works consistently with names such as
EModelElement.eURIFragmentSegment().

Is VariableDeclaration going to change to Variable as per OCL 2.0?

VariableDeclartion is at least loosely a TypedElement which
has an eType rather than a type. Is this to be resolved to?

Regards

Ed Willink
Re: name and type of a Variable(Declaration) [message #21380 is a reply to message #21355] Fri, 03 February 2006 16:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Ed,

I don't actually know why VariableDeclaration extends ENamedElement; the
"name" attribute doesn't seem ever to be used, and probably shouldn't be as
the "varName" attribute is what the spec defines. I suppose we could make
it an EModelElement instead, but I'd want to look a little deeper first
just to make sure that the name isn't actually used anywhere.

The OCL 2.0 spec on which this parser was originally developed was the
"final adopted specification" from 2003, pre-FTF. I don't think we have it
in our plans to adopt the June 2005 version; I will check on that.

Regarding ETypedElement-ness, I'm thinking that if we do plan to adopt June
2005, then it might be an opportunity to revisit more than just the
VariableDeclaration vis-a-vis the way the metamodel extends Ecore. There
are some design decisions in that metamodel that I'm not happy with ...

Cheers,

Christian


Ed Willink wrote:

> VariableDeclaration extends ENamedElement, so it inherits a name.
>
> But VariableDeclaration adds a varName.
>
> What is the significance of the second name? It just seems to
> break all code that works consistently with names such as
> EModelElement.eURIFragmentSegment().
>
> Is VariableDeclaration going to change to Variable as per OCL 2.0?
>
> VariableDeclartion is at least loosely a TypedElement which
> has an eType rather than a type. Is this to be resolved to?
>
> Regards
>
> Ed Willink
Re: name and type of a Variable(Declaration) [message #21839 is a reply to message #21355] Thu, 09 February 2006 12:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

I have raised a bugzilla to address the updating of the OCL parser for the
final OCL 2.0 spec:

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

Cheers,

Christian


Ed Willink wrote:

> VariableDeclaration extends ENamedElement, so it inherits a name.
>
> But VariableDeclaration adds a varName.
>
> What is the significance of the second name? It just seems to
> break all code that works consistently with names such as
> EModelElement.eURIFragmentSegment().
>
> Is VariableDeclaration going to change to Variable as per OCL 2.0?
>
> VariableDeclartion is at least loosely a TypedElement which
> has an eType rather than a type. Is this to be resolved to?
>
> Regards
>
> Ed Willink
Re: name and type of a Variable(Declaration) [message #21884 is a reply to message #21839] Thu, 09 February 2006 15:44 Go to previous message
Eclipse UserFriend
Christian W. Damus wrote:
> I have raised a bugzilla to address the updating of the OCL parser for the
> final OCL 2.0 spec:

Fantastic. With OCL 2.0 underpining an increasing number of modelling languages,
it would be very disappointing if EMFT fell seriously behind.

Ed
Re: name and type of a Variable(Declaration) [message #565852 is a reply to message #21355] Fri, 03 February 2006 16:43 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Ed,

I don't actually know why VariableDeclaration extends ENamedElement; the
"name" attribute doesn't seem ever to be used, and probably shouldn't be as
the "varName" attribute is what the spec defines. I suppose we could make
it an EModelElement instead, but I'd want to look a little deeper first
just to make sure that the name isn't actually used anywhere.

The OCL 2.0 spec on which this parser was originally developed was the
"final adopted specification" from 2003, pre-FTF. I don't think we have it
in our plans to adopt the June 2005 version; I will check on that.

Regarding ETypedElement-ness, I'm thinking that if we do plan to adopt June
2005, then it might be an opportunity to revisit more than just the
VariableDeclaration vis-a-vis the way the metamodel extends Ecore. There
are some design decisions in that metamodel that I'm not happy with ...

Cheers,

Christian


Ed Willink wrote:

> VariableDeclaration extends ENamedElement, so it inherits a name.
>
> But VariableDeclaration adds a varName.
>
> What is the significance of the second name? It just seems to
> break all code that works consistently with names such as
> EModelElement.eURIFragmentSegment().
>
> Is VariableDeclaration going to change to Variable as per OCL 2.0?
>
> VariableDeclartion is at least loosely a TypedElement which
> has an eType rather than a type. Is this to be resolved to?
>
> Regards
>
> Ed Willink
Re: name and type of a Variable(Declaration) [message #566496 is a reply to message #21355] Thu, 09 February 2006 12:55 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

I have raised a bugzilla to address the updating of the OCL parser for the
final OCL 2.0 spec:

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

Cheers,

Christian


Ed Willink wrote:

> VariableDeclaration extends ENamedElement, so it inherits a name.
>
> But VariableDeclaration adds a varName.
>
> What is the significance of the second name? It just seems to
> break all code that works consistently with names such as
> EModelElement.eURIFragmentSegment().
>
> Is VariableDeclaration going to change to Variable as per OCL 2.0?
>
> VariableDeclartion is at least loosely a TypedElement which
> has an eType rather than a type. Is this to be resolved to?
>
> Regards
>
> Ed Willink
Re: name and type of a Variable(Declaration) [message #566508 is a reply to message #21839] Thu, 09 February 2006 15:44 Go to previous message
Eclipse UserFriend
Christian W. Damus wrote:
> I have raised a bugzilla to address the updating of the OCL parser for the
> final OCL 2.0 spec:

Fantastic. With OCL 2.0 underpining an increasing number of modelling languages,
it would be very disappointing if EMFT fell seriously behind.

Ed
Previous Topic:[Announce] EMFT TRANSACTION 1.0.0 I200602090913 is available
Next Topic:Always getting result as 'true' in 'isUnique' operation
Goto Forum:
  


Current Time: Wed May 14 15:30:08 EDT 2025

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

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

Back to the top