use of org.eclipse.sirius.diagram.ui.business.api.query.NodeQuery in project InformationSystem by ObeoNetwork.
the class RequirementsServices method isBorderedNode.
/**
* Checks whether a DNode is a bordered node
* @param semanticDecorator
* @return
*/
private boolean isBorderedNode(DSemanticDecorator semanticDecorator) {
if (semanticDecorator instanceof DNode) {
Collection<EObject> inverseReferences = new EObjectQuery((DNode) semanticDecorator).getInverseReferences(org.eclipse.gmf.runtime.notation.NotationPackage.Literals.VIEW__ELEMENT);
Iterator<EObject> iterator = inverseReferences.iterator();
if (iterator.hasNext()) {
EObject next = iterator.next();
if (next instanceof Node) {
return new NodeQuery((Node) next).isBorderedNode();
}
}
}
return false;
}
Aggregations