How can I add Items to a compartment dynamic per Java code [message #233714] |
Mon, 15 June 2009 13:56 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03863 seconds