1 11 package org.eclipse.ui; 12 13 import org.eclipse.core.runtime.IAdaptable; 14 import org.eclipse.core.runtime.dynamichelpers.IExtensionTracker; 15 import org.eclipse.jface.util.IPropertyChangeListener; 16 import org.eclipse.ui.internal.ICompatibleWorkbenchPage; 17 import org.eclipse.ui.presentations.IStackPresentationSite; 18 19 45 public interface IWorkbenchPage extends IPartService, ISelectionService, 46 ICompatibleWorkbenchPage { 47 58 public static final String EDITOR_ID_ATTR = "org.eclipse.ui.editorID"; 60 65 public static final String CHANGE_RESET = "reset"; 67 74 public static final String CHANGE_RESET_COMPLETE = "resetComplete"; 76 81 public static final String CHANGE_VIEW_SHOW = "viewShow"; 83 88 public static final String CHANGE_VIEW_HIDE = "viewHide"; 90 95 public static final String CHANGE_EDITOR_OPEN = "editorOpen"; 97 102 public static final String CHANGE_EDITOR_CLOSE = "editorClose"; 104 109 public static final String CHANGE_EDITOR_AREA_SHOW = "editorAreaShow"; 111 116 public static final String CHANGE_EDITOR_AREA_HIDE = "editorAreaHide"; 118 123 public static final String CHANGE_ACTION_SET_SHOW = "actionSetShow"; 125 130 public static final String CHANGE_ACTION_SET_HIDE = "actionSetHide"; 132 137 public static final String CHANGE_FAST_VIEW_ADD = "fastViewAdd"; 139 144 public static final String CHANGE_FAST_VIEW_REMOVE = "fastViewRemove"; 146 151 public static final String CHANGE_WORKING_SET_REPLACE = "workingSetReplace"; 153 159 public static final String CHANGE_WORKING_SETS_REPLACE = "workingSetsReplace"; 161 168 public static final int VIEW_ACTIVATE = 1; 169 170 177 public static final int VIEW_VISIBLE = 2; 178 179 187 public static final int VIEW_CREATE = 3; 188 189 195 public static final int MATCH_NONE = 0; 196 197 203 public static final int MATCH_INPUT = 1; 204 205 211 public static final int MATCH_ID = 2; 212 213 218 public static final int STATE_MINIMIZED = IStackPresentationSite.STATE_MINIMIZED; 219 220 226 public static final int STATE_MAXIMIZED = IStackPresentationSite.STATE_MAXIMIZED; 227 228 234 public static final int STATE_RESTORED = IStackPresentationSite.STATE_RESTORED; 235 236 243 public void activate(IWorkbenchPart part); 244 245 252 public void addPropertyChangeListener(IPropertyChangeListener listener); 253 254 262 public void bringToTop(IWorkbenchPart part); 263 264 275 public boolean close(); 276 277 290 public boolean closeAllEditors(boolean save); 291 292 311 public boolean closeEditors(IEditorReference[] editorRefs, boolean save); 312 313 329 public boolean closeEditor(IEditorPart editor, boolean save); 330 331 339 public IViewPart findView(String viewId); 340 341 349 public IViewReference findViewReference(String viewId); 350 351 362 public IViewReference findViewReference(String viewId, String secondaryId); 363 364 373 public IEditorPart getActiveEditor(); 374 375 383 public IEditorPart findEditor(IEditorInput input); 384 385 406 public IEditorReference[] findEditors(IEditorInput input, String editorId, 407 int matchFlags); 408 409 420 public IEditorPart[] getEditors(); 421 422 431 public IEditorReference[] getEditorReferences(); 432 433 438 public IEditorPart[] getDirtyEditors(); 439 440 445 public IAdaptable getInput(); 446 447 453 public String getLabel(); 454 455 463 public IPerspectiveDescriptor getPerspective(); 464 465 474 public IViewReference[] getViewReferences(); 475 476 487 public IViewPart[] getViews(); 488 489 494 public IWorkbenchWindow getWorkbenchWindow(); 495 496 503 public IWorkingSet getWorkingSet(); 504 505 518 public void hideActionSet(String actionSetID); 519 520 526 public void hideView(IViewPart view); 527 528 535 public void hideView(IViewReference view); 536 537 544 public boolean isPartVisible(IWorkbenchPart part); 545 546 553 public boolean isEditorAreaVisible(); 554 555 563 public void reuseEditor(IReusableEditor editor, IEditorInput input); 564 565 594 public IEditorPart openEditor(IEditorInput input, String editorId) 595 throws PartInitException; 596 597 621 public IEditorPart openEditor(IEditorInput input, String editorId, 622 boolean activate) throws PartInitException; 623 624 655 public IEditorPart openEditor(final IEditorInput input, 656 final String editorId, final boolean activate, final int matchFlags) 657 throws PartInitException; 658 659 666 public void removePropertyChangeListener(IPropertyChangeListener listener); 667 668 678 public void resetPerspective(); 679 680 699 public boolean saveAllEditors(boolean confirm); 700 701 721 public boolean saveEditor(IEditorPart editor, boolean confirm); 722 723 728 public void savePerspective(); 729 730 739 public void savePerspectiveAs(IPerspectiveDescriptor perspective); 740 741 748 public void setEditorAreaVisible(boolean showEditorArea); 749 750 783 public void setPerspective(IPerspectiveDescriptor perspective); 784 785 798 public void showActionSet(String actionSetID); 799 800 811 public IViewPart showView(String viewId) throws PartInitException; 812 813 843 public IViewPart showView(String viewId, String secondaryId, int mode) 844 throws PartInitException; 845 846 854 public boolean isEditorPinned(IEditorPart editor); 855 856 863 public int getEditorReuseThreshold(); 864 865 874 public void setEditorReuseThreshold(int openEditors); 875 876 885 public INavigationHistory getNavigationHistory(); 886 887 897 IViewPart[] getViewStack(IViewPart part); 898 899 907 public String [] getNewWizardShortcuts(); 908 909 917 public String [] getPerspectiveShortcuts(); 918 919 927 public String [] getShowViewShortcuts(); 928 929 936 public IPerspectiveDescriptor[] getOpenPerspectives(); 937 938 945 public IPerspectiveDescriptor[] getSortedPerspectives(); 946 947 963 public void closePerspective(IPerspectiveDescriptor desc, 964 boolean saveParts, boolean closePage); 965 966 978 public void closeAllPerspectives(boolean saveEditors, boolean closePage); 979 980 996 public IExtensionTracker getExtensionTracker(); 997 998 1008 public IWorkingSet[] getWorkingSets(); 1009 1010 1019 public void setWorkingSets(IWorkingSet[] sets); 1020 1021 1073 public IWorkingSet getAggregateWorkingSet(); 1074 1075 1082 public boolean isPageZoomed(); 1083 1084 1090 public void zoomOut(); 1091 1092 1100 public void toggleZoom(IWorkbenchPartReference ref); 1101 1102 1111 public int getPartState(IWorkbenchPartReference ref); 1112 1113 1123 public void setPartState(IWorkbenchPartReference ref, int state); 1124 1125 1135 public IWorkbenchPartReference getReference(IWorkbenchPart part); 1136} 1137 | Popular Tags |