Package org.eclipse.handly.ui.outline

## Class ResourceChangeListenerContribution

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

- All Implemented Interfaces:
    `IOutlineContribution`
  Direct Known Subclasses:
    `ProblemMarkerListenerContribution`

      public abstract class ResourceChangeListenerContribution
      extends OutlineContribution

  An abstract base class for outline contributions listening to `IResourceChangeEvent`s.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ResourceChangeListenerContribution()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected abstract boolean` | `affects​(org.eclipse.core.resources.IResourceChangeEvent event, java.lang.Object inputElement)` | Returns whether the given resource change event affects the outline's input element.
    `void` | `dispose()` | Disposes of this contribution.
    `void` | `init​(ICommonOutlinePage outlinePage)` | Initializes this contribution.
    `protected abstract void` | `resourceChanged​(org.eclipse.core.resources.IResourceChangeEvent event)` | Notifies that the outline page is affected in some way by the given resource change event.

    - ### 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

    - #### ResourceChangeListenerContribution

          public ResourceChangeListenerContribution()

  - ### Method Detail

    - #### init

          public void init​(ICommonOutlinePage outlinePage)

      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.

      `ResourceChangeListenerContribution` extends this method to register a resource change listener that invokes `resourceChanged(IResourceChangeEvent)` if the resource change event `affects` the outline's input element.

      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`

    - #### affects

          protected abstract boolean affects​(org.eclipse.core.resources.IResourceChangeEvent event,
                                             java.lang.Object inputElement)

      Returns whether the given resource change event affects the outline's input element.
      Parameters:
        `event` - never `null`
        `inputElement` - never `null`
      Returns:
        `true` if the given resource change event affects the outline's input element, and `false` otherwise

    - #### resourceChanged

          protected abstract void resourceChanged​(org.eclipse.core.resources.IResourceChangeEvent event)

      Notifies that the outline page is affected in some way by the given resource change event.

      Note: This method may be called in any thread. The event object (and the delta within it) is valid only for the duration of the invocation of this method.

      Parameters:
        `event` - never `null`