TPTP 4.2.0 Platform Project
Public API Specification

org.eclipse.tptp.trace.ui.provisional.control.provider
Class AbstractControlProvider

java.lang.Object
  extended byorg.eclipse.tptp.trace.ui.provisional.control.provider.AbstractControlProvider
All Implemented Interfaces:
IControlProvider
Direct Known Subclasses:
LogicalItemControlProvider

public abstract class AbstractControlProvider
extends java.lang.Object
implements IControlProvider

An abstract class that provides minimum functionality for control providers. Contributors can extends this class or provide a direct implementation of IControlProvider.


Nested Class Summary
static class AbstractControlProvider.ControlItemAdapter
          An adapter from an IAction to a IControlItem
 
Field Summary
protected  java.util.List controlItems
          Stores the control items
protected  org.eclipse.jface.viewers.StructuredSelection input
          Stores the current input
protected  boolean isContextDifferent
          A flag that indicates if the context has changed (this can happen if for example the profiling monitor is closed and re-opend)
protected  boolean isInputDifferent
          A flag which indicates that the input has changed
 
Constructor Summary
AbstractControlProvider()
          Default constructor
 
Method Summary
protected  void addControlItem(IControlItem item)
          Add 'item' to the list of control items maintained by this class.
 IControlItem[] createControlItems()
          Creates and returns the control items of this provider.
 void initialize(java.lang.String entity)
          This method is invoked once to give the control provider a chance to initialize.
protected abstract  void initializeControlItems()
          Populates the control items managed by this control provider.
 void setInput(org.eclipse.jface.viewers.StructuredSelection input)
          Invoked to set the current input that should be used as the context of this provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isInputDifferent

protected boolean isInputDifferent
A flag which indicates that the input has changed


isContextDifferent

protected boolean isContextDifferent
A flag that indicates if the context has changed (this can happen if for example the profiling monitor is closed and re-opend)


controlItems

protected java.util.List controlItems
Stores the control items


input

protected org.eclipse.jface.viewers.StructuredSelection input
Stores the current input

Constructor Detail

AbstractControlProvider

public AbstractControlProvider()
Default constructor

Method Detail

initialize

public void initialize(java.lang.String entity)
Description copied from interface: IControlProvider
This method is invoked once to give the control provider a chance to initialize.

Specified by:
initialize in interface IControlProvider
Parameters:
entity - The entity that this control provider is affiliated with
See Also:
IControlProvider.initialize(String)

setInput

public void setInput(org.eclipse.jface.viewers.StructuredSelection input)
Description copied from interface: IControlProvider
Invoked to set the current input that should be used as the context of this provider.

Specified by:
setInput in interface IControlProvider
Parameters:
input - The input
See Also:
IControlProvider.setInput(StructuredSelection)

createControlItems

public IControlItem[] createControlItems()
Description copied from interface: IControlProvider
Creates and returns the control items of this provider. The control items are used to create UI entities such as menu items or toolbar items.

Specified by:
createControlItems in interface IControlProvider
Returns:
The control items of this provider
See Also:
IControlProvider.createControlItems()

initializeControlItems

protected abstract void initializeControlItems()
Populates the control items managed by this control provider. A control item can be added by invoking addControlItem(IControlItem)


addControlItem

protected void addControlItem(IControlItem item)
Add 'item' to the list of control items maintained by this class. The item must not be null

Parameters:
item - The item to add

TPTP 4.2.0 Platform Project
Public API Specification