private void closeEditor(IWorkbenchPage page, IEditorPart editor) { IModelElement modelElement = EditorUtility.getEditorInputModelElement(editor, false); if (modelElement != null) { IEnvironment environment = EnvironmentManager.getEnvironment(modelElement); if (environment != null && !environment.isLocal()) { page.closeEditor(editor, false); } } }
public boolean isLocal() { initialize(); return environment != null ? environment.isLocal() : false; }