[Eugenia] Enumeration [message #660947] |
Tue, 22 March 2011 13:08 |
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 #661336 is a reply to message #661284] |
Thu, 24 March 2011 10:07 |
|
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 |
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03812 seconds