use of org.eclipse.sirius.diagram.ui.tools.api.editor.DDiagramEditor in project InformationSystem by ObeoNetwork.
the class Activator method refreshDecorationsOnSession.
private void refreshDecorationsOnSession(final Session session, boolean forceRefresh) {
if (!forceRefresh) {
// Fail fast the decoration is disabled
if (!ObjectWithRequirement.isDecoratorEnabled()) {
return;
}
}
IEditingSession uiSession = SessionUIManager.INSTANCE.getUISession(session);
// We look for open diagram editors to refresh the diagrams
if (uiSession != null) {
Collection<ISiriusEditor> editors = uiSession.getSiriusEditors();
for (ISiriusEditor siriusEditor : editors) {
if (siriusEditor instanceof DDiagramEditor) {
DDiagramEditor diagramEditor = (DDiagramEditor) siriusEditor;
DRepresentation representation = diagramEditor.getRepresentation();
if (representation instanceof DSemanticDiagram) {
DSemanticDiagram diagram = (DSemanticDiagram) representation;
refreshDecorationsOnDiagram(diagram, session);
}
}
}
}
}
Aggregations