public abstract class ElementChangeListenerContribution extends OutlineContribution
IElementChangeEvent
s.Constructor and Description |
---|
ElementChangeListenerContribution() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addElementChangeListener(IElementChangeListener listener)
Registers the given element change listener with the underlying model.
|
protected boolean |
affects(IElementChangeEvent event,
java.lang.Object inputElement)
Returns whether the given event affects the outline's input element.
|
protected boolean |
affects(IElementDelta delta,
IElement element)
Returns whether the given delta affects the given element.
|
void |
dispose()
Disposes of this contribution.
|
protected abstract void |
elementChanged(IElementChangeEvent event)
Notifies that the outline page is affected in some way
by the given element change event.
|
protected IContentAdapter |
getContentAdapter()
Returns the installed content adapter, or a
NullContentAdapter
if none. |
void |
init(ICommonOutlinePage outlinePage)
Initializes this contribution.
|
protected abstract void |
removeElementChangeListener(IElementChangeListener listener)
Removes the given element change listener from the underlying model.
|
getOutlinePage
public void init(ICommonOutlinePage outlinePage)
OutlineContribution
This method may be extended by subclasses. Subclasses must call the superclass implementation.
init
in interface IOutlineContribution
init
in class OutlineContribution
outlinePage
- the contribution's outline page
(never null
)public void dispose()
OutlineContribution
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.
dispose
in interface IOutlineContribution
dispose
in class OutlineContribution
protected boolean affects(IElementChangeEvent event, java.lang.Object inputElement)
event
- never null
inputElement
- may be null
true
if the given event affects the outline's
input element, false
otherwiseprotected boolean affects(IElementDelta delta, IElement element)
delta
- never null
element
- never null
true
if the given delta affects the given element,
false
otherwiseprotected abstract void addElementChangeListener(IElementChangeListener listener)
listener
- never null
protected abstract void removeElementChangeListener(IElementChangeListener listener)
listener
- never null
protected abstract void elementChanged(IElementChangeEvent 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.
event
- never null
protected IContentAdapter getContentAdapter()
NullContentAdapter
if none.IContentAdapter
(never null
)