|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.etools.systems.core.ui.compile.SystemCompileManager
This class manages the compile framework for a particular instantiation. It is typically associated with a subsystem factory, but it is designed to be used in other contexts as well.
Here is the model for the compile framework:
SystemCompileProfile
,
SystemCompileType
,
SystemCompileCommand
,
SystemWorkWithCompileCommandsDialog
Field Summary | |
---|---|
static String |
copyright
|
protected SystemCompileCommand |
currentCompileCommand
As last set by calling setCurrentCompileCommand. |
protected SubSystemFactory |
subsystemFactory
|
protected SystemConnection |
systemConnection
|
Constructor Summary | |
---|---|
SystemCompileManager()
Constructor for SystemCompileManager |
Method Summary | |
---|---|
void |
addCompileActions(Shell shell,
IStructuredSelection selection,
SystemMenuManager menu,
String menuGroup)
Populate main context menu with a menu item for compile. |
void |
addMultipleSelectionCompileActions(Shell shell,
IStructuredSelection selection,
SystemMenuManager menu,
String menuGroup)
Adds compile actions for multiple selections. |
void |
addSingleSelectionCompileActions(Shell shell,
IStructuredSelection selection,
SystemMenuManager menu,
String menuGroup)
Adds compile actions for single selections. |
protected abstract SystemCompileProfile |
createCompileProfile(SystemProfile profile)
Overridable method to instantiate your SystemCompileProfile subclass for the given system profile. |
protected abstract ISystemCompileCommandSubstitutor |
createSubstitutor(SystemConnection connection)
Return the substitutor for doing variable substitution. |
SystemCompileProfile[] |
getAllCompileProfiles()
Return a list of all SystemCompileProfile objects. |
SystemCompileCommandEditPane |
getCompileCommandEditPane(Shell shell,
ISystemCompileCommandEditPaneHoster hoster,
boolean caseSensitive)
For support of the Work With Compile Commands dialog. |
SystemCompileProfile |
getCompileProfile(SystemProfile profile)
Get the singleton compile profile given a SystemProfile. |
IFolder |
getCompileProfileFolder(SystemCompileProfile compProfile)
Callback method from SystemCompileProfile to get the folder into which the xml file for this compile profile will be stored. |
SystemCompileCommand |
getCurrentCompileCommand()
Return the current compile cmd as set by setCurrentCompileCommand(SystemCompileCommand) . |
abstract SystemDefaultCompileCommands |
getDefaultCompileCommands()
Return the default (supplied) compile commands to prime the compile commands with. |
SystemDefaultCompileCommand |
getDefaultSuppliedCommand(String commandName)
If the command is an default supplied command, returns its SystemDefaultCompileCommand object. |
protected SystemNewCompileSrcTypeDialog |
getNewSrcTypeDialog(Shell shell,
boolean caseSensitive)
For support of the Work With Compile Commands dialog. |
String |
getSourceTypePromptMRIKey()
For support of the Work With Compile Commands dialog. |
ResourceBundle |
getSourceTypePromptMRIResourceBundle()
For support of the Work With Compile Commands dialog. |
abstract SystemCmdSubstVarList |
getSubstitutionVariableList()
For support of the Work With Compile Commands dialog. |
protected ISystemCompileCommandSubstitutor |
getSubstitutor()
Return the substitutor for doing variable substitution. |
SubSystemFactory |
getSubSystemFactory()
Return the subsystem factory which instantiated this instance, or as set via setSubSystemFactory(SubSystemFactory) . |
SystemConnection |
getSystemConnection()
Return the system connection with which this manager instance is associated. |
boolean |
isCompilable(Object selection)
Return true if the given remote object is potentially compilable. |
boolean |
isMultiSelectSupported(SystemCompileCommand compileCmd)
Return true (default) if multiple-select is supported for the compile action |
void |
profileRenamed(SystemProfile profile,
String oldName)
The compile manager and related classes is impacted by a profile rename, as we have some in-memory places to be updated. |
void |
setCurrentCompileCommand(SystemCompileCommand compileCmd)
Sets the current compile command. |
void |
setSubSystemFactory(SubSystemFactory ssFactory)
Sets the subsystemfactory which instantiated this. |
void |
setSystemConnection(SystemConnection systemConnection)
Set the current system connection. |
boolean |
wantToPrimeWithDefaults(SystemCompileProfile profile)
Callback from SystemProfile to decide, when no xml file is found, if we want to prime the new xml file with defaults. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String copyright
protected SystemConnection systemConnection
protected SubSystemFactory subsystemFactory
protected SystemCompileCommand currentCompileCommand
Constructor Detail |
public SystemCompileManager()
Method Detail |
public void setSubSystemFactory(SubSystemFactory ssFactory)
public SubSystemFactory getSubSystemFactory()
setSubSystemFactory(SubSystemFactory)
.
public void setSystemConnection(SystemConnection systemConnection)
public SystemConnection getSystemConnection()
public void setCurrentCompileCommand(SystemCompileCommand compileCmd)
public SystemCompileCommand getCurrentCompileCommand()
setCurrentCompileCommand(SystemCompileCommand)
.
public boolean isMultiSelectSupported(SystemCompileCommand compileCmd)
public SystemCompileProfile getCompileProfile(SystemProfile profile)
Called in the Work With Compile Commands and the Compile cascading actions.
Do not override this, as the implementation is complete. However, you must override createCompileProfile.
If you are using this outside of the subsystem framework, this method will not be called.
createCompileProfile(SystemProfile)
public SystemCompileProfile[] getAllCompileProfiles()
protected abstract SystemCompileProfile createCompileProfile(SystemProfile profile)
It is important you pass the SystemProfile's name to the ctor of SystemCompileProfile.
public IFolder getCompileProfileFolder(SystemCompileProfile compProfile)
public boolean wantToPrimeWithDefaults(SystemCompileProfile profile)
By default, returns true if the SystemProfile the given compile profile is associated with is a user-private profile. If not using the compile framework, override this to use your own criteria.
public abstract SystemDefaultCompileCommands getDefaultCompileCommands()
public SystemDefaultCompileCommand getDefaultSuppliedCommand(String commandName)
commandName
- - the name of the command, minus the parameters. This is not the label!public void profileRenamed(SystemProfile profile, String oldName)
public boolean isCompilable(Object selection)
Our default implementation is to query the source type of the input object, and return true only if there is a source type defined for it in any of the currently active system profiles.
public void addCompileActions(Shell shell, IStructuredSelection selection, SystemMenuManager menu, String menuGroup)
This is called by the addCommonRemoteObjectsActions method, if this subsystem supports compiles.
public void addSingleSelectionCompileActions(Shell shell, IStructuredSelection selection, SystemMenuManager menu, String menuGroup)
This is called by the addCompileActions method for single selections. Subclasses may override.
public void addMultipleSelectionCompileActions(Shell shell, IStructuredSelection selection, SystemMenuManager menu, String menuGroup)
public abstract SystemCmdSubstVarList getSubstitutionVariableList()
Return the substitution variables supported by compile commands managed by this manager.
protected ISystemCompileCommandSubstitutor getSubstitutor()
Override to return a class that implements ISystemCompileCommandSubstitutor, that knows how to substitute the variables found in getSubstitutionVariableList().
protected abstract ISystemCompileCommandSubstitutor createSubstitutor(SystemConnection connection)
Override to return a class that implements ISystemCompileCommandSubstitutor, that knows how to substitute the variables found in getSubstitutionVariableList().
public SystemCompileCommandEditPane getCompileCommandEditPane(Shell shell, ISystemCompileCommandEditPaneHoster hoster, boolean caseSensitive)
Return our edit pane. Overriding this is an alternative to calling setEditPane. This is called in createContents
protected SystemNewCompileSrcTypeDialog getNewSrcTypeDialog(Shell shell, boolean caseSensitive)
Return the dialog used to prompt for a new source type when "Add..." is pressed beside the source type combo. This returns an instance of the default SystemNewCompileSrcTypeDialog.
One strategy for subclasses is to call super on this method, then configure the results via the setters in the default dialog. Another is to subclass that dialog and return an instance of the subclass.
public ResourceBundle getSourceTypePromptMRIResourceBundle()
Get the mri resource bundle for the source type prompt.
public String getSourceTypePromptMRIKey()
Get the mri resource bundle key for the source type prompt. Will add ".label" and ".tooltip" to it.
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |