Class WorkbenchWindowControlContribution

java.lang.Object
org.eclipse.jface.action.ContributionItem
org.eclipse.jface.action.ControlContribution
org.eclipse.ui.internal.menus.InternalControlContribution
org.eclipse.ui.menus.WorkbenchWindowControlContribution
All Implemented Interfaces:
IContributionItem

public abstract class WorkbenchWindowControlContribution extends org.eclipse.ui.internal.menus.InternalControlContribution
Abstract base class from which all controls contributions to the workbench through the 'org.eclipse.ui.menus' extension point must derive.

The extends the ControlContribution by adding accessor methods that provide extra state information about the placement of the control:

  • getWorkbenchWindow() - indicates which workbench window this control is being hosted by
  • getCurSide() - indicates which side of the workbench window the control is being displayed on
Since:
3.3
See Also:
  • Constructor Details

    • WorkbenchWindowControlContribution

      public WorkbenchWindowControlContribution()
      Default contstructor that allows the use of this class as the basis for XML contributions and will be used by the workbench implementation. This is public only by necessity and should not be used outside of the workbench implemenation code.
    • WorkbenchWindowControlContribution

      public WorkbenchWindowControlContribution(String id)
      Constructor for use by clients programmatically creating control contributions in the workbench.
      Parameters:
      id - The id of this contribution
  • Method Details

    • getWorkbenchWindow

      public final IWorkbenchWindow getWorkbenchWindow()
      Overrides:
      getWorkbenchWindow in class org.eclipse.ui.internal.menus.InternalControlContribution
      Returns:
      Returns the workbench window currently hosting the control.
    • getCurSide

      public final int getCurSide()
      Overrides:
      getCurSide in class org.eclipse.ui.internal.menus.InternalControlContribution
      Returns:
      Returns the side of the workbench window that the control is currently being display on. This allows derivatives to tailor their created control based on the orientation...
    • getOrientation

      public final int getOrientation()
      Overrides:
      getOrientation in class org.eclipse.ui.internal.menus.InternalControlContribution
    • delegateCreateControl

      public Control delegateCreateControl(Composite parent)
      Important: This method is *NOT* to be used/extended by clients. This is for the internal use inside Workbench
      Parameters:
      parent - the parent composite
      Returns:
      newly created Control
      Since:
      3.6
      Restriction:
      This method is not intended to be referenced by clients.
      Restriction:
      This method is not intended to be re-implemented or extended by clients.