Problem when using ereference to another registered package [message #840204] |
Mon, 09 April 2012 16:02  |
Eclipse User |
|
|
|
Hi,
I have an ecore metamodel that has a class with an EReference to the Activity class from the bpmn metamodel (which came from the bpmn modeler editor). To do that, I simply right clicked->load resource->browse registered packages->choose http://stp.eclipse.org/bpmn. It gives no error and validates sucessfully when opening the file on Sample Ecore model editor, but when I open on OclInEcore Editor, this line:
import bpmn : '/plugin/org.eclipse.stp.bpmn/model/bpmn.ecore#/';
has an error, stating that this import is unresolved and null.
When I restart eclipse, it evens change that eReference to an Eobject. If I do not open the file on OCLinEcoreEditor, when I restart eclipse it stays with the correct EReference.
Any help is appreciated.
Thank you.
|
|
|
Re: Problem when using ereference to another registered package [message #840444 is a reply to message #840204] |
Tue, 10 April 2012 00:56   |
Eclipse User |
|
|
|
Hi
What version are you using?
http://wiki.eclipse.org/MDT/OCL/New_and_Noteworthy/Indigo shows a
related fix in SR1 and in SR2.
import bpmn : '/plugin/org.eclipse.stp.bpmn/model/bpmn.ecore#/';
does not seem at all likely, but without the *.ecore file to look at
it's difficult to comment.
Regards
Ed Willink
On 09/04/2012 21:02, Rômulo rpini wrote:
> Hi,
>
> I have an ecore metamodel that has a class with an EReference to the
> Activity class from the bpmn metamodel (which came from the bpmn
> modeler editor). To do that, I simply right clicked->load
> resource->browse registered packages->choose
> http://stp.eclipse.org/bpmn. It gives no error and validates
> sucessfully when opening the file on Sample Ecore model editor, but
> when I open on OclInEcore Editor, this line:
>
> import bpmn : '/plugin/org.eclipse.stp.bpmn/model/bpmn.ecore#/';
>
> has an error, stating that this import is unresolved and null.
>
> When I restart eclipse, it evens change that eReference to an Eobject.
> If I do not open the file on OCLinEcoreEditor, when I restart eclipse
> it stays with the correct EReference.
>
> Any help is appreciated.
>
> Thank you.
|
|
|
|
Re: Problem when using ereference to another registered package [message #840735 is a reply to message #840204] |
Tue, 10 April 2012 08:58   |
Eclipse User |
|
|
|
Hi
This is my 'favourite' EMF feature: meta-model schizophrenia, which the
Sample Ecore Editor makes very easy.
In bpmn.ecore you will find
<eClassifiers xsi:type="ecore:EClass" name="MessageVertex"
eSuperTypes="#//NamedBpmnObject #//Identifiable">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="orderedMessages"
unique="false"
upperBound="-1" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
and
<eClassifiers xsi:type="ecore:EClass" name="Association"
eSuperTypes="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement">
demonstrating that bpmn.ecore is using schizophrenic Ecores
EFeatureMapEntry from http://www.eclipse.org/emf/2002/Ecore (registered
Java classes)
EModelElement from
platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore (a file)
If you load bpmn.ecore into the Sample Ecore Editor and validate you
will find two copies of Ecore in use; not a problem for the Sample Ecore
Editor that does not do much model execution, but generally the source
of nightmares in model transformation tools that at best get confusing
answers from type hierarchy comparisons.
The OCLinEcore editor is a little more proactive in diagnosing
schizophrenia detecting a conflict on load, but the message is far from
obvious. There is a conflict message in the error log but that is also
far from clear.
So for Indigo, you need to repair the broken bpmn.ecore, so that it uses
only one flavour of Ecore.
For Juno, this problem goes away, because Ecores are loaded as Pivot
models where package nsURI rather external URI is significant. Duplicate
nsURIs are merged.
Regards
Ed Willink
On 09/04/2012 21:02, Rômulo rpini wrote:
> Hi,
>
> I have an ecore metamodel that has a class with an EReference to the
> Activity class from the bpmn metamodel (which came from the bpmn
> modeler editor). To do that, I simply right clicked->load
> resource->browse registered packages->choose
> http://stp.eclipse.org/bpmn. It gives no error and validates
> sucessfully when opening the file on Sample Ecore model editor, but
> when I open on OclInEcore Editor, this line:
>
> import bpmn : '/plugin/org.eclipse.stp.bpmn/model/bpmn.ecore#/';
>
> has an error, stating that this import is unresolved and null.
>
> When I restart eclipse, it evens change that eReference to an Eobject.
> If I do not open the file on OCLinEcoreEditor, when I restart eclipse
> it stays with the correct EReference.
>
> Any help is appreciated.
>
> Thank you.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06935 seconds