Package com.iizigo.editor
Class PartExtensionIZ
java.lang.Object
com.iizigo.editor.PartExtensionIZ
- All Implemented Interfaces:
IPartExtensionIZ,org.eclipse.ui.IPartListener,org.eclipse.ui.IWindowListener
public class PartExtensionIZ extends Object implements IPartExtensionIZ, org.eclipse.ui.IPartListener, org.eclipse.ui.IWindowListener
Extensions framework for part in IZ.
- Author:
- Christopher Mindus
Constructor Summary
ConstructorsConstructorDescriptionThe constructor.PartExtensionIZ(org.eclipse.ui.IViewPart part, IWorkbenchPartIZ izPart) The constructor.Method Summary
Modifier and TypeMethodDescriptionvoidaddPartListener(org.eclipse.ui.IPartListener listener) Adds a part listener.voidcreateActivationListener(org.eclipse.swt.widgets.Composite mainComposite, IActivationListener activationListener, MultiSelectionProvider multiSelectionProvider) Creates the part and window activation listeners.voiddispose()Disposes of all part listeners.org.eclipse.ui.IActionBarsGets the action bars (different for View and Editor).org.eclipse.ui.IPartListener[]Gets the part listeners.Gets the workbench part.booleanChecks if the part is disposed of.voidCalled when the UI has been initialized fully to verify if the part is active, and if so triggers an extra activation in Async SWT.voidpartActivated(org.eclipse.ui.IWorkbenchPart p) voidpartBroughtToTop(org.eclipse.ui.IWorkbenchPart p) voidpartClosed(org.eclipse.ui.IWorkbenchPart p) voidpartDeactivated(org.eclipse.ui.IWorkbenchPart p) voidpartOpened(org.eclipse.ui.IWorkbenchPart p) static voidqueueUpdateActionBars(org.eclipse.ui.IActionBars actionBars) Adds an action bar for updates later.voidremovePartListener(org.eclipse.ui.IPartListener listener) Removes a part listener.booleanRestores the last focus.static voidupdateActionBars(org.eclipse.ui.IActionBars actionBars) Updates an action bar now, removing it from the queue of action bars to update.voidwindowActivated(org.eclipse.ui.IWorkbenchWindow window) voidwindowClosed(org.eclipse.ui.IWorkbenchWindow window) voidwindowDeactivated(org.eclipse.ui.IWorkbenchWindow window) voidwindowOpened(org.eclipse.ui.IWorkbenchWindow window)
Constructor Details
PartExtensionIZ
The constructor.- Parameters:
part- An editor part who's part is implementing IWorkenchPartIZ.
PartExtensionIZ
The constructor.- Parameters:
part- A view part who's part is implementing IWorkenchPartIZ.izPart- The view part (same as "part") who's part is implementing IWorkenchPartIZ.
Method Details
queueUpdateActionBars
public static void queueUpdateActionBars(org.eclipse.ui.IActionBars actionBars) Adds an action bar for updates later.updateActionBars
public static void updateActionBars(org.eclipse.ui.IActionBars actionBars) Updates an action bar now, removing it from the queue of action bars to update.getWorkbenchPart
Gets the workbench part.- Specified by:
getWorkbenchPartin interfaceIPartExtensionIZ
getActionBars
public org.eclipse.ui.IActionBars getActionBars()Gets the action bars (different for View and Editor).- Specified by:
getActionBarsin interfaceIPartExtensionIZ
isDisposed
public boolean isDisposed()Checks if the part is disposed of.- Specified by:
isDisposedin interfaceIPartExtensionIZ
dispose
public void dispose()Disposes of all part listeners.addPartListener
public void addPartListener(org.eclipse.ui.IPartListener listener) Adds a part listener. Part that added as listeners in this method are called with the dispose method if they are instances of:- RetargetAction
- Specified by:
addPartListenerin interfaceIPartExtensionIZ
getPartListeners
public org.eclipse.ui.IPartListener[] getPartListeners()Gets the part listeners. The return value is cached and very efficient in terms of memory allocation.- Specified by:
getPartListenersin interfaceIPartExtensionIZ
removePartListener
public void removePartListener(org.eclipse.ui.IPartListener listener) Removes a part listener.- Specified by:
removePartListenerin interfaceIPartExtensionIZ
onInitializedUI
public void onInitializedUI()Called when the UI has been initialized fully to verify if the part is active, and if so triggers an extra activation in Async SWT.createActivationListener
public void createActivationListener(org.eclipse.swt.widgets.Composite mainComposite, IActivationListener activationListener, MultiSelectionProvider multiSelectionProvider) Creates the part and window activation listeners. This method can be called twice, one without the mainComposte (i.e. null) and a second time when the composite is defined.- Parameters:
mainComposite- The parts main composite.activationListener- The part listener.multiSelectionProvider- The multi-selection listener, can be null.
partActivated
public void partActivated(org.eclipse.ui.IWorkbenchPart p) - Specified by:
partActivatedin interfaceorg.eclipse.ui.IPartListener
partBroughtToTop
public void partBroughtToTop(org.eclipse.ui.IWorkbenchPart p) - Specified by:
partBroughtToTopin interfaceorg.eclipse.ui.IPartListener
partClosed
public void partClosed(org.eclipse.ui.IWorkbenchPart p) - Specified by:
partClosedin interfaceorg.eclipse.ui.IPartListener
partDeactivated
public void partDeactivated(org.eclipse.ui.IWorkbenchPart p) - Specified by:
partDeactivatedin interfaceorg.eclipse.ui.IPartListener
partOpened
public void partOpened(org.eclipse.ui.IWorkbenchPart p) - Specified by:
partOpenedin interfaceorg.eclipse.ui.IPartListener
windowActivated
public void windowActivated(org.eclipse.ui.IWorkbenchWindow window) - Specified by:
windowActivatedin interfaceorg.eclipse.ui.IWindowListener
windowDeactivated
public void windowDeactivated(org.eclipse.ui.IWorkbenchWindow window) - Specified by:
windowDeactivatedin interfaceorg.eclipse.ui.IWindowListener
windowClosed
public void windowClosed(org.eclipse.ui.IWorkbenchWindow window) - Specified by:
windowClosedin interfaceorg.eclipse.ui.IWindowListener
windowOpened
public void windowOpened(org.eclipse.ui.IWorkbenchWindow window) - Specified by:
windowOpenedin interfaceorg.eclipse.ui.IWindowListener
restoreLastFocus
public boolean restoreLastFocus()Restores the last focus.- Returns:
- false if it failed, control is "no longer" or none is ever focused, true for success.