Java Doc for WorkbenchAdvisor.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » application » 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.application 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.ui.application.WorkbenchAdvisor

WorkbenchAdvisor
abstract public class WorkbenchAdvisor (Code)
Public base class for configuring the workbench.

Note that the workbench advisor object is created in advance of creating the workbench. However, by the time the workbench starts calling methods on this class, PlatformUI.getWorkbench is guaranteed to have been properly initialized.

Example of creating and running a workbench (in an IPlatformRunnable):

 
 public class MyApplication implements IPlatformRunnable {
 public Object run(Object args) {
 WorkbenchAdvisor workbenchAdvisor = new MyWorkbenchAdvisor();
 Display display = PlatformUI.createDisplay();
 int returnCode = PlatformUI.createAndRunWorkbench(display, workbenchAdvisor);
 if (returnCode == PlatformUI.RETURN_RESTART) {
 return IPlatformRunnable.EXIT_RESTART;
 } else {
 return IPlatformRunnable.EXIT_OK;
 }
 }
 
 

An application should declare a subclass of WorkbenchAdvisor and override methods to configure the workbench to suit the needs of the particular application.

The following advisor methods are called at strategic points in the workbench's lifecycle (all occur within the dynamic scope of the call to PlatformUI.createAndRunWorkbench PlatformUI.createAndRunWorkbench ):

  • initialize - called first; before any windows; use to register things
  • preStartup - called second; after initialize but before first window is opened; use to temporarily disable things during startup or restore
  • postStartup - called third; after first window is opened; use to reenable things temporarily disabled in previous step
  • postRestore - called after the workbench and its windows has been recreated from a previously saved state; use to adjust the restored workbench
  • preWindowOpen - called as each window is being opened; use to configure aspects of the window other than actions bars
  • fillActionBars - called after preWindowOpen to configure a window's action bars
  • postWindowRestore - called after a window has been recreated from a previously saved state; use to adjust the restored window
  • postWindowCreate - called after a window has been created, either from an initial state or from a restored state; used to adjust the window
  • openIntro - called immediately before a window is opened in order to create the introduction component, if any.
  • postWindowOpen - called after a window has been opened; use to hook window listeners, etc.
  • preWindowShellClose - called when a window's shell is closed by the user; use to pre-screen window closings
  • eventLoopException - called to handle the case where the event loop has crashed; use to inform the user that things are not well
  • eventLoopIdle - called when there are currently no more events to be processed; use to perform other work or to yield until new events enter the queue
  • preShutdown - called immediately prior to workbench shutdown before any windows have been closed; allows the advisor to veto the shutdown
  • postShutdown - called last; after event loop has terminated and all windows have been closed; use to deregister things registered during initialize


since:
   3.0


Field Summary
final public static  intFILL_COOL_BAR
     Bit flag for WorkbenchAdvisor.fillActionBars fillActionBars indicating that the operation is supposed to fill (or describe) the workbench window's cool bar.
final public static  intFILL_MENU_BAR
     Bit flag for WorkbenchAdvisor.fillActionBars fillActionBars indicating that the operation is supposed to fill (or describe) the workbench window's menu bar.
final public static  intFILL_PROXY
     Bit flag for WorkbenchAdvisor.fillActionBars fillActionBars indicating that the operation is not filling the action bars of an actual workbench window, but rather a proxy (used for perspective customization).
final public static  intFILL_STATUS_LINE
     Bit flag for WorkbenchAdvisor.fillActionBars fillActionBars indicating that the operation is supposed to fill (or describe) the workbench window's status line.

Constructor Summary
protected  WorkbenchAdvisor()
     Creates and initializes a new workbench advisor instance.

Method Summary
public  voidcreateWindowContents(IWorkbenchWindowConfigurer configurer, Shell shell)
     Creates the contents of the window.

The default implementation adds a menu bar, a cool bar, a status line, a perspective bar, and a fast view bar.

public  WorkbenchWindowAdvisorcreateWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer)
     Creates a new workbench window advisor for configuring a new workbench window via the given workbench window configurer.
