Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.remotebuild.actions
Class CompileAction

java.lang.Object
  extended by Action
      extended by com.ibm.etools.iseries.remotebuild.actions.RBAction
          extended by com.ibm.etools.iseries.remotebuild.actions.ResourceAction
              extended by com.ibm.etools.iseries.remotebuild.actions.CompileAction
Direct Known Subclasses:
CompileImmediateAction, CompileInBatchAction

public abstract class CompileAction
extends ResourceAction

This class contains the common envelope for compile operations.


Constructor Summary
CompileAction()
           
 
Method Summary
 SystemCompileCommand getCommand()
           
protected  SystemCompileCommand getCommand(RBMember member)
           
 ImageDescriptor getImageDescriptor()
           
protected  List getMembers(RBProject project, List modelResources)
           
 SystemCompileType getType()
           
 boolean isPrompting()
           
protected  RBStatus push(AbstractISeriesProject modelProject)
          Performs the push action done before the actual compilation, according to the compile preference in iSeries Projects preference page.
protected  RBStatus pushChangedSelected()
          Pushes the selected resources to the desired target.
protected  RBStatus pushChanges(AbstractISeriesProject modelProject)
          Pushes any changes for a single project made since the last push.
 void run()
           
protected abstract  RBStatus runForProject(AbstractISeriesProject modelProject, List modelResources, IProgressMonitor monitor)
           
 void setCommand(SystemCompileCommand command)
           
 void setPrompting(boolean isPrompting)
           
 void setType(SystemCompileType type)
           
 
Methods inherited from class com.ibm.etools.iseries.remotebuild.actions.ResourceAction
connect, getSelection, setSelection
 
Methods inherited from class com.ibm.etools.iseries.remotebuild.actions.RBAction
getRunnableContext, getShell, getStatus, isCanceled, setCanceled, setRunnableContext, setShell, setStatus, showStatusMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompileAction

public CompileAction()
Method Detail

pushChanges

protected RBStatus pushChanges(AbstractISeriesProject modelProject)
Pushes any changes for a single project made since the last push. For use by subclasses.

Parameters:
modelProject - the project whose changes to push.
Returns:
the status of the push operation.

run

public void run()

push

protected RBStatus push(AbstractISeriesProject modelProject)
Performs the push action done before the actual compilation, according to the compile preference in iSeries Projects preference page.

Parameters:
modelProject - The model project to push if push changes is selected
Returns:
RBStatus of the push action

pushChangedSelected

protected RBStatus pushChangedSelected()
Pushes the selected resources to the desired target. For use by subclasses.

Returns:
the status of the push operation.

getImageDescriptor

public ImageDescriptor getImageDescriptor()

runForProject

protected abstract RBStatus runForProject(AbstractISeriesProject modelProject,
                                          List modelResources,
                                          IProgressMonitor monitor)
Parameters:
modelProject - the model project for which this operation is to take place
modelResources - the list of resources (usually members) to be compiled.
monitor - the (new) progress monitor in which to record the operation.
Returns:
the status of the operation.

getCommand

public SystemCompileCommand getCommand()
Returns:
the SystemCompileCommand if one has been set for this action.

isPrompting

public boolean isPrompting()
Returns:
true if this action should prompt if possible, false otherwise.

getType

public SystemCompileType getType()
Returns:
the SystemCompileType if one has been set for this action.

setCommand

public void setCommand(SystemCompileCommand command)
Parameters:
command - the SystemCompileCommand to be used for this action. This causes any selection associated with this action to be compile with this command. Typically used only for a selection consisting of a single source type. If one sets this, one should also use set the type. If one does not set this, the compile action will determine the command to use based on the member type.

setPrompting

public void setPrompting(boolean isPrompting)
Parameters:
isPrompting - set to true if you want to have this action prompt for commands. Subclasses may use this to determine whether to prompt or not. Typically prompting will occur only if there is one member in the selection.

setType

public void setType(SystemCompileType type)
Parameters:
type - the SystemCompileType associated with this action. This type is modified with the last used compile command for this action. Typically used only when the selection consistes of members with a single source type. If one sets this one should also set the command.

getMembers

protected List getMembers(RBProject project,
                          List modelResources)
Parameters:
project - the RBProject to be used to "resolve" the members from the list of model resources.
modelResources - a list of AbstractISeriesResources that will be resolved to the model members they are or contain. These members will be used to construct the RBMembers that will be returned.
Returns:
a list of RBMembers covered by the list of modelResources presented. The list is ordered by compile type so that the list can be used directly to generate a compile sequence according to the preferred compile order.

getCommand

protected SystemCompileCommand getCommand(RBMember member)
Parameters:
member - the RBMember to retrieve the SystemCompileCommand for.
Returns:
the SystemCompileCommand for this member. If a command has been set using getCommand() it will return that command, otherwise it will determine the default command to use for this member's source type.

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.