/* * (non-Javadoc) * * @see * org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser#getSemanticElementsBeingParsed * (org.eclipse.emf.ecore.EObject) */ public List<?> getSemanticElementsBeingParsed(EObject element) { List<Element> semanticElementsBeingParsed = new ArrayList<Element>(); if (element instanceof ObjectFlow) { ObjectFlow flow = (ObjectFlow) element; semanticElementsBeingParsed.add(flow); if (flow.getTarget() instanceof DecisionNode) { DecisionNode decision = (DecisionNode) flow.getTarget(); semanticElementsBeingParsed.add(decision); } } return semanticElementsBeingParsed; }
/** @generated */ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { if (!canExecute()) { throw new ExecutionException("Invalid arguments in create link command"); // $NON-NLS-1$ } ObjectFlow newElement = UMLFactory.eINSTANCE.createObjectFlow(); getContainer().getEdges().add(newElement); newElement.setSource(getSource()); newElement.setTarget(getTarget()); ElementInitializers.getInstance().init_ObjectFlow_4003(newElement); doConfigure(newElement, monitor, info); ((CreateElementRequest) getRequest()).setNewElement(newElement); return CommandResult.newOKCommandResult(newElement); }