EWL: How to run a sample wizard in UML Designer & Eclipse Mars [message #1718249] |
Mon, 21 December 2015 16:21 |
Alireza Rouhi Messages: 148 Registered: December 2015 |
Senior Member |
|
|
Hi,
After studying the EWL chapter of the Epsilon Book, I want to explore a small example wizard just as follows:
wizard applySignletonPattern {
guard : self.isKindOf(Class)
title : "Apply the Singleton pattern to " + self.name
do {
"It's Okay! Let's go and apply that.";
}
}
How can I run this wizard?
Of course, I have named it 'foo.ewl' in a UML Designer sample project. In addition, I have created a class in my model. What should I do after selecting my candidate class for applying pattern, i.e., here wizard "applySignletonPattern"?
Kind regards,
Alireza
[Updated on: Tue, 22 December 2015 09:09] Report message to a moderator
|
|
|
|
|
Re: EWL: How to run a sample wizard [message #1718316 is a reply to message #1718300] |
Tue, 22 December 2015 11:39 |
|
Hi Alireza,
Epsilon doesn't provide built-in support for UML Designer and it appears that although Sirius (on top of which UML Designer has been developed) builds on GMF, it adds one more layer between the diagram and the semantic elements which Epsilon is unaware of. To cut a long story short, a workaround for this is to set the Namespace URI field to * in Preferences->Epsilon->EMF/GMF Wizards and then use self.target to navigate to the actual semantic elements, as follows.
wizard AddSuffix {
guard : self.target.isKindOf(Class)
title : "Add suffix"
do {
self.target.name = self.target.name + "_";
}
}
Cheers,
Dimitris
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03384 seconds