Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335522 - [Patch] Allow EWL to load additional EPackages into packages registry
Summary: [Patch] Allow EWL to load additional EPackages into packages registry
Status: CLOSED FIXED
Alias: None
Product: Epsilon
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Dimitris Kolovos CLA
QA Contact:
URL:
Whiteboard: interim
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-26 17:31 EST by Antonio Garcia-Dominguez CLA
Modified: 2012-08-29 17:33 EDT (History)
1 user (show)

See Also:


Attachments
Patch which adds the 'extraPackages' attribute to the EWL extension point (5.59 KB, patch)
2011-01-26 17:31 EST, Antonio Garcia-Dominguez CLA
no flags Details | Diff
Sample plug-in project demonstrating the issue (10.71 KB, application/octet-stream)
2011-01-26 17:32 EST, Antonio Garcia-Dominguez CLA
no flags Details
Sample UML2 model annotated with the MARTE profile (5.86 KB, application/octet-stream)
2011-01-26 17:33 EST, Antonio Garcia-Dominguez CLA
no flags Details
Version 2 of the patch (5.47 KB, patch)
2011-01-28 10:33 EST, Antonio Garcia-Dominguez CLA
dkolovos: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Garcia-Dominguez CLA 2011-01-26 17:31:56 EST
Created attachment 187692 [details]
Patch which adds the 'extraPackages' attribute to the EWL extension point

I have been working on using EWL to perform update transformations in UML2 models annotated with stereotypes from the MARTE profile [1]. I have run into some limitations in EWL, which I think would be solved with the attached patch.

To create these models, I have used Papyrus [2]. My update transformations work with performance annotations, so these UML2 models include stereotypes from the MARTE profile, also implemented within the Papyrus project [3].

The created models include the standard UML2 model, and some instances of the stereotypes in the MARTE profile. Th MARTE stereotype applications include links to the UML2 constructs they decorate, but not the other way around.

I need to define wizards on UML2 activities to annotate the actions within with their inferred performance requirements. In this context, I have run into some issues with EWL:

* If I use namespaceURI='(UML2 URI)', I can right-click on an UML2 Activity and
  the wizard shows up, but the wizard does not work, as the MARTE types are not
  available. From the source, it looks like EWL loads the model using the
  namespace URI of the top EPackage of the first EObject selected. Therefore,
  if I select an UML2 activity, only the UML2 metamodel and its dependencies
  will be available. UML2 does not depend on MARTE, so the MARTE types are not
  available.

* If I use namespaceURI='(MARTE URI)', the wizard would work, but nothing
  shows up if the user right-clicks on an UML2 Activity.

I have created a sample plug-in project to illustrate the issue. The project includes a base metamodel and a separate metamodel used to "annotate" elements of the first metamodel, in the fashion of UML2 and MARTE. The project includes a simple EWL wizard which will throw an exception related to this issue when following these steps:

1. Start a self-hosted Eclipse with the sample plug-in installed.
2. Open the sample model with the Sample Reflective Ecore Model.
3. Right click on the Element instance.
4. Try to use the 'Annotate with Foo' wizard.

The error is averted if the ElementComment instance is right-clicked first, or if the Exeed editor is used. I suppose that in the first case the annotation metamodel is silently loaded into the underlying resource's package registry. In the second case, the Exeed editor seems to load pretty much all available metamodels into the registry.

I have also attached a simple patch which aims to solve this issue. Going back to the UML2+MARTE case, the basic idea is to still use the UML2 URI for namespaceURI, but tell EWL to add the MARTE package into the package registry as well. To do this, I have extended the EWL extension point with a new attribute, which takes a comma-separated list of the namespace URIs of the EPackages to be added to the package registry, after adding the metamodel in the namespaceURI attribute and its dependencies. These EPackages are not used to determine if the wizard is applicable to a model element.

Finally, I have also included a model using UML2 and MARTE, created with the Papyrus toolset. This is the model I'm using for testing the algorithms and the wizards.

[1]: http://www.omgmarte.org/
[2]: http://www.eclipse.org/modeling/mdt/papyrus/
[3]: http://www.eclipse.org/forums/index.php?t=msg&th=203094&start=0&S=cd4e0fd5805741db797c9517e02b3ecc
Comment 1 Antonio Garcia-Dominguez CLA 2011-01-26 17:32:34 EST
Created attachment 187693 [details]
Sample plug-in project demonstrating the issue
Comment 2 Antonio Garcia-Dominguez CLA 2011-01-26 17:33:12 EST
Created attachment 187694 [details]
Sample UML2 model annotated with the MARTE profile
Comment 3 Antonio Garcia-Dominguez CLA 2011-01-28 10:33:25 EST
Created attachment 187849 [details]
Version 2 of the patch

I found a slight error in the above patch.
Comment 4 Dimitris Kolovos CLA 2011-02-01 16:20:54 EST
Thanks for reporting this. I'll have a look at the patch and integrate it within the next couple of days.
Comment 5 m kranz CLA 2011-04-07 10:48:11 EDT
hello dimitris

any info available on when (and if) this will be integrated?
Comment 6 Antonio Garcia-Dominguez CLA 2011-05-24 04:48:07 EDT
(In reply to comment #5)
> any info available on when (and if) this will be integrated?

The patch has been integrated into SVN. Dimitris, do you think we could publish an interim release this week?
Comment 7 Dimitris Kolovos CLA 2011-05-24 05:01:06 EDT
This has already been integrated in the latest interim version. I've emailed Marco about this directly but forgot to update the bug report :S
Comment 8 Dimitris Kolovos CLA 2011-06-04 05:02:40 EDT
Fixed in the latest interim report.
Comment 9 Dimitris Kolovos CLA 2011-07-25 08:16:16 EDT
Fixed in 0.9.1