Skip to main content



      Home
Home » Modeling » Graphiti » Multiple DomainObjects per Pictogram
Multiple DomainObjects per Pictogram [message #1705218] Wed, 12 August 2015 17:46 Go to next message
Eclipse UserFriend
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 09:08 Go to previous messageGo to next message
Eclipse UserFriend
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 10:23 Go to previous messageGo to next message
Eclipse UserFriend
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 07:43 Go to previous message
Eclipse UserFriend
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: Mon May 19 05:47:26 EDT 2025

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

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

Back to the top