Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » oclinecore editor - removes genmodel annotation entries
oclinecore editor - removes genmodel annotation entries [message #1230294] Sat, 11 January 2014 15:37 Go to next message
Vlad Gheorghe is currently offline Vlad GheorgheFriend
Messages: 127
Registered: May 2011
Senior Member
Hello,

I've noticed that OCLInEcore editor removes the body entry of genmodel annotations.
Is this correct ?

Regards
Vlad
Re: oclinecore editor - removes genmodel annotation entries [message #1230300 is a reply to message #1230294] Sat, 11 January 2014 15:55 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

There has been steady evolution making OCL in Ecore steadily more
useable. As you note OCL inCDATA is not really tenable.

As part of the evolution, Helios introduced a namespace for OCL embedded
in Ecore. Unfortunately this was different to that used by UML to export
OCL to Ecore. In Kepler this discrepancy was fixed and you should just
be noticing the OCLinEcore editor picking up the old namesapce and
translating it to the new.

Regards

Ed Willink



On 11/01/2014 15:37, Vlad Gheorghe wrote:
> Hello,
>
> I've noticed that OCLInEcore editor removes the body entry of genmodel
> annotations.
> Is this correct ?
>
> Regards
> Vlad
>
Re: oclinecore editor - removes genmodel annotation entries [message #1230621 is a reply to message #1230300] Sun, 12 January 2014 15:49 Go to previous messageGo to next message
Vlad Gheorghe is currently offline Vlad GheorgheFriend
Messages: 127
Registered: May 2011
Senior Member
Hi Ed,

Sorry for not being specific enough.

Given the following ecore file:

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="p">
  <eClassifiers xsi:type="ecore:EClass" name="A">
    <eOperations name="f">
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
        <details key="documentation" value="function doc"/>
        <details key="body" value="return 1;"/>
      </eAnnotations>
    </eOperations>
  </eClassifiers>
</ecore:EPackage>


Opening it with OCLInEcore editor, insert a blank line, save results in the removal of the key="body" details object.

I think this should not happen, as the user might want to have some of the operations implemented in java like this, while having others in ocl.

Regards
Vlad Gheorghe



Re: oclinecore editor - removes genmodel annotation entries [message #1230653 is a reply to message #1230621] Sun, 12 January 2014 17:56 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=425506

On 12/01/2014 15:49, Vlad Gheorghe wrote:
> <?xml version="1.0" encoding="UTF-8"?>
> <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="p">
> <eClassifiers xsi:type="ecore:EClass" name="A">
> <eOperations name="f">
> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
> <details key="documentation" value="function doc"/>
> <details key="body" value="return 1;"/>
> </eAnnotations>
> </eOperations>
> </eClassifiers>
> </ecore:EPackage>
Previous Topic:using includes and excludes returns unexpected result using interactive Xtext OCL
Next Topic:Type casting of query.evaluate() and ocl.evaluate()
Goto Forum:
  


Current Time: Thu Apr 25 05:03:33 GMT 2024

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

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

Back to the top