Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Multiple DomainObjects per Pictogram
Multiple DomainObjects per Pictogram [message #1705218] Wed, 12 August 2015 21:46 Go to next message
Anton Huck is currently offline Anton HuckFriend
Messages: 3
Registered: August 2015
Junior Member
I'm stuck at separating layout information from other attributes. The layout - like the position of a specific element has to be saved separated (but same file) from other attributes in my domainmodel.

I tried following:

@Override
public Object[] create(ICreateContext context) {
 //...
 // generation of separated EObjects
 MyUtil.saveBoToFile(myEObject1, myEObject2);
 return Object[] { myEObject1, myEObject2};
}


but calling
getAllBusinessObjectsForPictogramElement(pe);

only returns the primary BO.

I managed to save both BOs to file, but on moving/deleting only the primary one gets edited.

How could this be done? -Thank you very much.
Re: Multiple DomainObjects per Pictogram [message #1705551 is a reply to message #1705218] Mon, 17 August 2015 13:08 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1894
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Anton,

the information about which pictogram element is linked to which domain
object needs to be maintained by you using the link(...) method on the
feature. Do you call that for each of the domain objects?

Michael
Re: Multiple DomainObjects per Pictogram [message #1705566 is a reply to message #1705551] Mon, 17 August 2015 14:23 Go to previous messageGo to next message
Anton Huck is currently offline Anton HuckFriend
Messages: 3
Registered: August 2015
Junior Member
Thank you for your reply,

exactly that was my mistake - although I called link() right, the FeatureProvider couldn't find the match for the other BO. I had to create an extra AddFeature.

What's the best practice here? - Calling link() with all BusinessObjects combined in a List once and use only one AddFeature or better separate the AddFeatures?
Re: Multiple DomainObjects per Pictogram [message #1705952 is a reply to message #1705566] Thu, 20 August 2015 11:43 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1894
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Anton,

I would rather go for seperate AddFeatures in general.

Michael
Previous Topic:Controlling selection of invisible rectangle
Next Topic:How suitable is Graphiti for a visual expression builder?
Goto Forum:
  


Current Time: Sat Jul 21 11:07:51 GMT 2018

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

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

Back to the top