Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Different mappings for the same generated code
Different mappings for the same generated code [message #510053] Tue, 26 January 2010 11:39 Go to next message
Milan Milanovich is currently offline Milan MilanovichFriend
Messages: 201
Registered: July 2009
Senior Member
Hi,

I have one problem regarding generation of elements from gmfmap/gmfgen.

I have multiple FlowElements, like: Task, SubProcess, etc., and two containers:
Pool and Lane. These classes are defined like this:

class Task extends FlowElement { ... }
class SubProcess extendsFlowElement {...}

and containers are defined like this:

class Pool {
flowElements[0..*] : FlowElement;
...
}

class Lane {
flowElementsRef[0..*] : FlowElement;
...
}

I have defined mappings for FlowElements as ChildReferences in the Pool NodeMapping,
and I wanted to reference the same mappings from Lane NodeMapping (by using referenced child
property). However, GMF generated Task2EditPart and SubProcess2EditPart classes and other.
How can I fix this,i.e., to use the same Task and SubProcess EditParts in for the Pool and the Lane ?

--
Regards, Milan
Re: Different mappings for the same generated code [message #510195 is a reply to message #510053] Tue, 26 January 2010 16:13 Go to previous messageGo to next message
Christoph Wienands is currently offline Christoph WienandsFriend
Messages: 55
Registered: July 2009
Member
Hello Milan,

> I have defined mappings for FlowElements as ChildReferences in the Pool
> NodeMapping,
> and I wanted to reference the same mappings from Lane NodeMapping (by
> using referenced child
> property). However, GMF generated Task2EditPart and SubProcess2EditPart
> classes and other.
> How can I fix this,i.e., to use the same Task and SubProcess EditParts in
> for the Pool and the Lane ?

Have you tried deriving Pool and Lane from a common subclass that contains
the flowElements references? Just a guess...

Christoph
Re: Different mappings for the same generated code [message #510241 is a reply to message #510195] Tue, 26 January 2010 20:32 Go to previous messageGo to next message
Milan Milanovich is currently offline Milan MilanovichFriend
Messages: 201
Registered: July 2009
Senior Member
Dear Christoph,

the metamodel I'm using is the official (final) spec., so it shouldn't be changed.

--
Milan
Re: Different mappings for the same generated code [message #512545 is a reply to message #510053] Fri, 05 February 2010 12:50 Go to previous message
Milan Milanovich is currently offline Milan MilanovichFriend
Messages: 201
Registered: July 2009
Senior Member
No one have any suggestion how to do this?

Additionaly, I need when a FlowElement is added to the Lane, that it be automatically added to the parent Pool (i.e., its flowElements property). Lane is actually also a FlowElement and it is contained in the Pool.

--
Regards, Milan

Previous Topic:Change Default Icons
Next Topic:paletteProviders not used?
Goto Forum:
  


Current Time: Fri Apr 26 07:06:42 GMT 2024

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

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

Back to the top