com.ibm.jdg2e.resources.programming.interact
Class StructureProjectAction

java.lang.Object
  extended bycom.ibm.jdg2e.resources.programming.interact.ActionResourceAction
      extended bycom.ibm.jdg2e.resources.programming.interact.StructureProjectAction
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate, org.eclipse.ui.IObjectActionDelegate, org.eclipse.ui.IViewActionDelegate, org.eclipse.core.resources.IWorkspaceRunnable

public class StructureProjectAction
extends ActionResourceAction
implements org.eclipse.ui.IViewActionDelegate, org.eclipse.core.resources.IWorkspaceRunnable

Multi-headed action where the processing depends on invocation point as determined by the UI action that triggered the request. Processing paths include:

Demonstrates the workspace get of a handle and existence checking with respect to the workspace and event management using a workspace runnable.

See Also:
IFile, IFolder, IProject, IMarker, IResource, IWorkspaceRoot, IWorkspaceRunnable

Field Summary
 
Fields inherited from class com.ibm.jdg2e.resources.programming.interact.ActionResourceAction
selection
 
Constructor Summary
StructureProjectAction()
          ActionProcessResourceTree default constructor.
 
Method Summary
 void init(org.eclipse.ui.IViewPart view)
          Not used in this action - implemented per IViewActionDelegate interface.
 void run(org.eclipse.jface.action.IAction action)
          Uses saved reference to selected project to call custom logic that processes the resource tree.
 void run(org.eclipse.core.runtime.IProgressMonitor monitor)
           
 void structureProject(org.eclipse.core.resources.IProject project, org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.jobs.Job job)
          Create resources required to structure project.
 
Methods inherited from class com.ibm.jdg2e.resources.programming.interact.ActionResourceAction
resultError, resultInformation, selectionChanged, setActivePart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IActionDelegate
selectionChanged
 

Constructor Detail

StructureProjectAction

public StructureProjectAction()
ActionProcessResourceTree default constructor.

Method Detail

init

public void init(org.eclipse.ui.IViewPart view)
Not used in this action - implemented per IViewActionDelegate interface.

Specified by:
init in interface org.eclipse.ui.IViewActionDelegate
See Also:
IViewActionDelegate.init(IViewPart)

run

public void run(org.eclipse.jface.action.IAction action)
Uses saved reference to selected project to call custom logic that processes the resource tree. Multiple plugin.xml defined actions map to this implementation. The current action is detected and the appropriate logic is triggered based on the plugin.xml defined action id.

Specified by:
run in interface org.eclipse.ui.IActionDelegate
Parameters:
action - proxy that handles the presentation portion of the plugin action
See Also:
IActionDelegate.run(IAction)

run

public void run(org.eclipse.core.runtime.IProgressMonitor monitor)
         throws org.eclipse.core.runtime.CoreException
Specified by:
run in interface org.eclipse.core.resources.IWorkspaceRunnable
Throws:
org.eclipse.core.runtime.CoreException
See Also:
IWorkspaceRunnable.run(IProgressMonitor)

structureProject

public void structureProject(org.eclipse.core.resources.IProject project,
                             org.eclipse.core.runtime.IProgressMonitor monitor,
                             org.eclipse.core.runtime.jobs.Job job)
Create resources required to structure project.

Parameters:
project -
monitor -
job -