TPTP 4.2.0 Platform Project
Public API Specification

org.eclipse.tptp.platform.analysis.core.element
Class AbstractAnalysisElement

java.lang.Object
  extended byorg.eclipse.tptp.platform.analysis.core.element.AbstractAnalysisElement
All Implemented Interfaces:
IAnalysisElement
Direct Known Subclasses:
AbstractAnalysisProvider, AbstractAnalysisResult, AbstractAnalysisRule, AnalysisProviderManager, DefaultAnalysisCategory

public abstract class AbstractAnalysisElement
extends java.lang.Object
implements IAnalysisElement


Field Summary
static java.lang.String DETAIL_PROVIDER
          The name of the extension point used to specify detail providers for a rule
 
Constructor Summary
AbstractAnalysisElement(int newElementType)
          Constructor
 
Method Summary
 void addDetailProvider(RuleDetailProvider details)
          Add a new detail provider to this element.
 void addHistoryResultSet(java.lang.String historyId)
          Add this element to the history result set
 void addOwnedElement(IAnalysisElement element)
          Add an IAnalysisElement instance to the list of owned elements
 void addOwnedElements(java.util.Collection c)
          Add a collection of IAnalysisElement instances to the list of owned elements
 void deleteHistoryResults(java.lang.String historyId)
           
 void dispose()
          This method is called when the element is about to be disposed.
 java.util.List getDetailProviders()
          This method returns a list of detail provider definitions specified for this element.
 int getElementType()
          Return the element type.
 java.util.Hashtable getExecutionHistory()
           
 java.lang.String getHelpID()
           
 java.util.List getHistoryResults(java.lang.String historyId)
          Return the analysis result for a given history
 java.lang.String getIconName()
           
 java.lang.String getId()
           
 java.lang.String getLabel()
           
 java.util.List getOwnedElements()
           
 IAnalysisElement getOwner()
           
 java.lang.String getPluginId()
           
 java.lang.String getViewerID()
           
 void preAnalyze()
          Perform any set up required before analysis starts.
 void removeHistoryResultSet(java.lang.String historyId)
          Remove the result data associated with the specified history id
 void setElementType(int elementType)
          Set the element type.
 void setHelpID(java.lang.String helpID)
          Internal use only.
 void setIconName(java.lang.String newIconName)
          Allows a custom rule to configure its own icon name
 void setId(java.lang.String id)
          Internal use only.
 void setInitializationData(org.eclipse.core.runtime.IConfigurationElement config)
           
 void setLabel(java.lang.String newLabel)
          Allows an analysis element to configure it own display label
 void setOwner(IAnalysisElement owner)
          Tell this element who its owner is.
 void setPluginId(java.lang.String pluginId)
          Used Internally.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DETAIL_PROVIDER

public static final java.lang.String DETAIL_PROVIDER
The name of the extension point used to specify detail providers for a rule

See Also:
Constant Field Values
Constructor Detail

AbstractAnalysisElement

public AbstractAnalysisElement(int newElementType)
Constructor

Method Detail

setInitializationData

public void setInitializationData(org.eclipse.core.runtime.IConfigurationElement config)

dispose

public void dispose()
This method is called when the element is about to be disposed. The element should do any required clean up at this point

Specified by:
dispose in interface IAnalysisElement

getOwner

public IAnalysisElement getOwner()
Specified by:
getOwner in interface IAnalysisElement
Returns:
The category that owns this element

setOwner

public void setOwner(IAnalysisElement owner)
Tell this element who its owner is. Used Internally

Specified by:
setOwner in interface IAnalysisElement
Parameters:
owner - The element that owns this element

getOwnedElements

public java.util.List getOwnedElements()
Specified by:
getOwnedElements in interface IAnalysisElement
Returns:
A list of IAnalysisElement instances owned by this element, null if there are no owned elements

addOwnedElement

public void addOwnedElement(IAnalysisElement element)
Add an IAnalysisElement instance to the list of owned elements

Specified by:
addOwnedElement in interface IAnalysisElement
Parameters:
element - The new element to add

addOwnedElements

public void addOwnedElements(java.util.Collection c)
Add a collection of IAnalysisElement instances to the list of owned elements

Specified by:
addOwnedElements in interface IAnalysisElement

addHistoryResultSet

public void addHistoryResultSet(java.lang.String historyId)
Add this element to the history result set

Specified by:
addHistoryResultSet in interface IAnalysisElement
Parameters:
historyId - The id of the history analysis run

