Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How can I add Items to a compartment dynamic per Java code
How can I add Items to a compartment dynamic per Java code [message #233714] Mon, 15 June 2009 13:56
Eclipse UserFriend
Originally posted by: ralph.schreder.gmx.de

Hi,
when my special ListCompartment is created, I want to add items to it. I
tried it in the method createFigure by

MyNodeCompartmentEditPart.java:

public IFigure createFigure() {
ResizableCompartmentFigure result = (ResizableCompartmentFigure)
super.createFigure();
result.setTitleVisibility(false);


BusinessAttribute model = IsfFactory.eINSTANCE.createBusinessAttribute();
NodeImpl node = (NodeImpl)this.getModel();
EObject elem = node.getElement();
BusinessEntity p = (BusinessEntity)elem;
p.getAttributeList().add(model);
EditPart subEditPart =
getViewer().getEditPartFactory().createEditPart(this, model);
this.addChildVisual(subEditPart, this.getChildren().size());


return result;
}

I receive an exception.
Has anybody an idea?

Thanks,
Ralph
Previous Topic:How to integrate "DiagramActionBarContributor" into "MultiPageEditorActionBarContribu
Next Topic:add .xpt template
Goto Forum:
  


Current Time: Fri Apr 26 11:21:21 GMT 2024

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

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

Back to the top