public  voideventLoopException(Throwable exception)
     Performs arbitrary actions when the event loop crashes (the code that handles a UI event throws an exception that is not caught).

This method is called when the code handling a UI event throws an exception.

public  voideventLoopIdle(Display display)
     Performs arbitrary work or yields when there are no events to be processed.

This method is called when there are currently no more events on the queue to be processed at the moment.

Clients must not call this method directly (although super calls are okay).

public  voidfillActionBars(IWorkbenchWindow window, IActionBarConfigurer configurer, int flags)
     Configures the action bars using the given action bar configurer.
public  IAdaptablegetDefaultPageInput()
     Returns the default input for newly created workbench pages when the input is not explicitly specified.

The default implementation returns null.

abstract public  StringgetInitialWindowPerspectiveId()
     Returns the id of the perspective to use for the initial workbench window, or null if no initial perspective should be shown in the initial workbench window.

This method is called during startup when the workbench is creating the first new window.

public  StringgetMainPreferencePageId()
     Returns the id of the preference page that should be presented most prominently.

The default implementation returns null.

protected  IWorkbenchConfigurergetWorkbenchConfigurer()
     Returns the workbench configurer for the advisor.
public  AbstractStatusHandlergetWorkbenchErrorHandler()
     Returns the workbench error handler for the advisor.
public  voidinitialize(IWorkbenchConfigurer configurer)
     Performs arbitrary initialization before the workbench starts running.

This method is called during workbench initialization prior to any windows being opened.

final public  voidinternalBasicInitialize(IWorkbenchConfigurer configurer)
     Remembers the configurer and calls initialize.
public  booleanisApplicationMenu(IWorkbenchWindowConfigurer configurer, String menuId)
     Returns whether the menu with the given id is an application menu of the given window.
public  voidopenIntro(IWorkbenchWindowConfigurer configurer)
     Opens the introduction componenet.

Clients must not call this method directly (although super calls are okay).

public  booleanopenWindows()
     Opens the workbench windows on startup.
public  voidpostShutdown()
     Performs arbitrary finalization after the workbench stops running.

This method is called during workbench shutdown after all windows have been closed.

public  voidpostStartup()
     Performs arbitrary actions after the workbench windows have been opened (or restored), but before the main event loop is run.

This method is called just after the windows have been opened.

public  voidpostWindowClose(IWorkbenchWindowConfigurer configurer)
     Performs arbitrary actions after the given workbench window is closed.

This method is called after the window's controls have been disposed. Clients must not call this method directly (although super calls are okay).

public  voidpostWindowCreate(IWorkbenchWindowConfigurer configurer)
     Performs arbitrary actions after the given workbench window has been created (possibly after being restored), but has not yet been opened.

This method is called after a new window has been created from scratch, or when a previously-saved window has been restored.

public  voidpostWindowOpen(IWorkbenchWindowConfigurer configurer)
     Performs arbitrary actions after the given workbench window has been opened (possibly after being restored).

This method is called after a window has been opened.

public  voidpostWindowRestore(IWorkbenchWindowConfigurer configurer)
     Performs arbitrary actions after the given workbench window has been restored, but before it is opened.

This method is called after a previously-saved window have been recreated.

public  booleanpreShutdown()
     Performs arbitrary finalization before the workbench is about to shut down.

This method is called immediately prior to workbench shutdown before any windows have been closed.

public  voidpreStartup()
     Performs arbitrary actions just before the first workbench window is opened (or restored).

This method is called after the workbench has been initialized and just before the first window is about to be opened.

public  voidpreWindowOpen(IWorkbenchWindowConfigurer configurer)
     Performs arbitrary actions before the given workbench window is opened.

This method is called before the window's controls have been created. Clients must not call this method directly (although super calls are okay).

public  booleanpreWindowShellClose(IWorkbenchWindowConfigurer configurer)
     Performs arbitrary actions as the given workbench window's shell is being closed directly, and possibly veto the close.

This method is called from a ShellListener associated with the workbench window.

