TPTP 4.5.0 Platform Project
Public API Specification

org.eclipse.tptp.platform.analysis.codereview.java
Class CodeReviewProvider

java.lang.Object
  extended by org.eclipse.tptp.platform.analysis.core.element.AbstractAnalysisElement
      extended by org.eclipse.tptp.platform.analysis.core.provider.AbstractAnalysisProvider
          extended by org.eclipse.tptp.platform.analysis.codereview.java.CodeReviewProvider
All Implemented Interfaces:
org.eclipse.core.runtime.IExecutableExtension

public class CodeReviewProvider
extends AbstractAnalysisProvider


Field Summary
static java.lang.String RESOURCE_PROPERTY
           
 
Fields inherited from class org.eclipse.tptp.platform.analysis.core.provider.AbstractAnalysisProvider
MAX_SCORE, PROVIDER_TYPE_CODE, PROVIDER_TYPE_COMPLEXITY, PROVIDER_TYPE_COMPLIANCE, PROVIDER_TYPE_STRUCTURAL, PROVIDER_TYPE_UNKNOWN, UNSUPPORTED_SCORE
 
Fields inherited from class org.eclipse.tptp.platform.analysis.core.element.AbstractAnalysisElement
CATEGORY_ELEMENT_TYPE, COMBO_VALUE, DETAIL_PROVIDER, PROVIDER_ELEMENT_TYPE, PROVIDER_MANAGER_ELEMENT_TYPE, RESULT_ELEMENT_TYPE, RULE_ELEMENT_TYPE
 
Constructor Summary
CodeReviewProvider()
           
 
Method Summary
 void analyze(org.eclipse.core.runtime.IProgressMonitor monitor, AnalysisHistory history)
          Analyze the categories selected by the user
 long getAnalysisScore(AnalysisHistory history)
          Returns a calculated score of the analysis of this provider on a scale from 0 to 1000 (MAX_SCORE) where 0 is worst and 1000 is best.
 CodeReviewResource getCodeReviewResource()
           
 int getProviderQualityType()
          This method indicated the type of quality measure that is supplied by this analysis provider.
 
Methods inherited from class org.eclipse.tptp.platform.analysis.core.provider.AbstractAnalysisProvider
addTemplate, getDataExporters, getProgressMonitor, getProperty, getResources, getRuleTemplates, getViewer, removeProperty, setInitializationData, setProgressMonitor, setProperty
 
Methods inherited from class org.eclipse.tptp.platform.analysis.core.element.AbstractAnalysisElement
addDetailProvider, addHistoryResultSet, addOwnedElement, addOwnedElements, addParameter, addParameters, deleteHistoryResults, dispose, getDetailProviders, getElementType, getExecutionHistory, getExternalDataMap, getHelpID, getHistoryResults, getIconName, getId, getLabel, getOwnedElements, getOwner, getOwnerId, getParameter, getParameterCount, getParameterList, getPluginId, getProvider, getProviderManager, getViewerID, getVisibleParameterCount, postAnalyze, preAnalyze, removeHistoryResultSet, removeHistoryResultSet, setElementType, setExternalDataMap, setHelpID, setIconName, setId, setInitializationData, setLabel, setOwner, setOwnerId, setPluginId, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE_PROPERTY

public static final java.lang.String RESOURCE_PROPERTY
See Also:
Constant Field Values
Constructor Detail

CodeReviewProvider

public CodeReviewProvider()
Method Detail

analyze

public void analyze(org.eclipse.core.runtime.IProgressMonitor monitor,
                    AnalysisHistory history)
Analyze the categories selected by the user

Overrides:
analyze in class AbstractAnalysisProvider
Parameters:
parentMonitor - The progress monitor of the parent task
history - A reference to the history record for this analysis
Throws:
org.eclipse.core.runtime.CoreException

getCodeReviewResource

public CodeReviewResource getCodeReviewResource()
Returns:
The current code review resource being analyzed

getAnalysisScore

public final long getAnalysisScore(AnalysisHistory history)
Description copied from class: AbstractAnalysisProvider
Returns a calculated score of the analysis of this provider on a scale from 0 to 1000 (MAX_SCORE) where 0 is worst and 1000 is best. Derivatives of this class should override this method to produce a valid weighting for each analysis run. This number is used in reporting to indicate top-level quality of the the code that was analyzed.

Overrides:
getAnalysisScore in class AbstractAnalysisProvider
Parameters:
history - The analysis history for which the quality score is requested
Returns:
A long integer value representing the quality score

getProviderQualityType

public int getProviderQualityType()
Description copied from class: AbstractAnalysisProvider
This method indicated the type of quality measure that is supplied by this analysis provider. This should be overridden by any provider that extends the AbstractAnalysisProvider class. The type returned is used by high level reporting tools to categorize the results that this provider generates.

Overrides:
getProviderQualityType in class AbstractAnalysisProvider
Returns:
The provider quality type (See AbstractAnalysisProvider.PROVIDER_TYPE_*) for values

TPTP 4.5.0 Platform Project
Public API Specification