removeHistoryResultSet

public void removeHistoryResultSet(java.lang.String historyId)
Remove the result data associated with the specified history id

Specified by:
removeHistoryResultSet in interface IAnalysisElement
Parameters:
historyId - The id of the history analysis run being removed

getHistoryResults

public java.util.List getHistoryResults(java.lang.String historyId)
Return the analysis result for a given history

Specified by:
getHistoryResults in interface IAnalysisElement
Parameters:
historyId - The id of the history analysis run to return
Returns:
A list of IAnalysisResult elements for the given history

deleteHistoryResults

public void deleteHistoryResults(java.lang.String historyId)

getLabel

public java.lang.String getLabel()
Specified by:
getLabel in interface IAnalysisElement
Returns:
The display name to use for this category

setLabel

public void setLabel(java.lang.String newLabel)
Allows an analysis element to configure it own display label

Specified by:
setLabel in interface IAnalysisElement
Parameters:
newLabel - The label

setIconName

public void setIconName(java.lang.String newIconName)
Allows a custom rule to configure its own icon name

Specified by:
setIconName in interface IAnalysisElement
Parameters:
newIconName - The path name of the icon to use for this rule

getIconName

public java.lang.String getIconName()
Specified by:
getIconName in interface IAnalysisElement
Returns:
The icon file name for this element

getPluginId

public final java.lang.String getPluginId()
Specified by:
getPluginId in interface IAnalysisElement
Returns:
The unique id of the plugin that defined the analysis element

setPluginId

public final void setPluginId(java.lang.String pluginId)
Used Internally. Calling this method will have no effect

Specified by:
setPluginId in interface IAnalysisElement
Parameters:
pluginId -

preAnalyze

public void preAnalyze()
Perform any set up required before analysis starts. This action happens only once (e.g. when the user clicks the "analyze" button) per analysis run

Specified by:
preAnalyze in interface IAnalysisElement

getElementType

public int getElementType()
Return the element type. Values returned are: PROVIDER_MANAGER_ELEMENT_TYPE, PROVIDER_ELEMENT_TYPE, CATEGORY_ELEMENT_TYPE, RULE_ELEMENT_TYPE, RESULT_ELEMENT_TYPE

Specified by:
getElementType in interface IAnalysisElement
Returns:
The unique element type for this element

setElementType

public void setElementType(int elementType)
Set the element type. This method can be called only once. Subsequent calls are ignored. Valid values for this method are defined in the following constants: PROVIDER_MANAGER_ELEMENT_TYPE, PROVIDER_ELEMENT_TYPE, CATEGORY_ELEMENT_TYPE, RULE_ELEMENT_TYPE, RESULT_ELEMENT_TYPE

Specified by:
setElementType in interface IAnalysisElement
Parameters:
elementType - The new element type.

getId

public java.lang.String getId()
Specified by:
getId in interface IAnalysisElement
Returns:
The unique identifier for this element

setId

public void setId(java.lang.String id)
Internal use only. Sets the unique id of this element.

Specified by:
setId in interface IAnalysisElement
Parameters:
id - The new id for the element

getHelpID

public java.lang.String getHelpID()
Specified by:
getHelpID in interface IAnalysisElement
Returns:
The unique identifier for this element's context-sensitive help

setHelpID

public void setHelpID(java.lang.String helpID)
Description copied from interface: IAnalysisElement
Internal use only. Sets the unique id of this element's context-sensitive help.

Specified by:
setHelpID in interface IAnalysisElement
Parameters:
helpID - The new id for the element's context-sensitive help

getViewerID

public java.lang.String getViewerID()
Returns:
The viewer ID for the viewer attached to this element

toString

public java.lang.String toString()

getExecutionHistory

public java.util.Hashtable getExecutionHistory()

addDetailProvider

public void addDetailProvider(RuleDetailProvider details)
Add a new detail provider to this element. A detail provider can display information about the element. For example it might include a detailed description or a possible solution to a problem indicated by the analysis element. Note, the file name specified must exist in the plugin where the rule is defined.

Specified by:
addDetailProvider in interface IAnalysisElement
Parameters:
details - The definition of a detail provider

getDetailProviders

public java.util.List getDetailProviders()
This method returns a list of detail provider definitions specified for this element. The list returned contains instances of RuleDetailProvider, which contains the data needed to show a particular detail.

Specified by:
getDetailProviders in interface IAnalysisElement
Returns:
The detail providers defined for this element

TPTP 4.2.0 Platform Project
Public API Specification