protected Command createAddCommand(EditPart child) { Activity activity = (Activity) child.getModel(); EditPartViewer viewer = getHost().getViewer(); AddCommand add = new AddCommand(activity.getDiagram().getTextEditor(), viewer); add.setParent((StructuredActivity) getHost().getModel()); add.setChild(activity); return add; }
@Override protected Command getConnectionCreateCommand(CreateConnectionRequest request) { int style = ((Integer) request.getNewObjectType()).intValue(); Activity source = getActivity(); NextConnectionCreateCommand cmd = new NextConnectionCreateCommand(source.getDiagram().getTextEditor(), style); cmd.setSource(source); request.setStartCommand(cmd); return cmd; }
public void getChildrenFromXml(List<Activity> list, IDOMElement input, Activity parent) { if (input.getLocalName().equals(IntSyslogSchemaConstants.ELEM_INBOUND_CHANNEL_ADAPTER)) { InboundChannelAdapterModelElement adapter = new InboundChannelAdapterModelElement(input, parent.getDiagram()); list.add(adapter); } }