public  IStatusrestoreState(IMemento memento)
     Restores arbitrary application-specific state information for this workbench advisor.

The default implementation simply returns an OK status.

public  IStatussaveState(IMemento memento)
     Saves arbitrary application-specific state information for this workbench advisor.

The default implementation simply returns an OK status.


Field Detail
FILL_COOL_BAR
final public static int FILL_COOL_BAR(Code)
Bit flag for WorkbenchAdvisor.fillActionBars fillActionBars indicating that the operation is supposed to fill (or describe) the workbench window's cool bar. ActionBarAdvisor.FILL_COOL_BAR instead



FILL_MENU_BAR
final public static int FILL_MENU_BAR(Code)
Bit flag for WorkbenchAdvisor.fillActionBars fillActionBars indicating that the operation is supposed to fill (or describe) the workbench window's menu bar. ActionBarAdvisor.FILL_MENU_BAR instead



FILL_PROXY
final public static int FILL_PROXY(Code)
Bit flag for WorkbenchAdvisor.fillActionBars fillActionBars indicating that the operation is not filling the action bars of an actual workbench window, but rather a proxy (used for perspective customization). ActionBarAdvisor.FILL_PROXY instead



FILL_STATUS_LINE
final public static int FILL_STATUS_LINE(Code)
Bit flag for WorkbenchAdvisor.fillActionBars fillActionBars indicating that the operation is supposed to fill (or describe) the workbench window's status line. ActionBarAdvisor.FILL_STATUS_LINE instead




Constructor Detail
WorkbenchAdvisor
protected WorkbenchAdvisor()(Code)
Creates and initializes a new workbench advisor instance.




Method Detail
createWindowContents
public void createWindowContents(IWorkbenchWindowConfigurer configurer, Shell shell)(Code)
Creates the contents of the window.

The default implementation adds a menu bar, a cool bar, a status line, a perspective bar, and a fast view bar. The visibility of these controls can be configured using the setShow* methods on IWorkbenchWindowConfigurer.

Subclasses may override to define custom window contents and layout, but must call IWorkbenchWindowConfigurer.createPageComposite.


Parameters:
  configurer - the window configurer
Parameters:
  shell - the window's shell
See Also:   IWorkbenchWindowConfigurer.createMenuBar
See Also:   IWorkbenchWindowConfigurer.createCoolBarControl
See Also:   IWorkbenchWindowConfigurer.createStatusLineControl
See Also:   IWorkbenchWindowConfigurer.createPageCompositeWorkbenchWindowAdvisor.createWindowContents(Shell)
See Also:   WorkbenchAdvisor.createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer)



createWorkbenchWindowAdvisor
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer)(Code)
Creates a new workbench window advisor for configuring a new workbench window via the given workbench window configurer. Clients should override to provide their own window configurer. This method replaces all the other window and action bar lifecycle methods on the workbench advisor.

The default implementation creates a window advisor that calls back to the legacy window and action bar lifecycle methods on the workbench advisor, for backwards compatibility with 3.0.


Parameters:
  configurer - the workbench window configurer a new workbench window advisor
since:
   3.1



eventLoopException
public void eventLoopException(Throwable exception)(Code)
Performs arbitrary actions when the event loop crashes (the code that handles a UI event throws an exception that is not caught).

This method is called when the code handling a UI event throws an exception. In a perfectly functioning application, this method would never be called. In practice, it comes into play when there are bugs in the code that trigger unchecked runtime exceptions. It is also activated when the system runs short of memory, etc. Fatal errors (ThreadDeath) are not passed on to this method, as there is nothing that could be done.

Clients must not call this method directly (although super calls are okay). The default implementation logs the problem so that it does not go unnoticed. Subclasses may override or extend this method. It is generally a bad idea to override with an empty method, and you should be especially careful when handling Errors.


Parameters:
  exception - the uncaught exception that was thrown inside the UI eventloop



eventLoopIdle
public void eventLoopIdle(Display display)(Code)
Performs arbitrary work or yields when there are no events to be processed.

This method is called when there are currently no more events on the queue to be processed at the moment.

