use of org.eclipse.sirius.components.representations.ISemanticRepresentation in project sirius-web by eclipse-sirius.
the class RepresentationService method isDangling.
@Override
public boolean isDangling(IEditingContext editingContext, IRepresentation representation) {
if (representation instanceof ISemanticRepresentation) {
ISemanticRepresentation semanticRepresentation = (ISemanticRepresentation) representation;
String targetObjectId = semanticRepresentation.getTargetObjectId();
Optional<Object> optionalObject = this.objectService.getObject(editingContext, targetObjectId);
return optionalObject.isEmpty();
}
return false;
}
Aggregations