Java Doc for IWorkbench.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » ui workbench » org.eclipse.ui 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.eclipse.ui.IWorkbench

All known Subclasses:   org.eclipse.ui.internal.Workbench,
IWorkbench
public interface IWorkbench extends IAdaptable,IServiceLocator(Code)
A workbench is the root object for the Eclipse Platform user interface.

A workbench has one or more main windows which present to the end user information based on some underlying model, typically on resources in an underlying workspace. A workbench usually starts with a single open window, and automatically closes when its last window closes.

Each workbench window has a collection of pages; the active page is the one that is being presented to the end user; at most one page is active in a window at a time.

Each workbench page has a collection of workbench parts, of which there are two kinds: views and editors. A page's parts are arranged (tiled or stacked) for presentation on the screen. The arrangement is not fixed; the user can arrange the parts as they see fit. A perspective is a template for a page, capturing a collection of parts and their arrangement.

The platform creates a workbench when the workbench plug-in is activated; since this happens at most once during the life of the running platform, there is only one workbench instance. Due to its singular nature, it is commonly referred to as the workbench.

The workbench supports a few IServiceLocator services by default. If these services are used to allocate resources, it is important to remember to clean up those resources after you are done with them. Otherwise, the resources will exist until the workbench shuts down. The supported services are:

This interface is not intended to be implemented by clients.


See Also:   org.eclipse.ui.PlatformUI.getWorkbench




Method Summary
public  voidaddWindowListener(IWindowListener listener)
     Adds a window listener.
public  voidaddWorkbenchListener(IWorkbenchListener listener)
     Adds a workbench listener.
public  booleanclose()
     Closes this workbench and all its open windows.
public  ILocalWorkingSetManagercreateLocalWorkingSetManager()
     Creates a new local working set manager.
public  IWorkbenchWindowgetActiveWorkbenchWindow()
     Returns the currently active window for this workbench (if any).
 IWorkbenchActivitySupportgetActivitySupport()
     Returns an interface to manage activities at the workbench level.
public  IWorkbenchBrowserSupportgetBrowserSupport()
     Return the browser support for this workbench.
 IWorkbenchCommandSupportgetCommandSupport()
     Returns an interface to manage commands at the workbench level.
 IWorkbenchContextSupportgetContextSupport()
     Returns an interface to manage contexts at the workbench level.
public  IDecoratorManagergetDecoratorManager()
     Returns the decorator manager.

