use of org.talend.designer.business.model.business.diagram.part.BusinessDiagramEditor in project tdi-studio-se by Talend.
the class DiagramModelService method refreshBusinessModel.
public void refreshBusinessModel(IEditorReference editors) {
IEditorPart editor = editors.getEditor(true);
if (editor instanceof BusinessDiagramEditor) {
BusinessDiagramEditor businessDiagramEditor = (BusinessDiagramEditor) editor;
businessDiagramEditor.refresh();
}
}
use of org.talend.designer.business.model.business.diagram.part.BusinessDiagramEditor in project tdi-studio-se by Talend.
the class DiagramModelService method handleNewEditorAction.
public void handleNewEditorAction(IWorkbenchPart editor) {
if (editor instanceof BusinessDiagramEditor) {
BusinessDiagramEditor diagrmEditor = (BusinessDiagramEditor) editor;
if (diagrmEditor.isAlreadyOpened()) {
IEditorReference[] ref = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findEditors(diagrmEditor.getEditorInput(), diagrmEditor.getEditorID(), IWorkbenchPage.MATCH_INPUT);
IEditorPart editorPart = ref[0].getEditor(false);
editorPart.doSave(new NullProgressMonitor());
((BusinessDiagramEditor) editorPart).setKeepPropertyLocked(true);
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeEditor(editorPart, false);
}
}
}
Aggregations