public class AnalysisView extends java.lang.Object implements IAnalysisView, IStateListener
actions
. It provides an easy way for
sub-classes to fill and update the parent AnalysisToolComposite's action
ToolBar and any context (right-click) Menu that is tied to the same actions
as the ToolBar. Classes extending this should override any methods here to
provide a more fine-tuned analysis perspective.createViewContent(Composite)
, you should call the super
method to initialize the container Composite. Otherwise, you need to either
initialize the container Composite yourself, or use a different container and
override getComposite()
.Constructor and Description |
---|
AnalysisView(DataSource dataSource)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
createViewContent(org.eclipse.swt.widgets.Composite container)
Fills out the parent Composite with information and widgets related to
this particular IAnalysisView.
|
void |
dispose()
Disposes of any resources unique to this IAnalysisView.
|
org.eclipse.swt.widgets.Composite |
getComposite()
Gets the root Composite for this IAnalysisView.
|
java.lang.String |
getDescription()
Gets a brief description of this type of analysis view.
|
java.lang.String |
getName()
Gets the name for this type of analysis view.
|
void |
getToolBarContributions(org.eclipse.swt.widgets.ToolBar toolBar)
Populates the specified ToolBar with ToolItems used to manipulate this
IAnalysisView.
|
void |
registerKeys()
Registers any keys of interest with the current broker.
|
void |
setBroker(StateBroker broker)
Sets the broker used by this IAnalysisView.
|
void |
setData(java.lang.String key,
java.lang.Object value)
Each IAnalysisView typically requires some sort of data to display.
|
void |
setSelectionProvider(org.eclipse.jface.viewers.ISelectionProvider selectionProvider)
Sets the ISelectionProvider used to display properties in the Properties
View.
|
void |
unregisterKeys()
Unregisters any keys from the current broker.
|
void |
update(java.lang.String key,
java.lang.Object value)
This is called by the broker when a key of interest has changed.
|
public AnalysisView(DataSource dataSource)
dataSource
- The data source associated with this view (input, reference,
comparison).public void createViewContent(org.eclipse.swt.widgets.Composite container)
createViewContent
in interface IAnalysisView
container
- The Composite containing this IAnalysisView.public java.lang.String getName()
getName
in interface IAnalysisView
public java.lang.String getDescription()
getDescription
in interface IAnalysisView
public org.eclipse.swt.widgets.Composite getComposite()
getComposite
in interface IAnalysisView
public void getToolBarContributions(org.eclipse.swt.widgets.ToolBar toolBar)
getToolBarContributions
in interface IAnalysisView
toolBar
- The ToolBar to fill with ToolItems.public void setData(java.lang.String key, java.lang.Object value)
setData
in interface IAnalysisView
key
- The key for the data object.value
- The data object.public void dispose()
dispose
in interface IAnalysisView
public void setSelectionProvider(org.eclipse.jface.viewers.ISelectionProvider selectionProvider)
setSelectionProvider
in interface IAnalysisView
selectionProvider
- The new ISelectionProvider used by this IAnalysisView.public void setBroker(StateBroker broker)
setBroker
in interface IStateListener
broker
- The new StateBroker to register with and listen to.public void registerKeys()
registerKeys
in interface IStateListener
public void unregisterKeys()
unregisterKeys
in interface IStateListener
public void update(java.lang.String key, java.lang.Object value)
update
in interface IStateListener
key
- The key of the changed value.value
- The new value.