com.joanju.cg.plugin
Class CgActionManager

java.lang.Object
  extended by com.joanju.cg.plugin.CgActionManager

public class CgActionManager
extends java.lang.Object


Field Summary
protected  java.util.Iterator currIter
           
protected  java.util.ArrayList<IFile> fileList
          A list of IFile *.p and *.w objects, generated from the selected resources
protected  int topNode
           
protected  int workDone
           
 
Constructor Summary
CgActionManager(IWorkbenchWindow window, IProRefactorAction action)
           
 
Method Summary
protected  void addContainer(IContainer theContainer)
           
protected  void addFile(IFile theFile)
           
protected  void addIResource(IResource theRes)
           
protected  void checkForProjectChange(IResource theResource)
           
 void console(java.lang.String theMessage)
          Write a message to the console.
 void consoleClear()
          Clear the console.
protected  void consoleCreate()
           
 int doRun()
          Run for the current selection.
 java.io.File getCurrFile()
          Get the current java.io.File from the current IResource.
 IFile getCurrIFile()
          Get the current IFile resource.
 java.lang.String getCurrProjectName()
           
 java.util.ArrayList<IFile> getFileList()
           
 int getNumSelected()
          Get the number of selected files.
 boolean isCanceled()
           
protected  void loadSelectionList(ISelection iselection)
           
 void reportError(java.lang.String errMess)
          Shows an error message in a MessageDialog and in the Console.
 void run2(IProgressMonitor monitor, java.util.Iterator it)
           
 void setProgressDialogText(java.lang.String newText)
           
 int setup(ISelection iselection)
          Set up this ActionManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currIter

protected java.util.Iterator currIter

fileList

protected java.util.ArrayList<IFile> fileList
A list of IFile *.p and *.w objects, generated from the selected resources


topNode

protected int topNode

workDone

protected int workDone
Constructor Detail

CgActionManager

public CgActionManager(IWorkbenchWindow window,
                       IProRefactorAction action)
Method Detail

addContainer

protected void addContainer(IContainer theContainer)

addFile

protected void addFile(IFile theFile)

addIResource

protected void addIResource(IResource theRes)

checkForProjectChange

protected void checkForProjectChange(IResource theResource)

console

public void console(java.lang.String theMessage)
Write a message to the console.


consoleClear

public void consoleClear()
Clear the console.


consoleCreate

protected void consoleCreate()
                      throws PartInitException
Throws:
PartInitException

doRun

public int doRun()
Run for the current selection.


getCurrFile

public java.io.File getCurrFile()
Get the current java.io.File from the current IResource.


getCurrIFile

public IFile getCurrIFile()
Get the current IFile resource.


getCurrProjectName

public java.lang.String getCurrProjectName()

getNumSelected

public int getNumSelected()
Get the number of selected files. (May be different than the number of selected resources.)


getFileList

public java.util.ArrayList<IFile> getFileList()

isCanceled

public boolean isCanceled()

loadSelectionList

protected void loadSelectionList(ISelection iselection)

reportError

public void reportError(java.lang.String errMess)
Shows an error message in a MessageDialog and in the Console.


run2

public void run2(IProgressMonitor monitor,
                 java.util.Iterator it)
          throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

setProgressDialogText

public void setProgressDialogText(java.lang.String newText)

setup

public int setup(ISelection iselection)
Set up this ActionManager. Requires a non-empty ISelection.

Returns:
success>0, fail<=0


Copyright © 2008 Joanju Software. All Rights Reserved.