Java Code Examples for org.eclipse.gmf.runtime.notation.Edge#getSource()
The following examples show how to use
org.eclipse.gmf.runtime.notation.Edge#getSource() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConnectorViewPasteOperation.java From statecharts with Eclipse Public License 1.0 | 6 votes |
public void paste() throws Exception { //basically delay... connectorView = (Edge) getEObject(); sourceView = connectorView.getSource(); targetView = connectorView.getTarget(); EObject element = connectorView.getElement(); if (element != null) { if (element.eIsProxy()) { element = ClipboardSupportUtil.resolve(element, getParentPasteProcess().getLoadedIDToEObjectMapCopy()); } if (element.eIsProxy() == false) { pasteSemanticElement = true; } } }
Example 2
Source File: WorkflowCanonicalEditPolicy.java From scava with Eclipse Public License 2.0 | 5 votes |
/** * @generated */ private Collection<IAdaptable> refreshConnections() { Domain2Notation domain2NotationMap = new Domain2Notation(); Collection<CrossflowLinkDescriptor> linkDescriptors = collectAllLinks(getDiagram(), domain2NotationMap); Collection existingLinks = new LinkedList(getDiagram().getEdges()); for (Iterator linksIterator = existingLinks.iterator(); linksIterator.hasNext();) { Edge nextDiagramLink = (Edge) linksIterator.next(); int diagramLinkVisualID = CrossflowVisualIDRegistry.getVisualID(nextDiagramLink); if (diagramLinkVisualID == -1) { if (nextDiagramLink.getSource() != null && nextDiagramLink.getTarget() != null) { linksIterator.remove(); } continue; } EObject diagramLinkObject = nextDiagramLink.getElement(); EObject diagramLinkSrc = nextDiagramLink.getSource().getElement(); EObject diagramLinkDst = nextDiagramLink.getTarget().getElement(); for (Iterator<CrossflowLinkDescriptor> linkDescriptorsIterator = linkDescriptors .iterator(); linkDescriptorsIterator.hasNext();) { CrossflowLinkDescriptor nextLinkDescriptor = linkDescriptorsIterator.next(); if (diagramLinkObject == nextLinkDescriptor.getModelElement() && diagramLinkSrc == nextLinkDescriptor.getSource() && diagramLinkDst == nextLinkDescriptor.getDestination() && diagramLinkVisualID == nextLinkDescriptor.getVisualID()) { linksIterator.remove(); linkDescriptorsIterator.remove(); break; } } } deleteViews(existingLinks.iterator()); return createConnections(linkDescriptors, domain2NotationMap); }
Example 3
Source File: CrossflowNavigatorContentProvider.java From scava with Eclipse Public License 2.0 | 5 votes |
/** * @generated */ private Collection<View> getLinksSourceByType(Collection<Edge> edges, String type) { LinkedList<View> result = new LinkedList<View>(); for (Edge nextEdge : edges) { View nextEdgeSource = nextEdge.getSource(); if (type.equals(nextEdgeSource.getType()) && isOwnView(nextEdgeSource)) { result.add(nextEdgeSource); } } return result; }
Example 4
Source File: MainProcessCanonicalEditPolicy.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ private Collection<IAdaptable> refreshConnections() { Domain2Notation domain2NotationMap = new Domain2Notation(); Collection<ProcessLinkDescriptor> linkDescriptors = collectAllLinks(getDiagram(), domain2NotationMap); Collection existingLinks = new LinkedList(getDiagram().getEdges()); for (Iterator linksIterator = existingLinks.iterator(); linksIterator.hasNext();) { Edge nextDiagramLink = (Edge) linksIterator.next(); int diagramLinkVisualID = ProcessVisualIDRegistry.getVisualID(nextDiagramLink); if (diagramLinkVisualID == -1) { if (nextDiagramLink.getSource() != null && nextDiagramLink.getTarget() != null) { linksIterator.remove(); } continue; } EObject diagramLinkObject = nextDiagramLink.getElement(); EObject diagramLinkSrc = nextDiagramLink.getSource().getElement(); EObject diagramLinkDst = nextDiagramLink.getTarget().getElement(); for (Iterator<ProcessLinkDescriptor> linkDescriptorsIterator = linkDescriptors .iterator(); linkDescriptorsIterator.hasNext();) { ProcessLinkDescriptor nextLinkDescriptor = linkDescriptorsIterator.next(); if (diagramLinkObject == nextLinkDescriptor.getModelElement() && diagramLinkSrc == nextLinkDescriptor.getSource() && diagramLinkDst == nextLinkDescriptor.getDestination() && diagramLinkVisualID == nextLinkDescriptor.getVisualID()) { linksIterator.remove(); linkDescriptorsIterator.remove(); break; } } } deleteViews(existingLinks.iterator()); return createConnections(linkDescriptors, domain2NotationMap); }