Clients must not call this method directly (although super calls are okay). The default implementation yields until new events enter the queue. Subclasses may override or extend this method. It is generally a bad idea to override with an empty method. It is okay to call IWorkbench.close() from this method.


Parameters:
  display - the main display of the workbench UI



fillActionBars
public void fillActionBars(IWorkbenchWindow window, IActionBarConfigurer configurer, int flags)(Code)
Configures the action bars using the given action bar configurer. Under normal circumstances, flags does not include FILL_PROXY, meaning this is a request to fill the actions\ bars of the given workbench window; the remaining flags indicate which combination of the menu bar (FILL_MENU_BAR), the tool bar (FILL_COOL_BAR), and the status line (FILL_STATUS_LINE) are to be filled.

If flags does include FILL_PROXY, then this is a request to describe the actions bars of the given workbench window (which will already have been filled); again, the remaining flags indicate which combination of the menu bar, the tool bar, and the status line are to be described. The actions included in the proxy action bars can be the same instances as in the actual window's action bars. Calling ActionFactory to create new action instances is not recommended, because these actions internally register listeners with the window and there is no opportunity to dispose of these actions.

This method is called just after WorkbenchAdvisor.preWindowOpen preWindowOpen . Clients must not call this method directly (although super calls are okay). The default implementation does nothing. Subclasses may override.


Parameters:
  window - the workbench window
Parameters:
  configurer - the action bar configurer object
Parameters:
  flags - bit mask composed from the constantsWorkbenchAdvisor.FILL_MENU_BAR FILL_MENU_BAR,WorkbenchAdvisor.FILL_COOL_BAR FILL_COOL_BAR,WorkbenchAdvisor.FILL_STATUS_LINE FILL_STATUS_LINE, andWorkbenchAdvisor.FILL_PROXY FILL_PROXY Note: should 1st param beIWorkbenchWindowConfigurer to be more consistent with othermethods? Note: suggest adding ActionBuilder as API, toencapsulate the action building outside of the advisor, and tohandle the common pattern of hanging onto the action builderin order to properly handle FILL_PROXYActionBarAdvisor.fillActionBars(int)
See Also:   WorkbenchAdvisor.createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer)
See Also:   WorkbenchWindowAdvisor.createActionBarAdvisor(IActionBarConfigurer)



getDefaultPageInput
public IAdaptable getDefaultPageInput()(Code)
Returns the default input for newly created workbench pages when the input is not explicitly specified.

The default implementation returns null. Subclasses may override.

the default input for a new workbench window page, ornull if none
See Also:   WorkbenchAdvisor.createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer)



getInitialWindowPerspectiveId
abstract public String getInitialWindowPerspectiveId()(Code)
Returns the id of the perspective to use for the initial workbench window, or null if no initial perspective should be shown in the initial workbench window.

This method is called during startup when the workbench is creating the first new window. Subclasses must implement.

If the IWorkbenchPreferenceConstants.DEFAULT_PERSPECTIVE_ID preference is specified, it supercedes the perspective specified here.

the id of the perspective for the initial window, ornull if no initial perspective should be shown



getMainPreferencePageId
public String getMainPreferencePageId()(Code)
Returns the id of the preference page that should be presented most prominently.

The default implementation returns null. Subclasses may override.

the id of the preference page, or null if none



getWorkbenchConfigurer
protected IWorkbenchConfigurer getWorkbenchConfigurer()(Code)
Returns the workbench configurer for the advisor. Can be null if the advisor is not initialized yet. the workbench configurer, or null if the advisoris not initialized yet



getWorkbenchErrorHandler
public AbstractStatusHandler getWorkbenchErrorHandler()(Code)
Returns the workbench error handler for the advisor. the workbench error handler
since:
   3.3



initialize
public void initialize(IWorkbenchConfigurer configurer)(Code)
Performs arbitrary initialization before the workbench starts running.

This method is called during workbench initialization prior to any windows being opened. Clients must not call this method directly (although super calls are okay). The default implementation does nothing. Subclasses may override. Typical clients will use the configurer passed in to tweak the workbench. If further tweaking is required in the future, the configurer may be obtained using getWorkbenchConfigurer.


