import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.undo.WorkspaceUndoUtil;
+import org.eclipse.ui.part.EditorPart;
import org.eclipse.ui.progress.IProgressService;
import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
import org.eclipse.ui.themes.ITheme;
/** Constant <code>statusLineManager</code> */
protected static IStatusLineManager statusLineManager;
+
+ /**
+ * <p>closeAll</p>
+ *
+ * @return a boolean.
+ */
+ public static boolean closeAll() {
+ return getActivePage().closeAllEditors(true);
+ }
+
+ /**
+ * Close the given editor.
+ *
+ * @param editor The <tt>MultipageTaxonEditor</tt> to close.
+ * @return <tt>true</tt> on success
+ */
+ public static boolean close(EditorPart editor) {
+ return getActivePage().closeEditor(editor, true);
+ }
+
/**
* <p>getShell</p>
*
*/
public static IViewPart showView(String id){
try {
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(id);
+ return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(id, null, IWorkbenchPage.VIEW_VISIBLE);
} catch (PartInitException e) {
error(AbstractUtility.class, "Could not open view: " + id, e);
throw new RuntimeException(e);
}
return null;
}
-
- /**
- * <p>closeAll</p>
- *
- * @return a boolean.
- */
- public static boolean closeAll() {
- return getActivePage().closeAllEditors(true);
- }
/**
* <p>getService</p>