|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.colby.cs.JeSS.scanner.VisitorManager
This class is the root of the security analysis. It accepts the IPreference store in its initialization to determine the types of scans being performed. The scan() method then accepts the root of an AST and the corresponding source file for error reporting. This is the only class in the JeSS plugin that deals with markers. All markers are created and deleted from methods in this class. Errors are reported from the visitors through the reportProblem() method of JeSSVisitor, which in turn calls the reportProblem() method of this class.
Field Summary | |
static java.lang.String |
MARKER_ID
|
private int |
problems
|
private org.eclipse.core.resources.IFile |
source
|
private JeSSVisitorCollection |
visitors
|
Constructor Summary | |
VisitorManager(org.eclipse.jface.preference.IPreferenceStore store)
Initialize the class using the IPreferenceStore to determine what scanners are used during the security analysis |
Method Summary | |
static void |
deleteMarker(org.eclipse.core.resources.IMarker marker)
Delete the passed marker. |
static boolean |
deleteSecurityMarkers(org.eclipse.core.resources.IResource source)
This method deletes all of the security markers in the passed resource |
org.eclipse.core.resources.IFile |
getResource()
|
void |
reportProblem(java.lang.String errorMessage,
Location loc,
boolean isError,
java.lang.String errorType)
Take the passed values and create a Marker on the resource stored by the VisitorManager. |
int |
scan(org.eclipse.jdt.core.dom.CompilationUnit result,
org.eclipse.core.resources.IFile file)
Accept an AST root node in the form org.eclipse.jdt.core.dom.CompilationUnit and scan the AST for security bugs. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private int problems
public static java.lang.String MARKER_ID
private JeSSVisitorCollection visitors
private org.eclipse.core.resources.IFile source
Constructor Detail |
public VisitorManager(org.eclipse.jface.preference.IPreferenceStore store)
store
- - the plugin preferencesMethod Detail |
public int scan(org.eclipse.jdt.core.dom.CompilationUnit result, org.eclipse.core.resources.IFile file)
result
- -
the AST to be scannedfile
- -
the local resource for the AST
public org.eclipse.core.resources.IFile getResource()
public void reportProblem(java.lang.String errorMessage, Location loc, boolean isError, java.lang.String errorType)
errorMessage
- -
the message related to the security bugloc
- -
the Location object storing the placement of the bugisError
- -
a boolean to determine if the bug is an error or warningerrorType
- - TODO for future implementation of error resolutionpublic static void deleteMarker(org.eclipse.core.resources.IMarker marker)
marker
- -
the marker to be removedpublic static boolean deleteSecurityMarkers(org.eclipse.core.resources.IResource source)
source
- - tje source in which to remove the markers
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |