private boolean firstTime = true;
public EditPart createEditPart(EditPart context, Object model) {
if (firstTime && model instanceof ProcessDefinition) {
firstTime = false;
EditPart rootEditPart = new OutlineRootTreeEditPart();
rootEditPart.setModel(model);
return rootEditPart;
}
GraphElement element = (GraphElement) model;
if (element instanceof Variable) {
return new VariableTreeEditPart((Variable) element);