org.eclipse.handly.ui.outline

## Class OutlineActionContribution

- java.lang.Object
- - org.eclipse.handly.ui.outline.OutlineContribution
  - - org.eclipse.handly.ui.outline.OutlineActionContribution

- All Implemented Interfaces:
    IOutlineContribution
  Direct Known Subclasses:
    CollapseAllActionContribution, ExpandAllActionContribution, ToggleActionContribution

      public abstract class OutlineActionContribution
      extends OutlineContribution

  An abstract base class for outline action contributions.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OutlineActionContribution()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `contribute(org.eclipse.jface.action.ActionContributionItem item, org.eclipse.jface.action.IContributionManager manager)` Contributes the given action contribution item to the given manager.
    `protected abstract org.eclipse.jface.action.IAction` | `createAction()` Returns a new action that is to be contributed to the outline page.
    `void` | `dispose()` Disposes of this contribution.
    `protected void` | `disposeAction(org.eclipse.jface.action.IAction action)` Disposes of the contributed action.
    `protected org.eclipse.jface.action.IContributionManager` | `getContributionManager()` Returns the manager that is to be used for contributing the action to the outline page.
    `void` | `init(ICommonOutlinePage outlinePage)` Initializes this contribution.

    - ### Methods inherited from class org.eclipse.handly.ui.outline.OutlineContribution

      `getOutlinePage`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### OutlineActionContribution

          public OutlineActionContribution()

  - ### Method Detail

    - #### init

          public void init(ICommonOutlinePage outlinePage)

      Description copied from class: `OutlineContribution`
      Initializes this contribution. This method is called after the outline page's tree viewer has been created.

      This method may be extended by subclasses. Subclasses must call the superclass implementation.

      Specified by:
        `init` in interface `IOutlineContribution`
      Overrides:
        `init` in class `OutlineContribution`
      Parameters:
        `outlinePage` - the contribution's outline page (never `null`)

    - #### dispose

          public void dispose()

      Description copied from class: `OutlineContribution`
      Disposes of this contribution. Implementors should clean up any resources associated with this contribution. Note that there is no guarantee that `init()` has been called. This method has no effect if this contribution has already been disposed.

      This method may be extended by subclasses. Subclasses must call the superclass implementation.

      Specified by:
        `dispose` in interface `IOutlineContribution`
      Overrides:
        `dispose` in class `OutlineContribution`

    - #### createAction

          protected abstract org.eclipse.jface.action.IAction createAction()

      Returns a new action that is to be contributed to the outline page.
      Returns:
        the created action, or `null`

    - #### disposeAction

          protected void disposeAction(org.eclipse.jface.action.IAction action)

      Disposes of the contributed action.

      Default implementation does nothing. Subclasses may override.

      Parameters:
        `action` - the action to dispose (never `null`)

    - #### getContributionManager

          protected org.eclipse.jface.action.IContributionManager getContributionManager()

      Returns the manager that is to be used for contributing the action to the outline page.

      Default implementation returns the outline page's toolbar manager. Subclasses may override.

      Returns:
        the contribution manager (not `null`)

    - #### contribute

          protected void contribute(org.eclipse.jface.action.ActionContributionItem item,
                                    org.eclipse.jface.action.IContributionManager manager)

      Contributes the given action contribution item to the given manager.

      Default implementation calls `manager.add(item)`. Subclasses may override.

      Parameters:
        `item` - never `null`
        `manager` - never `null`

Copyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0