Using user-defined model library creates dangling reference? [message #1747001] |
Tue, 08 November 2016 08:21  |
Eclipse User |
|
|
|
I am making a UML Profile that has a few stereotypes. In my stereotypes I am using some data types I have defined and which I have created a modelLibrary for in a separate UML model, let's say it's called exampleDataTypes.uml. This UML Model is using the Standard Profile and has the stereotype ModelLibrary applied to it.
I define several data types to my root element, say; Example Data Types.
I go to my UML profile, let's say example.profile. I import my modelLibrary using import -> import package from user model -> exampleDataTypes.uml.
Then I create a property in one of my stereotypes in my example.profile with one of the imported data types from my modelLibrary. I save and define my profile only to get the following error messages:
"the feature 'eType' of 'var : ExampleTypes_SomeType' contains a dangling reference ExampleTypes_SomeType''
"the feature 'eClassifier of 'ExampleTypes_SomeType' contains a dangling reference ExampleTypes_SomeType'
I have tried to import my modelLibrary also by creating a child node <Package import> and referencing the UML Model exampleDataTypes and get the same error.
Any thoughts?
Vetle VF.
[Updated on: Tue, 08 November 2016 08:25] by Moderator
|
|
|
|
|
Re: Using user-defined model library creates dangling reference? [message #1747018 is a reply to message #1747008] |
Tue, 08 November 2016 10:21  |
Eclipse User |
|
|
|
Hi, Vetle,
You need to register the package in the usual way on the appropriate EMF extension point:
- org.eclipse.emf.ecore.generated_package -- for generated Ecore packages (the EMF generator would usually generate this for you in the plugin.xml file)
- org.eclipse.emf.ecore.dynamic_package -- for dynamic packages (I think this is your case)
The UML2 SDK provides an extension point analogous to these EMF extension points: org.eclipse.uml2.uml.generated_package and org.eclipse.uml2.uml.dynamic_package, respectively. These provide the UML run-time with the association between the UML source and the Ecore representation. You can see examples in the org.eclipse.papyrus.infra.filters bundle (for a generated package) and the org.eclipse.uml2.uml.resources bundle (for dynamic packages).
HTH,
Christian
|
|
|
Powered by
FUDForum. Page generated in 0.08939 seconds