edu.colby.cs.JeSS.actions
Class JeSScanAction

java.lang.Object
  extended byedu.colby.cs.JeSS.actions.JeSScanAction
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate, org.eclipse.ui.IWorkbenchWindowActionDelegate

public class JeSScanAction
extends java.lang.Object
implements org.eclipse.ui.IWorkbenchWindowActionDelegate

This class tracks the selection of the current user environment and sends the selected items along to the JeSSClearingHouse to determine their type and proper processing path for a Security Audit

See Also:
IWorkbenchWindowActionDelegate

Nested Class Summary
private  class JeSScanAction.JeSSRunnable
           
 
Field Summary
private  org.eclipse.ui.IWorkbenchWindow window
           
private  org.eclipse.ui.IWorkbenchPart workbenchPart
           
 
Constructor Summary
JeSScanAction()
          The constructor - does Nothing
 
Method Summary
 void dispose()
          Eclipse Generated Code - Does Nothing
private  org.eclipse.jface.viewers.StructuredSelection getStructuredSelection()
          Uses the current active workbench part to determine the current selected objects.
private  org.eclipse.ui.IWorkbenchPart getWorkbenchPart()
           
 void init(org.eclipse.ui.IWorkbenchWindow window)
          Caches window object and calls refreshActivePart() to store the currently active workbench part
private  void refreshActivePart()
          Stores the currently active workbench part in the local variable workbenchPart
 void run(org.eclipse.jface.action.IAction action)
          Sets up a runnable action so all resource changes are grouped together when the scan is run and show the progress of the scan using the status bar on the workbench window
private  void runJeSS(org.eclipse.core.runtime.IProgressMonitor monitor)
          The current selection is then determined and the objects that comprise that selection are passed along to the JeSSClearingHouse one at at time to determine their type and proper processing path.
 void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)
          Eclipse Generated Code - Does Nothing
private  void showMessage(java.lang.String message)
          A helper method to display a "JeSS Plug-in" titled message dialog with the passed string as the message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

window

private org.eclipse.ui.IWorkbenchWindow window

workbenchPart

private org.eclipse.ui.IWorkbenchPart workbenchPart
Constructor Detail

JeSScanAction

public JeSScanAction()
The constructor - does Nothing

Method Detail

run

public void run(org.eclipse.jface.action.IAction action)
Sets up a runnable action so all resource changes are grouped together when the scan is run and show the progress of the scan using the status bar on the workbench window

Specified by:
run in interface org.eclipse.ui.IActionDelegate
See Also:
IActionDelegate.run(org.eclipse.jface.action.IAction)

runJeSS

private void runJeSS(org.eclipse.core.runtime.IProgressMonitor monitor)
The current selection is then determined and the objects that comprise that selection are passed along to the JeSSClearingHouse one at at time to determine their type and proper processing path. Error messages are returned if there is an invalid selection

Parameters:
monitor - - the progress monitor to be used to display the progress of the scan

showMessage

private void showMessage(java.lang.String message)
A helper method to display a "JeSS Plug-in" titled message dialog with the passed string as the message

Parameters:
message - - the string to be displayed

getWorkbenchPart

private org.eclipse.ui.IWorkbenchPart getWorkbenchPart()
Returns:
workbenchPart - current active IWorkbenchPart

getStructuredSelection

private org.eclipse.jface.viewers.StructuredSelection getStructuredSelection()
Uses the current active workbench part to determine the current selected objects. If nothing is currently selected or a text editor is currently open (and text is selected) then null is returned.

Returns:
StructuredSelection - see org.eclipse.jface.viewers.StructuredSelection

init

public void init(org.eclipse.ui.IWorkbenchWindow window)
Caches window object and calls refreshActivePart() to store the currently active workbench part

Specified by:
init in interface org.eclipse.ui.IWorkbenchWindowActionDelegate
See Also:
IWorkbenchWindowActionDelegate.init(org.eclipse.ui.IWorkbenchWindow)

refreshActivePart

private void refreshActivePart()
Stores the currently active workbench part in the local variable workbenchPart


selectionChanged

public void selectionChanged(org.eclipse.jface.action.IAction action,
                             org.eclipse.jface.viewers.ISelection selection)
Eclipse Generated Code - Does Nothing

Specified by:
selectionChanged in interface org.eclipse.ui.IActionDelegate
See Also:
IActionDelegate.selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)

dispose

public void dispose()
Eclipse Generated Code - Does Nothing

Specified by:
dispose in interface org.eclipse.ui.IWorkbenchWindowActionDelegate
See Also:
IWorkbenchWindowActionDelegate.dispose()