Any client using the decorator manager should come up with the text and image for the element (including any of the part's own decorations) before calling the decorator manager.

public  DisplaygetDisplay()
     Returns the display for this workbench.
public  IEditorRegistrygetEditorRegistry()
     Returns the editor registry for the workbench.
public  IElementFactorygetElementFactory(String factoryId)
     Returns the element factory with the given id.
public  IWizardRegistrygetExportWizardRegistry()
     Return the export wizard registry.
public  IExtensionTrackergetExtensionTracker()
    

Return the extension tracker for the workbench.

public  IWorkbenchHelpSystemgetHelpSystem()
     Return the help system for this workbench.
public  IWizardRegistrygetImportWizardRegistry()
     Return the import wizard registry.
public  IIntroManagergetIntroManager()
     Return the intro manager for this workbench. the intro manager for this workbench.
public  IWizardRegistrygetNewWizardRegistry()
     Return the new wizard registry.
public  IWorkbenchOperationSupportgetOperationSupport()
    

Returns the undoable operation support for the workbench.

public  IPerspectiveRegistrygetPerspectiveRegistry()
     Returns the perspective registry for the workbench.
public  PreferenceManagergetPreferenceManager()
     Returns the preference manager for the workbench.
public  IPreferenceStoregetPreferenceStore()
     Returns the preference store for the workbench.
public  IProgressServicegetProgressService()
     Returns the progress service for the workbench.
public  ISharedImagesgetSharedImages()
     Returns the shared images for the workbench.
public  IThemeManagergetThemeManager()
     Return the theme manager for this workbench.
public  IViewRegistrygetViewRegistry()
     Returns the view registry for the workbench.
public  intgetWorkbenchWindowCount()
     Returns the number of open main windows associated with this workbench.
public  IWorkbenchWindow[]getWorkbenchWindows()
     Returns a list of the open main windows associated with this workbench.
public  IWorkingSetManagergetWorkingSetManager()
     Returns the working set manager for the workbench.
public  booleanisClosing()
     Returns a boolean indicating whether the workbench is in the process of closing.
public  IWorkbenchWindowopenWorkbenchWindow(String perspectiveId, IAdaptable input)
     Creates and opens a new workbench window with one page.
public  IWorkbenchWindowopenWorkbenchWindow(IAdaptable input)
     Creates and opens a new workbench window with one page.
public  voidremoveWindowListener(IWindowListener listener)
     Removes a window listener.
public  voidremoveWorkbenchListener(IWorkbenchListener listener)
     Removes a workbench listener.
public  booleanrestart()
     Closes then restarts this workbench.
public  booleansaveAll(IShellProvider shellProvider, IRunnableContext runnableContext, ISaveableFilter filter, boolean confirm)
     Save all dirty saveables in the workbench that match the given filter. Opens a dialog to prompt the user if confirm is true. Return true if successful.
public  booleansaveAllEditors(boolean confirm)
     Save all dirty editors in the workbench.
public  IWorkbenchPageshowPerspective(String perspectiveId, IWorkbenchWindow window)
     Shows the specified perspective to the user.
public  IWorkbenchPageshowPerspective(String perspectiveId, IWorkbenchWindow window, IAdaptable input)
     Shows the specified perspective to the user.



Method Detail
addWindowListener
public void addWindowListener(IWindowListener listener)(Code)
Adds a window listener.
Parameters:
  listener - the window listener to add
since:
   2.0



addWorkbenchListener
public void addWorkbenchListener(IWorkbenchListener listener)(Code)
Adds a workbench listener.
Parameters:
  listener - the workbench listener to add
since:
   3.2



close
public boolean close()(Code)
Closes this workbench and all its open windows.

If the workbench has an open editor with unsaved content, the user will be given the opportunity to save it.

true if the workbench was successfully closed, andfalse if it is still open



createLocalWorkingSetManager
public ILocalWorkingSetManager createLocalWorkingSetManager()(Code)
Creates a new local working set manager. Clients of local working set managers are responsible for calling IWorkingSetManager.dispose when the working sets it manages are no longer needed. the local working set manager
since:
   3.1



getActiveWorkbenchWindow
public IWorkbenchWindow getActiveWorkbenchWindow()(Code)
Returns the currently active window for this workbench (if any). Returns null if there is no active workbench window. Returns null if called from a non-UI thread. the active workbench window, or null if there isno active workbench window or if called from a non-UI thread



getActivitySupport
IWorkbenchActivitySupport getActivitySupport()(Code)
Returns an interface to manage activities at the workbench level. an interface to manage activities at the workbench level.Guaranteed not to be null.
since:
   3.0



getBrowserSupport
public IWorkbenchBrowserSupport getBrowserSupport()(Code)
Return the browser support for this workbench. the browser support system
since:
   3.1



getCommandSupport
IWorkbenchCommandSupport getCommandSupport()(Code)
Returns an interface to manage commands at the workbench level. an interface to manage commands at the workbench level.Guaranteed not to be null.
since:
   3.0IServiceLocator.getService(Class)
See Also:   ICommandService
See Also:   IHandlerService



getContextSupport
IWorkbenchContextSupport getContextSupport()(Code)
Returns an interface to manage contexts at the workbench level. an interface to manage contexts at the workbench level.Guaranteed not to be null.
since:
   3.0IServiceLocator.getService(Class)
See Also:   IContextService



getDecoratorManager
public IDecoratorManager getDecoratorManager()(Code)
Returns the decorator manager.

Any client using the decorator manager should come up with the text and image for the element (including any of the part's own decorations) before calling the decorator manager. It should also add a listener to be notified when decorations change.

Note that if the element implements IAdaptable, decorators may use this mechanism to obtain an adapter (for example an IResource), and derive the decoration from the adapter rather than the element. Since the adapter may differ from the original element, those using the decorator manager should be prepared to handle notification that the decoration for the adapter has changed, in addition to handling notification that the decoration for the element has changed. That is, it needs to be able to map back from the adapter to the element.

the decorator manager



getDisplay
public Display getDisplay()(Code)
Returns the display for this workbench.

Code should always ask the workbench for the display rather than rely on Display.getDefault Display.getDefault() .

the display to be used for all UI interactions with thisworkbench
since:
   3.0



getEditorRegistry
public IEditorRegistry getEditorRegistry()(Code)
Returns the editor registry for the workbench. the workbench editor registry



getElementFactory
public IElementFactory getElementFactory(String factoryId)(Code)
Returns the element factory with the given id.
Parameters:
  factoryId - the id of the element factory the element factory, or null if none
See Also:   IElementFactory
since:
   3.0



getExportWizardRegistry
public IWizardRegistry getExportWizardRegistry()(Code)
Return the export wizard registry. the export wizard registry
since:
   3.1



getExtensionTracker
public IExtensionTracker getExtensionTracker()(Code)

Return the extension tracker for the workbench. This tracker may be used by plug-ins to ensure responsiveness to changes to the plug-in registry.

The tracker at this level of the workbench is typically used to track elements that persist for the life of the workbench. For example, IEditorDescriptor objects fall into this category.

the extension tracker
See Also:   IWorkbenchWindow.getExtensionTracker
See Also:   IWorkbenchPage.getExtensionTracker
since:
   3.1



getHelpSystem
public IWorkbenchHelpSystem getHelpSystem()(Code)
Return the help system for this workbench. the help system
since:
   3.1



getImportWizardRegistry
public IWizardRegistry getImportWizardRegistry()(Code)
Return the import wizard registry. the import wizard registry
since:
   3.1



getIntroManager
public IIntroManager getIntroManager()(Code)
Return the intro manager for this workbench. the intro manager for this workbench. Guaranteed not to benull.
since:
   3.0



getNewWizardRegistry
public IWizardRegistry getNewWizardRegistry()(Code)
Return the new wizard registry. the new wizard registry
since:
   3.1



getOperationSupport
public IWorkbenchOperationSupport getOperationSupport()(Code)

Returns the undoable operation support for the workbench.

the workbench operation support
since:
   3.1



getPerspectiveRegistry
public IPerspectiveRegistry getPerspectiveRegistry()(Code)
Returns the perspective registry for the workbench. the workbench perspective registry



getPreferenceManager
public PreferenceManager getPreferenceManager()(Code)
Returns the preference manager for the workbench. the workbench preference manager



getPreferenceStore
public IPreferenceStore getPreferenceStore()(Code)
Returns the preference store for the workbench. the workbench preference store
since:
   2.0PlatformUI.getPreferenceStore



getProgressService
public IProgressService getProgressService()(Code)
Returns the progress service for the workbench. the progress service
since:
   3.0



getSharedImages
public ISharedImages getSharedImages()(Code)
Returns the shared images for the workbench. the shared image manager



getThemeManager
public IThemeManager getThemeManager()(Code)
Return the theme manager for this workbench. the theme manager for this workbench.Guaranteed not to benull.
since:
   3.0



getViewRegistry
public IViewRegistry getViewRegistry()(Code)
Returns the view registry for the workbench. the workbench view registry
since:
   3.1



getWorkbenchWindowCount
public int getWorkbenchWindowCount()(Code)
Returns the number of open main windows associated with this workbench. Note that wizards and dialogs are not included in this list since they are not considered main windows. the number of open windows
since:
   3.0



getWorkbenchWindows
public IWorkbenchWindow[] getWorkbenchWindows()(Code)
Returns a list of the open main windows associated with this workbench. Note that wizards and dialogs are not included in this list since they are not considered main windows. a list of open windows



getWorkingSetManager
public IWorkingSetManager getWorkingSetManager()(Code)
Returns the working set manager for the workbench. the working set manager
since:
   2.0



isClosing
public boolean isClosing()(Code)
Returns a boolean indicating whether the workbench is in the process of closing. true if the workbench is in the process ofclosing, false otherwise
since:
   3.1



openWorkbenchWindow
public IWorkbenchWindow openWorkbenchWindow(String perspectiveId, IAdaptable input) throws WorkbenchException(Code)
Creates and opens a new workbench window with one page. The perspective of the new page is defined by the specified perspective ID. The new window and new page become active.

Note: The caller is responsible to ensure the action using this method will explicitly inform the user a new window will be opened. Otherwise, callers are strongly recommended to use the openPerspective APIs to programmatically show a perspective to avoid confusing the user.

In most cases where this method is used the caller is tightly coupled to a particular perspective. They define it in the registry and contribute some user interface action to open or activate it. In situations like this a static variable is often used to identify the perspective ID.


Parameters:
  perspectiveId - the perspective id for the window's initial page, ornull for no initial page
Parameters:
  input - the page input, or null if there is no currentinput. This is used to seed the input for the new page'sviews. the new workbench window
exception:
  WorkbenchException - if a new window and page could not be opened
See Also:   IWorkbench.showPerspective(StringIWorkbenchWindowIAdaptable)



openWorkbenchWindow
public IWorkbenchWindow openWorkbenchWindow(IAdaptable input) throws WorkbenchException(Code)
Creates and opens a new workbench window with one page. The perspective of the new page is defined by the default perspective ID. The new window and new page become active.

Note: The caller is responsible to ensure the action using this method will explicitly inform the user a new window will be opened. Otherwise, callers are strongly recommended to use the openPerspective APIs to programmatically show a perspective to avoid confusing the user.


Parameters:
  input - the page input, or null if there is no currentinput. This is used to seed the input for the new page'sviews. the new workbench window
exception:
  WorkbenchException - if a new window and page could not be opened
See Also:   IWorkbench.showPerspective(StringIWorkbenchWindowIAdaptable)



removeWindowListener
public void removeWindowListener(IWindowListener listener)(Code)
Removes a window listener.
Parameters:
  listener - the window listener to remove
since:
   2.0



removeWorkbenchListener
public void removeWorkbenchListener(IWorkbenchListener listener)(Code)
Removes a workbench listener.
Parameters:
  listener - the workbench listener to remove
since:
   3.2



restart
public boolean restart()(Code)
Closes then restarts this workbench.

If the workbench has an open editor with unsaved content, the user will be given the opportunity to save it.

true if the workbench was successfully closed, andfalse if it could not be closed
since:
   2.0



saveAll
public boolean saveAll(IShellProvider shellProvider, IRunnableContext runnableContext, ISaveableFilter filter, boolean confirm)(Code)
Save all dirty saveables in the workbench that match the given filter. Opens a dialog to prompt the user if confirm is true. Return true if successful. Return false if the user has canceled the command.
since:
   3.3
Parameters:
  shellProvider - the provider used to obtain a shell in prompting isrequired. Clients can use a workbench window for this.
Parameters:
  runnableContext - a runnable context that will be used to provide aprogress monitor while the save is taking place. Clients canuse a workbench window for this.
Parameters:
  filter - the filter used to determine if a particular dirty saveableneeds to be saved or null if all dirtysaveables should be saved.
Parameters:
  confirm - true to ask the user before saving unsavedchanges (recommended), and false to saveunsaved changes without asking true if the command succeeded, andfalse if the operation was canceled by the user oran error occurred while saving



saveAllEditors
public boolean saveAllEditors(boolean confirm)(Code)
Save all dirty editors in the workbench. Opens a dialog to prompt the user if confirm is true. Return true if successful. Return false if the user has canceled the command.
Parameters:
  confirm - true to ask the user before saving unsavedchanges (recommended), and false to saveunsaved changes without asking true if the command succeeded, andfalse if the operation was canceled by the user oran error occurred while saving



showPerspective
public IWorkbenchPage showPerspective(String perspectiveId, IWorkbenchWindow window) throws WorkbenchException(Code)
Shows the specified perspective to the user. The caller should use this method when the perspective to be shown is not dependent on the page's input. That is, the perspective can open in any page depending on user preferences.

The perspective may be shown in the specified window, in another existing window, or in a new window depending on user preferences. The exact policy is controlled by the workbench to ensure consistency to the user. The policy is subject to change. The current policy is as follows:

  • If the specified window has the requested perspective open, then the window is given focus and the perspective is shown. The page's input is ignored.
  • If another window that has the workspace root as input and the requested perspective open and active, then the window is given focus.
  • Otherwise the requested perspective is opened and shown in the specified window or in a new window depending on the current user preference for opening perspectives, and that window is given focus.

The workbench also defines a number of menu items to activate or open each registered perspective. A complete list of these perspectives is available from the perspective registry found on IWorkbench.


Parameters:
  perspectiveId - the perspective ID to show
Parameters:
  window - the workbench window of the action calling this method. the workbench page that the perspective was shown
exception:
  WorkbenchException - if the perspective could not be shown
since:
   2.0



showPerspective
public IWorkbenchPage showPerspective(String perspectiveId, IWorkbenchWindow window, IAdaptable input) throws WorkbenchException(Code)
Shows the specified perspective to the user. The caller should use this method when the perspective to be shown is dependent on the page's input. That is, the perspective can only open in any page with the specified input.

The perspective may be shown in the specified window, in another existing window, or in a new window depending on user preferences. The exact policy is controlled by the workbench to ensure consistency to the user. The policy is subject to change. The current policy is as follows:

  • If the specified window has the requested perspective open and the same requested input, then the window is given focus and the perspective is shown.
  • If another window has the requested input and the requested perspective open and active, then that window is given focus.
  • If the specified window has the same requested input but not the requested perspective, then the window is given focus and the perspective is opened and shown on condition that the user preference is not to open perspectives in a new window.
  • Otherwise the requested perspective is opened and shown in a new window, and the window is given focus.

The workbench also defines a number of menu items to activate or open each registered perspective. A complete list of these perspectives is available from the perspective registry found on IWorkbench.


Parameters:
  perspectiveId - the perspective ID to show
Parameters:
  window - the workbench window of the action calling this method.
Parameters:
  input - the page input, or null if there is no currentinput. This is used to seed the input for the page's views the workbench page that the perspective was shown
exception:
  WorkbenchException - if the perspective could not be shown
since:
   2.0



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.