Parameters:
  configurer - an object for configuring the workbench



internalBasicInitialize
final public void internalBasicInitialize(IWorkbenchConfigurer configurer)(Code)
Remembers the configurer and calls initialize.

For internal use by the workbench only.


Parameters:
  configurer - an object for configuring the workbench



isApplicationMenu
public boolean isApplicationMenu(IWorkbenchWindowConfigurer configurer, String menuId)(Code)
Returns whether the menu with the given id is an application menu of the given window. This is used during OLE "in place" editing. Application menus should be preserved during menu merging. All other menus may be removed from the window.

The default implementation returns false. Subclasses may override.


Parameters:
  configurer - an object for configuring the workbench window
Parameters:
  menuId - the menu id true for application menus, and falsefor part-specific menusActionBarAdvisor.isApplicationMenu(String)
See Also:   WorkbenchWindowAdvisor.createActionBarAdvisor(IActionBarConfigurer)



openIntro
public void openIntro(IWorkbenchWindowConfigurer configurer)(Code)
Opens the introduction componenet.

Clients must not call this method directly (although super calls are okay). The default implementation opens the intro in the first window provided the preference IWorkbenchPreferences.SHOW_INTRO is true. If an intro is shown then this preference will be set to false. Subsequently, and intro will be shown only if WorkbenchConfigurer.getSaveAndRestore() returns true and the introduction was visible on last shutdown. Subclasses may override.


Parameters:
  configurer - configurer an object for configuring the particular workbenchwindow just createdWorkbenchWindowAdvisor.openIntro
See Also:   WorkbenchAdvisor.createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer)



openWindows
public boolean openWindows()(Code)
Opens the workbench windows on startup. The default implementation tries to restore the previously saved workbench state using IWorkbenchConfigurer.restoreWorkbenchState(). If there was no previously saved state, or if the restore failed, then a first-time window is opened using IWorkbenchConfigurer.openFirstTimeWindow. true to proceed with workbench startup, orfalse to exit



postShutdown
public void postShutdown()(Code)
Performs arbitrary finalization after the workbench stops running.

This method is called during workbench shutdown after all windows have been closed. Clients must not call this method directly (although super calls are okay). The default implementation does nothing. Subclasses may override.




postStartup
public void postStartup()(Code)
Performs arbitrary actions after the workbench windows have been opened (or restored), but before the main event loop is run.

This method is called just after the windows have been opened. Clients must not call this method directly (although super calls are okay). The default implementation does nothing. Subclasses may override. It is okay to call IWorkbench.close() from this method.




postWindowClose
public void postWindowClose(IWorkbenchWindowConfigurer configurer)(Code)
Performs arbitrary actions after the given workbench window is closed.

This method is called after the window's controls have been disposed. Clients must not call this method directly (although super calls are okay). The default implementation does nothing. Subclasses may override. Typical clients will use the configurer passed in to tweak the workbench window in an application-specific way.


Parameters:
  configurer - an object for configuring the particular workbench windowbeing closedWorkbenchWindowAdvisor.postWindowClose
See Also:   WorkbenchAdvisor.createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer)



postWindowCreate
public void postWindowCreate(IWorkbenchWindowConfigurer configurer)(Code)
Performs arbitrary actions after the given workbench window has been created (possibly after being restored), but has not yet been opened.

This method is called after a new window has been created from scratch, or when a previously-saved window has been restored. In the latter case, this method is called after postWindowRestore. Clients must not call this method directly (although super calls are okay). The default implementation does nothing. Subclasses may override.


Parameters:
  configurer - an object for configuring the particular workbench window justcreatedWorkbenchWindowAdvisor.postWindowCreate
See Also:   WorkbenchAdvisor.createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer)



postWindowOpen
public void postWindowOpen(IWorkbenchWindowConfigurer configurer)(Code)
Performs arbitrary actions after the given workbench window has been opened (possibly after being restored).

