Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » EWL with Papyrus diagram?
EWL with Papyrus diagram? [message #659430] Sun, 13 March 2011 16:08 Go to next message
Timothy Marc is currently offline Timothy Marc
Messages: 547
Registered: July 2009
Senior Member
Hi all,

I'd like to use the very intuitive EWL to create some easy-to-use context
menue actions for UML2 GMF diagrams. The example provided for EWL shows the
usage with UML2 Diagrams, but actually (and to be honest), Papyrus will be
the most relevant diagram tool in the EMP. I was wondering, whether EWL can
be used with Papyrus 0.7.2/0.8.0, since Papyrus relies on GMF, as far as I
know.

Thanks a lot

Timothy
Re: EWL with Papyrus diagram? [message #659615 is a reply to message #659430] Mon, 14 March 2011 15:45 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Timothy,

Thanks for the positive feedback!

If Papyrus is GMF-based, I think this should be possible. Try binding an EWL wizard to one of the Papyrus namespace URIs via the Window > Preferences > Epsilon > EMF/GMF Wizards dialogue box.

Your EWL wizard will need to be specified in terms of (one of) the Papyrus metamodels.

Hope that helps!

Best regards,
Louis.
Re: EWL with Papyrus diagram? [message #659648 is a reply to message #659615] Mon, 14 March 2011 19:56 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-Dominguez
Messages: 304
Registered: January 2010
Senior Member
@Louis: Papyrus is a set of editors for the UML2 metamodels in the Eclipse UML project, I believe. I *think* it adds support for the SysML metamodels on top of that, but I haven't tried it.

@Timothy: I have used EWL to define wizards for Papyrus diagrams using the MARTE profile, in addition to UML2, without much problems [1]. Feel free to have a look at the code.

If you need to define a wizard on an UML2 element and use elements from a different profile at the same time, you may find the patch in this report useful:

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

It extends EWL a little to make it more useful in this context. If you're only working with UML2 itself, you won't really need it, I think.

[1]: http://goo.gl/r7yIc
Re: EWL with Papyrus diagram? [message #659754 is a reply to message #659648] Tue, 15 March 2011 09:59 Go to previous messageGo to next message
Timothy Marc is currently offline Timothy Marc
Messages: 547
Registered: July 2009
Senior Member
@Antonio: Thanks for that quick reply. Acutally, I have to work with UML2 +
my user-defined profile. What I'd like to achieve is to merge two identical
elements in the diagram. In my case this affects OpaqueActions, stereotyped
by a particular stereotype of my personal profile. The result should be a
new element, representing the merged actions. Due to its simplicity, I hoped
EWL can be exploited for this. And you answer is quite promising. Is your
bug related to MARTE solely or to any profile?

Thanks again
Timothy

"Antonio García" schrieb im Newsbeitrag
news:ilm9iq$635$1@news.eclipse.org...

@Louis: Papyrus is a set of editors for the UML2 metamodels in the Eclipse
UML project, I believe. I *think* it adds support for the SysML metamodels
on top of that, but I haven't tried it.

@Timothy: I have used EWL to define wizards for Papyrus diagrams using the
MARTE profile, in addition to UML2, without much problems [1]. Feel free to
have a look at the code.

If you need to define a wizard on an UML2 element and use elements from a
different profile at the same time, you may find the patch in this report
useful:

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

It extends EWL a little to make it more useful in this context. If you're
only working with UML2 itself, you won't really need it, I think.

[1]: http://goo.gl/r7yIc
Re: EWL with Papyrus diagram? [message #659886 is a reply to message #659754] Tue, 15 March 2011 17:59 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-Dominguez
Messages: 304
Registered: January 2010
Senior Member
It's related to any profile, I believe. In general, it's a problem due to the current restriction in the E*L languages that 1 model == 1 metamodel. The bug report describes it in much more depth, but here's the basic idea for EWL:

- if you need to have the wizards appear in standard UML2 elements (Actions, in your case), you need to set the metamodeluri attribute in your EWL extension to the UML2 URI.

- if you need to work with types in your profile's metamodel, you need to set the metamodeluri attribute in your EWL extension to the URI of your profile's metamodel.

As you can see, you can't meet both requirements at the same time.

What I do with my patch is add a new attribute which allows you to set the UML2 URI in the metamodeluri attribute and use a new attribute to load more metamodels into Epsilon's model registry. This ensures both that the wizards appear when right-clicking on UML2 elements and that the types in your profile's metamodel are available.

P.S.: didn't Papyrus' UML2 editors already have OpaqueActions? I recall having used them for my own diagrams :-S.
Re: EWL with Papyrus diagram? [message #660097 is a reply to message #659886] Wed, 16 March 2011 15:14 Go to previous messageGo to next message
Timothy Marc is currently offline Timothy Marc
Messages: 547
Registered: July 2009
Senior Member
Hi Antonio,

thanks again. Actually, what I develop is a UML2 profile, where most of the
base classes are OpaqueActions, but stereotyped OpaqueActions.

Thanks for your detailed answers. I'm pretty sure they help - if not, I'll
definitely come back to you ;-) The general answer, that it is in principle
possible has erased my first doubts.

So long
Timothy

"Antonio García" schrieb im Newsbeitrag
news:ilon2c$66e$1@news.eclipse.org...

It's related to any profile, I believe. In general, it's a problem due to
the current restriction in the E*L languages that 1 model == 1 metamodel.
The bug report describes it in much more depth, but here's the basic idea
for EWL:

- if you need to have the wizards appear in standard UML2 elements (Actions,
in your case), you need to set the metamodeluri attribute in your EWL
extension to the UML2 URI.

- if you need to work with types in your profile's metamodel, you need to
set the metamodeluri attribute in your EWL extension to the URI of your
profile's metamodel.

As you can see, you can't meet both requirements at the same time.

What I do with my patch is add a new attribute which allows you to set the
UML2 URI in the metamodeluri attribute and use a new attribute to load more
metamodels into Epsilon's model registry. This ensures both that the wizards
appear when right-clicking on UML2 elements and that the types in your
profile's metamodel are available.

P.S.: didn't Papyrus' UML2 editors already have OpaqueActions? I recall
having used them for my own diagrams :-S.
Re: EWL with Papyrus diagram? [message #663494 is a reply to message #659886] Tue, 05 April 2011 07:29 Go to previous message
Timothy Marc is currently offline Timothy Marc
Messages: 547
Registered: July 2009
Senior Member
Hey Antonia,

today, I started to give a try on EWL and Papyrus. Thanks for the link to
your project. May I ask you some questions beforehand, to avoid to run in
the wrong direction?

1. Is it still necessary to register the .ewl file in the preferences page?
What EPackage should I use for UML Activity diagram, for instance? In the
screencast, the .ewl was registered with a gmf-file extension, what would
not work for Papyrus, I'd say.

2. The @extraPackage in the EWL extension point was introduced by your
patch?

3. Do I have to write Java code in order to access profile information, or
will this be handled by Epsilon, when I follow your instructions and use
your patch? I'd a look in you AbstractInferenceTest.java file, that's why I
am asking this.

Thanks a lot again for your help.

Regards,

Marc-Florian

"Antonio García" schrieb im Newsbeitrag
news:ilon2c$66e$1@news.eclipse.org...

It's related to any profile, I believe. In general, it's a problem due to
the current restriction in the E*L languages that 1 model == 1 metamodel.
The bug report describes it in much more depth, but here's the basic idea
for EWL:

- if you need to have the wizards appear in standard UML2 elements (Actions,
in your case), you need to set the metamodeluri attribute in your EWL
extension to the UML2 URI.

- if you need to work with types in your profile's metamodel, you need to
set the metamodeluri attribute in your EWL extension to the URI of your
profile's metamodel.

As you can see, you can't meet both requirements at the same time.

What I do with my patch is add a new attribute which allows you to set the
UML2 URI in the metamodeluri attribute and use a new attribute to load more
metamodels into Epsilon's model registry. This ensures both that the wizards
appear when right-clicking on UML2 elements and that the types in your
profile's metamodel are available.

P.S.: didn't Papyrus' UML2 editors already have OpaqueActions? I recall
having used them for my own diagrams :-S.
Previous Topic:[Eugenia] Exception loading the resource
Next Topic:How to register a wizard?
Goto Forum:
  


Current Time: Mon Jul 28 08:35:59 EDT 2014

Powered by FUDForum. Page generated in 0.02465 seconds