Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [Eugenia] Enumeration
[Eugenia] Enumeration [message #660947] Tue, 22 March 2011 13:08 Go to next message
amalia.msanusi
Messages: 6
Registered: March 2011
Junior Member
Hi everyone,

I have a question regarding setting the enumeration into nodes. Consider these EMF codes:

class EventBasedGateway extends Gateway {
attr EventBasedGatewayType[1] eventGatewayType;
attr boolean[1] instantiate = false;
}

enum EventBasedGatewayType {
Parallel = 0;
Exclusive = 1;
}


I want to specify that each object in this enum EventBasedGatewayType to be gmf nodes with different figures. How do I do that?

Regards,

AM
Re: [Eugenia] Enumeration [message #660949 is a reply to message #660947] Tue, 22 March 2011 13:23 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 867
Registered: July 2009
Senior Member
Hi,

This might help: http://www.eclipse.org/gmt/epsilon/doc/articles/eugenia-node s-with-runtime-images/

Cheers,
Dimitris
Re: [Eugenia] Enumeration [message #661284 is a reply to message #660947] Wed, 23 March 2011 22:05 Go to previous messageGo to next message
amalia.msanusi
Messages: 6
Registered: March 2011
Junior Member
Hi Dimitris,

Thanks for your reply!

I'm having trouble understanding the code. But I tried to follow the instruction. I can't seem to find org.eclipse.ui.dialogs.ResourceListSelectionDialog in org.eclipse.ui.dialogs.... (the jar that is used is org.eclipse.ui.workbench_3.6.1.M20100826-1330.jar).

Am I missing something here?

Also.. how do I add multiple images into this (one for parallel, one for exclusive)?

AM
Re: [Eugenia] Enumeration [message #661336 is a reply to message #661284] Thu, 24 March 2011 10:07 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 867
Registered: July 2009
Senior Member
Hi,

This example was just meant to demonstrate how changing the value of an attribute can be reflected as a change in the interface. I suspect that in your case you won't need the ResourceListSelectionDialog as the shapes of your nodes will be predefined.

Cheers,
Dimitris
Re: [Eugenia] Enumeration [message #664452 is a reply to message #660947] Fri, 08 April 2011 23:22 Go to previous messageGo to next message
amalia.msanusi
Messages: 6
Registered: March 2011
Junior Member
Hi Dimitris,

I tried the other way, by adding some codes in Ecore2GMF.eol. But I still have some problems.

Here are the steps that I did:
- GmfTool: Add a new tool group and add 2 creation tools for Exclusive & Parallel to this tool group

- GmfGraph: Custom figures etc

- GmfMap:
Add Feature Seq Initializer with feature value eventGatewayType := EventBasedGatewayType::Parallel
and add constraint self.eventGatewayType = EventBasedGatewayType::Parallel

I could run the application with no errors but if I clicked on the parallel-event based, I got an error.

Is this the right way to do it? Or am I missing something?

Thanks a lot beforehand.

AM

[Updated on: Fri, 08 April 2011 23:42]

Report message to a moderator

Re: [Eugenia] Enumeration [message #664472 is a reply to message #660947] Sat, 09 April 2011 09:48 Go to previous message
amalia.msanusi
Messages: 6
Registered: March 2011
Junior Member
Hi, no worries. I've solved it. It turns out that I have to put both constraint and feature seq initializer for all top node reference related to EventBasedGateway.

AM
Previous Topic:EVL for two different files(two different models)
Next Topic:Does EMF Model Link maps only between different metamodels
Goto Forum:
  


Current Time: Sun Sep 21 06:19:34 GMT 2014

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

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