This method is called after a window has been opened. This method is called after a new window has been created from scratch, or when a previously-saved window has been restored. Clients must not call this method directly (although super calls are okay). The default implementation does nothing. Subclasses may override.


Parameters:
  configurer - an object for configuring the particular workbench window justopenedWorkbenchWindowAdvisor.postWindowOpen
See Also:   WorkbenchAdvisor.createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer)



postWindowRestore
public void postWindowRestore(IWorkbenchWindowConfigurer configurer) throws WorkbenchException(Code)
Performs arbitrary actions after the given workbench window has been restored, but before it is opened.

This method is called after a previously-saved window have been recreated. This method is not called when a new window is created from scratch. This method is never called when a workbench is started for the very first time, or when workbench state is not saved or restored. Clients must not call this method directly (although super calls are okay). The default implementation does nothing. Subclasses may override. It is okay to call IWorkbench.close() from this method.


Parameters:
  configurer - an object for configuring the particular workbench window justrestoredWorkbenchWindowAdvisor.postWindowRestore
See Also:   WorkbenchAdvisor.createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer)



preShutdown
public boolean preShutdown()(Code)
Performs arbitrary finalization before the workbench is about to shut down.

This method is called immediately prior to workbench shutdown before any windows have been closed. Clients must not call this method directly (although super calls are okay). The default implementation returns true. Subclasses may override.

The advisor may veto a regular shutdown by returning false, although this will be ignored if the workbench is being forced to shut down.

true to allow the workbench to proceed withshutdown, false to veto a non-forced shutdown



preStartup
public void preStartup()(Code)
Performs arbitrary actions just before the first workbench window is opened (or restored).

This method is called after the workbench has been initialized and just before the first window is about to be opened. Clients must not call this method directly (although super calls are okay). The default implementation does nothing. Subclasses may override.




preWindowOpen
public void preWindowOpen(IWorkbenchWindowConfigurer configurer)(Code)
Performs arbitrary actions before the given workbench window is opened.

This method is called before the window's controls have been created. Clients must not call this method directly (although super calls are okay). The default implementation does nothing. Subclasses may override. Typical clients will use the configurer passed in to tweak the workbench window in an application-specific way; however, filling the window's menu bar, tool bar, and status line must be done in WorkbenchAdvisor.fillActionBars fillActionBars , which is called immediately after this method is called.


Parameters:
  configurer - an object for configuring the particular workbench windowbeing openedWorkbenchWindowAdvisor.preWindowOpen
See Also:   WorkbenchAdvisor.createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer)



preWindowShellClose
public boolean preWindowShellClose(IWorkbenchWindowConfigurer configurer)(Code)
Performs arbitrary actions as the given workbench window's shell is being closed directly, and possibly veto the close.

This method is called from a ShellListener associated with the workbench window. It is not called when the window is being closed for other reasons. Clients must not call this method directly (although super calls are okay). The default implementation does nothing. Subclasses may override. Typical clients may use the configurer passed in to access the workbench window being closed. If this method returns false, then the user's request to close the shell is ignored. This gives the workbench advisor an opportunity to query the user and/or veto the closing of a window under some circumstances.


Parameters:
  configurer - an object for configuring the particular workbench windowwhose shell is being closed true to allow the window to close, andfalse to prevent the window from closing
See Also:   org.eclipse.ui.IWorkbenchWindow.closeWorkbenchWindowAdvisor.preWindowShellClose
See Also:   WorkbenchAdvisor.createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer)



restoreState
public IStatus restoreState(IMemento memento)(Code)
Restores arbitrary application-specific state information for this workbench advisor.

The default implementation simply returns an OK status. Subclasses may extend or override.


Parameters:
  memento - the memento from which to restore the advisor's state a status object indicating whether the restore was successful
since:
   3.1



saveState
public IStatus saveState(IMemento memento)(Code)
Saves arbitrary application-specific state information for this workbench advisor.

The default implementation simply returns an OK status. Subclasses may extend or override.


Parameters:
  memento - the memento in which to save the advisor's state a status object indicating whether the save was successful
since:
   3.1



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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