|
PTP Release 7.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectAbstractHandler
org.eclipse.ptp.pldt.common.actions.RunAnalyseHandler
org.eclipse.ptp.pldt.common.actions.RunAnalyseHandlerBase
public abstract class RunAnalyseHandlerBase
RunAnalyseBase - run analysis to create generic artifact markers.
The analysis is done in the doArtifactAnalysis() method
| Field Summary | |
|---|---|
protected boolean |
cancelledByUser
|
protected int |
cumulativeArtifacts
|
protected boolean |
forceEcho
|
protected String |
markerID
|
protected String |
name
the type of artifact e.g. |
protected Shell |
shell
|
protected static boolean |
traceOn
This is NOT final because constructor may change this dynamically if tracing is enabled by user -- see CommonPlugin.getTraceOn(); |
protected ArtifactMarkingVisitor |
visitor
|
protected IWorkbenchWindow |
window
|
| Fields inherited from class org.eclipse.ptp.pldt.common.actions.RunAnalyseHandler |
|---|
selection |
| Constructor Summary | |
|---|---|
RunAnalyseHandlerBase(String name,
ArtifactMarkingVisitor visitor,
String markerID)
Constructor for the "Run Analysis" action |
|
| Method Summary | |
|---|---|
protected abstract void |
activateArtifactView()
|
protected void |
activateProblemsView()
If the analysis has an additional view to bring up, override this |
ScanReturn |
analyse(IProgressMonitor monitor,
ITranslationUnit tu,
List<String> includes)
|
boolean |
areIncludePathsNeeded()
returns true if include paths must be set for this implementation. |
void |
dispose()
We can use this method to dispose of any system resources we previously allocated. |
abstract ScanReturn |
doArtifactAnalysis(ITranslationUnit tu,
List<String> includes)
Returns artifact analysis for file. |
Object |
execute(ExecutionEvent event)
Implemented for Handler; this replaces run() which is for actions. |
protected abstract List<String> |
getIncludePath()
Get the include path. |
String |
getPrefacedName(Object obj)
Provide a human-readable version of what will be analyzed. |
void |
init(IWorkbenchWindow window)
Cache the window object to be able to provide parent shell for the message dialog. |
protected boolean |
isCPPproject(ICElement ce)
Determine if the project is a C++ project |
protected void |
processResults(ScanReturn results,
IResource resource)
|
protected void |
readPreferences()
Read preferences |
void |
run()
Do the "Run Analysis" on a resource (project, folder, or file). |
protected ScanReturn |
runArtifactAnalysisFromExtensionPoint(String extensionPointID,
ITranslationUnit tu,
List<String> includes,
boolean allowPrefixOnlyMatch)
Runs an artifact analysis for the given file by searching the given extension point for an IArtifactAnalysis that matches its language ID. |
boolean |
runResource(IProgressMonitor monitor,
ICElement ce,
int indent,
List<String> includes)
Run analysis on a resource (e.g. |
protected boolean |
runResources(IProgressMonitor monitor,
int indent,
List<String> includes)
Run the analysis on the current selection (file, container, or multiple-selection) |
void |
setActivePart(IAction action,
IWorkbenchPart targetPart)
|
protected boolean |
validForAnalysis(String filename,
boolean isCPP)
Default determination of if a given filename is valid for our artifact analysis |
| Methods inherited from class org.eclipse.ptp.pldt.common.actions.RunAnalyseHandler |
|---|
countFiles, countFiles, countFilesSelected, countFilesSelected, getSelection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static boolean traceOn
protected boolean forceEcho
protected IWorkbenchWindow window
protected boolean cancelledByUser
protected int cumulativeArtifacts
protected String name
protected ArtifactMarkingVisitor visitor
protected String markerID
protected Shell shell
| Constructor Detail |
|---|
public RunAnalyseHandlerBase(String name,
ArtifactMarkingVisitor visitor,
String markerID)
name - the type of artifact e.g. "MPI" or "OpenMP"visitor - the visitor that will put the markers on the source filesmarkerID - marker ID| Method Detail |
|---|
public ScanReturn analyse(IProgressMonitor monitor,
ITranslationUnit tu,
List<String> includes)
public boolean areIncludePathsNeeded()
public void dispose()
implemented for toolbar
enablement of this action
public abstract ScanReturn doArtifactAnalysis(ITranslationUnit tu,
List<String> includes)
tu - includes - header files include paths
protected ScanReturn runArtifactAnalysisFromExtensionPoint(String extensionPointID,
ITranslationUnit tu,
List<String> includes,
boolean allowPrefixOnlyMatch)
IArtifactAnalysis that matches its language ID.
This is a utility method generally invoked from doArtifactAnalysis(ITranslationUnit, List).
It is assumed that only one extension will be contributed per language ID. If multiple extensions are found, it is unspecified which one will be run.
extensionPointID - tu - includes - allowPrefixOnlyMatch -
ScanReturn
public Object execute(ExecutionEvent event)
throws ExecutionException
ExecutionExceptionpublic String getPrefacedName(Object obj)
obj - the file, folder, or project
public void init(IWorkbenchWindow window)
implemented for toolbar
enablement of this action NOTE: window object will thus be null for
context menu use!! so...we are not using this, using
Display.getCurrent() and Display.getCurrent().getActiveShell();public void run()
public boolean runResource(IProgressMonitor monitor,
ICElement ce,
int indent,
List<String> includes)
throws InterruptedException
atu - the resourceindent - number of levels of nesting/recursion for prettyprintingincludes - contains header files include paths from the Preference page
InterruptedException
public void setActivePart(IAction action,
IWorkbenchPart targetPart)
protected abstract void activateArtifactView()
protected void activateProblemsView()
protected abstract List<String> getIncludePath()
protected boolean isCPPproject(ICElement ce)
ce - the ICElement representing a file
protected void processResults(ScanReturn results,
IResource resource)
protected void readPreferences()
protected boolean runResources(IProgressMonitor monitor,
int indent,
List<String> includes)
throws InterruptedException
monitor - progress monitor on which to report progress.indent - indent amount, in number of spaces, used only for debug
printing.includes -
InterruptedException
protected boolean validForAnalysis(String filename,
boolean isCPP)
filename - isCPP - is the project a C++ project or not
|
PTP Release 7.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||