Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » EWL: How to run a sample wizard in UML Designer & Eclipse Mars
EWL: How to run a sample wizard in UML Designer & Eclipse Mars [message #1718249] Mon, 21 December 2015 16:21 Go to next message
Alireza Rouhi is currently offline Alireza RouhiFriend
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 #1718261 is a reply to message #1718249] Mon, 21 December 2015 22:01 Go to previous messageGo to next message
Alireza Rouhi is currently offline Alireza RouhiFriend
Messages: 148
Registered: December 2015
Senior Member
Sorry, I didn't see the message [#1696197] which discusses how to run an EWL wizard.

Kind regards,
Alireza
icon5.gif  Re: EWL: How to run a sample wizard [message #1718300 is a reply to message #1718261] Tue, 22 December 2015 08:53 Go to previous messageGo to next message
Alireza Rouhi is currently offline Alireza RouhiFriend
Messages: 148
Registered: December 2015
Senior Member
Hi,

My wizard settings have problem with the UML Designer 5 in Eclipse Mars. The wizards menu in the pop-up menu is empty!

index.php/fa/24395/0/

index.php/fa/24396/0/

Is there any required specific settings for my platform environment?

Kind regards,
Alireza

[Updated on: Tue, 22 December 2015 11:00]

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 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

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
Re: EWL: How to run a sample wizard [message #1718325 is a reply to message #1718316] Tue, 22 December 2015 13:26 Go to previous messageGo to next message
Alireza Rouhi is currently offline Alireza RouhiFriend
Messages: 148
Registered: December 2015
Senior Member
Hi Dimitris,

Great. Thank you very much.
But, there is one more thing! When I run the wizard from the menu, the error message
Undefined variable, type or model: 'Class' is displayed. Did you see this error message too?

Kind regards,
Alireza

[Updated on: Tue, 22 December 2015 13:44]

Report message to a moderator

Re: EWL: How to run a sample wizard [message #1719031 is a reply to message #1718325] Mon, 04 January 2016 14:59 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Hi Alireza,

That might be because there might be several metamodels with a type named "Class". Could you try prefixing it with the appropriate namespace URI? For instance, for EMF/UML2 5.0.0 models, it'd be something like this:

`http://www.eclipse.org/uml2/3.0.0/UML`::Class


Kind regards,
Antonio

[Updated on: Mon, 04 January 2016 15:00]

Report message to a moderator

Re: EWL: How to run a sample wizard [message #1719044 is a reply to message #1719031] Mon, 04 January 2016 16:43 Go to previous message
Alireza Rouhi is currently offline Alireza RouhiFriend
Messages: 148
Registered: December 2015
Senior Member
Hi Antonio,

Thanks a million.

Kind regards,
Alireza
Previous Topic:EWL: How to load an EVL script
Next Topic:Passing parameters
Goto Forum:
  


Current Time: Wed Apr 24 23:00:20 GMT 2024

Powered by FUDForum. Page generated in 0.03384 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top