Remote Systems
v6.4.1

com.ibm.etools.systems.launch.remoteJava
Class UniversalJavaLaunchShortcut

java.lang.Object
  extended bycom.ibm.etools.systems.launch.remoteJava.UniversalJavaLaunchShortcut
All Implemented Interfaces:
IUniversalJavaLaunchConstants
Direct Known Subclasses:
UniversalJavaLaunchActionDelegate

public class UniversalJavaLaunchShortcut
extends Object
implements IUniversalJavaLaunchConstants

The launch short cut for remote java application. Work with JDT or RSE.yes


Field Summary
protected  ResourceBundle stringsResourceBundle
           
 
Fields inherited from interface com.ibm.etools.systems.launch.remoteJava.IUniversalJavaLaunchConstants
ATTR_HAS_ASSOCIATED_PROJECT, ATTR_PREFIX, ATTR_REMOTE_WORKING_DIRECTORY, ATTR_REMOTE_WORKING_DIRECTORY_CLASSPATH, ATTR_REMOTEJAVA_ATTACH_CONNECTOR_HOSTNAME, ATTR_REMOTEJAVA_ATTACH_CONNECTOR_PORTNAME, ATTR_REMOTEJAVA_AUTOMATIC_HOST_DEBUG_JDWP_PORT, ATTR_REMOTEJAVA_ENVIRONMENT, ATTR_REMOTEJAVA_ERROR_TAB_ARGUMENTS, ATTR_REMOTEJAVA_ERROR_TAB_CLASSPATH, ATTR_REMOTEJAVA_ERROR_TAB_DEBUG, ATTR_REMOTEJAVA_ERROR_TAB_MAIN, ATTR_REMOTEJAVA_HOST_DEBUG_JDWP_PORT, ATTR_REMOTEJAVA_TERMINATEJVM, BROWSE, BROWSEPROMPT, CLASS, ERR_CODE_INVALID_RSECONNECTION, ERR_CODE_LAUNCH_CANCEL, ERR_CODE_LAUNCH_NOPORT, ERR_CODE_LAUNCH_PORTUSED, ERR_CODE_LAUNCH_UNEXPECTED, ERR_CODE_LAUNCH_WORKINGFOLDER_NOTEXIST, ERR_CODE_NO_MAIN, HELP_LAUNCHCONFIGTAB_JAVA_ADVANCED, HELP_LAUNCHCONFIGTAB_JAVA_ARGUMENTS, HELP_LAUNCHCONFIGTAB_JAVA_CLASSPATH, HELP_LAUNCHCONFIGTAB_JAVA_CLASSPATH_DIALOG_ENTRY, HELP_LAUNCHCONFIGTAB_JAVA_CLASSPATH_DIALOG_PROMPT, HELP_LAUNCHCONFIGTAB_JAVA_MAIN, HELP_PREFIX, HELP_REMOTEJAVA_PREFERENCE_PAGE, HISTORY_PREFIX, HostJDWPPort, ICON_DIALOG_MAIN, ICON_DIALOG_MAIN_ID, ICON_DIALOG_MAIN_ROOT, ICON_EXT, ICON_ROOT, ICON_SUFFIX, ICON_TABS_ARGUMENTS, ICON_TABS_ARGUMENTS_ID, ICON_TABS_ARGUMENTS_ROOT, ICON_TABS_CLASSPATH, ICON_TABS_CLASSPATH_FOLDER, ICON_TABS_CLASSPATH_FOLDER_ID, ICON_TABS_CLASSPATH_FOLDER_ROOT, ICON_TABS_CLASSPATH_ID, ICON_TABS_CLASSPATH_JAR, ICON_TABS_CLASSPATH_JAR_ID, ICON_TABS_CLASSPATH_JAR_ROOT, ICON_TABS_CLASSPATH_ROOT, ICON_TABS_DEBUG, ICON_TABS_DEBUG_ID, ICON_TABS_DEBUG_ROOT, ICON_TABS_MAIN, ICON_TABS_MAIN_ID, ICON_TABS_MAIN_ROOT, JAR, LABEL, LAUNCH_GENERIC_PREFIX, LAUNCH_TYPE, MSG_GEN_AnyError, MSG_GEN_AnyInfo, MSG_GEN_DebugConnectionFailed, MSG_GEN_GetLCInfoFailed, MSG_GEN_InvalidSelection, MSG_GEN_LaunchCanceled, MSG_GEN_LaunchFailed, MSG_GEN_NoMainInSelection, MSG_GEN_NoMainSelected, MSG_GEN_NoMainType, MSG_GEN_NoRSEConnection, MSG_GEN_UnexpectedException, MSG_GEN_WaitConnection, PLUGIN_ID, PREFIX, REMOTEJAVA_DEBUG_ACTION_ID, REMOTEJAVA_DEBUG_PROMPT_ACTION_ID, REMOTEJAVA_MSG_ERR, REMOTEJAVA_MSG_ERR_CREATELC_FAILED, REMOTEJAVA_MSG_ERR_EXCEPTION, REMOTEJAVA_MSG_ERR_LAUNCH_CANCEL, REMOTEJAVA_MSG_ERR_LAUNCH_DEBUG_CONNECTION_FAILED, REMOTEJAVA_MSG_ERR_LAUNCH_INVALID_HOST, REMOTEJAVA_MSG_ERR_LAUNCH_INVALID_PORT, REMOTEJAVA_MSG_ERR_LAUNCH_INVALID_RSECONNECTION, REMOTEJAVA_MSG_ERR_LAUNCH_NO_MAIN, REMOTEJAVA_MSG_ERR_LAUNCH_NO_RSECONNECTION_FOUND, REMOTEJAVA_MSG_ERR_LAUNCH_NOCONNECTOR, REMOTEJAVA_MSG_ERR_LAUNCH_NOPORT, REMOTEJAVA_MSG_ERR_LAUNCH_PORTUSED, REMOTEJAVA_MSG_ERR_LAUNCH_UNEXPECTED, REMOTEJAVA_MSG_ERR_LAUNCH_WORKINGFOLDER_NOTEXIST, REMOTEJAVA_MSG_ERR_LAUNCHING, REMOTEJAVA_MSG_ERR_SEARCH_TYPE, REMOTEJAVA_MSG_INFO, REMOTEJAVA_MSG_INFO_LAUNCH_CONNECT_DEBUGPORT, REMOTEJAVA_MSG_INFO_LAUNCH_CREATE_DEBUGTARGET, REMOTEJAVA_MSG_INFO_LAUNCH_SET_DEBUGCONNECTION, REMOTEJAVA_MSG_INFO_LAUNCH_VERIFY_CONNECTOR, REMOTEJAVA_MSG_INFO_LAUNCHING, REMOTEJAVA_MSG_INFO_LAUNCHING_BEGIN, REMOTEJAVA_MSG_INFO_LAUNCHING_INVOKEAPP, REMOTEJAVA_MSG_INFO_LAUNCHING_SETSOURCELOCATOR, REMOTEJAVA_MSG_INFO_LAUNCHING_VERIFYLC, REMOTEJAVA_MSG_PREFIX, REMOTEJAVA_RUN_ACTION_ID, REMOTEJAVA_RUN_PROMPT_ACTION_ID, REMOTEJAVA_SHORTCUT_DIALOG, REMOTEJAVA_SHORTCUT_DIALOG_MAINTYPES_LOOKUP, REMOTEJAVA_SHORTCUT_DIALOG_MAINTYPES_MATCHING, REMOTEJAVA_SHORTCUT_DIALOG_MAINTYPES_QUALIFIER, REMOTEJAVA_SHORTCUT_DIALOG_SELECT_LC_ROOT, REMOTEJAVA_TABS_ARGUMENTS, REMOTEJAVA_TABS_ARGUMENTS_PGMARGUMENTS_ROOT, REMOTEJAVA_TABS_ARGUMENTS_VMARGUMENTS_ROOT, REMOTEJAVA_TABS_CLASSPATH, REMOTEJAVA_TABS_CLASSPATH_BUTTON_ADD_ROOT, REMOTEJAVA_TABS_CLASSPATH_BUTTON_DOWN_ROOT, REMOTEJAVA_TABS_CLASSPATH_BUTTON_EDIT_ROOT, REMOTEJAVA_TABS_CLASSPATH_BUTTON_REMOVE_ROOT, REMOTEJAVA_TABS_CLASSPATH_BUTTON_UP_ROOT, REMOTEJAVA_TABS_CLASSPATH_DIALOG_ADD_ROOT, REMOTEJAVA_TABS_CLASSPATH_DIALOG_BROWSE_ROOT, REMOTEJAVA_TABS_CLASSPATH_DIALOG_EDIT_ROOT, REMOTEJAVA_TABS_CLASSPATH_DIALOG_ENTRY_ROOT, REMOTEJAVA_TABS_CLASSPATH_DIALOG_ERROR_ROOT, REMOTEJAVA_TABS_CLASSPATH_DIALOG_INVALID_ENTRY_ROOT, REMOTEJAVA_TABS_CLASSPATH_DIALOG_ROOT, REMOTEJAVA_TABS_CLASSPATH_ERR_INVALID_CLASSPATH, REMOTEJAVA_TABS_CLASSPATH_TABLE_ROOT, REMOTEJAVA_TABS_CLASSPATH_WORKINGDIR_CLASSPATH_ROOT, REMOTEJAVA_TABS_DEBUG, REMOTEJAVA_TABS_DEBUG_ERRORR_INVALID_PORT, REMOTEJAVA_TABS_DEBUG_PORT_AUTOMATIC_ROOT, REMOTEJAVA_TABS_DEBUG_PORT_PORTGROUP_ROOT, REMOTEJAVA_TABS_DEBUG_PORT_ROOT, REMOTEJAVA_TABS_DEBUG_PORT_SPECIFY_ROOT, REMOTEJAVA_TABS_DEBUG_PREFIX, REMOTEJAVA_TABS_MAIN, REMOTEJAVA_TABS_MAIN_CLASS_BROWSE_DIALOG_ROOT, REMOTEJAVA_TABS_MAIN_CLASS_BROWSE_ROOT, REMOTEJAVA_TABS_MAIN_CLASS_ROOT, REMOTEJAVA_TABS_MAIN_CONNECTION, REMOTEJAVA_TABS_MAIN_ERR_CONNECTION_FAILED, REMOTEJAVA_TABS_MAIN_ERR_INVALID_MAIN_SELECTION, REMOTEJAVA_TABS_MAIN_ERR_INVALID_MAIN_TYPE, REMOTEJAVA_TABS_MAIN_ERR_INVALID_PROJECT, REMOTEJAVA_TABS_MAIN_ERR_INVALID_WORKINGDIR, REMOTEJAVA_TABS_MAIN_ERR_NO_MAIN_TYPE, REMOTEJAVA_TABS_MAIN_INCLUDE_JAR_ROOT, REMOTEJAVA_TABS_MAIN_PROJECT_BROWSE_DIALOG_ROOT, REMOTEJAVA_TABS_MAIN_PROJECT_BROWSE_ROOT, REMOTEJAVA_TABS_MAIN_PROJECT_CHECK_ROOT, REMOTEJAVA_TABS_MAIN_PROJECT_ROOT, REMOTEJAVA_TABS_MAIN_STOPINMAIN_ROOT, REMOTEJAVA_TABS_MAIN_TERMINATEJVM_ROOT, REMOTEJAVA_TABS_MAIN_WORKINGDIR_BROWSE_ROOT, REMOTEJAVA_TABS_MAIN_WORKINGDIR_ROOT, REMOTEJAVA_TABS_PREFIX, REMOTEJAVA_UI_PREFIX, RESID_PREF_DEBUG_PORT, RESID_PREF_DEBUG_PORTAUTOMATIC, RESID_PREF_DEBUG_PORTGROUP, RESID_PREF_DEBUG_PORTSPECIFY, RESID_PREF_DEBUG_STOPINMAIN, RESID_PREF_PREFIX, RESID_PREF_ROOT_PAGE, RESID_PREF_ROOT_TITLE, RESID_PREFIX, TOOLTIP
 
Constructor Summary
UniversalJavaLaunchShortcut()
           
 
Method Summary
protected  ILaunchConfiguration chooseConfiguration(List configList, String mode)
          Show a selection dialog that allows the user to choose one of the specified launch configurations.
protected  IType chooseType(IType[] types, String mode)
          Prompts the user to select a type
protected  IRemoteFile chooseTypesFromRSEArchive(IRemoteFile selectedArchive)
           
protected  ILaunchConfiguration createConfiguration(IType type)
          Create & return a new configuration based on the specified IType.
protected  ILaunchConfiguration createConfiguration(String typeName, String classpath, String path, SystemConnection connection)
          Create & return a new configuration based on the specified typeName, classPath, working directory and connection.
protected  ILaunchConfiguration findConfiguration(String typeName, String classpath, String path, SystemConnection connection)
          Find an existing configuration based on the specified typeName, classPath, working directory and connection.
protected  ILaunchConfiguration findLaunchConfiguration(IType type, String mode)
          Locate a configuration to relaunch for the given type.
protected  ILaunchConfigurationType getJavaLaunchConfigType()
          Returns the local java launch config type
protected  ILaunchManager getLaunchManager()
           
 boolean getPromptMode()
           
protected  Shell getShell()
          Convenience method to get the window that owns this action's Shell.
protected  void launch(IType type, String mode)
          Launches a configuration for the given type
 void searchAndLaunch(Object[] search, String mode)
           
protected  void searchAndLaunchFromRSE(IStructuredSelection selection, ISystemRemoteElementAdapter systemRemoteFileAdapter, String mode)
           
protected  void setDefaultAttributes(ILaunchConfigurationWorkingCopy workingCopy, boolean hasJavaProject)
           
 void setPromptMode(boolean needPrompt)
           
protected  void showLaunchConfigurationsDialog(ILaunchConfiguration config, String mode)
          showLaunchConfigurationsDialog() Given launch configuration, bring up launch configuration dialog, and display this launch configuration
protected  void waitForSearchComplete(IRemoteSearchResultSet set, IProgressMonitor monitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stringsResourceBundle

protected ResourceBundle stringsResourceBundle
Constructor Detail

UniversalJavaLaunchShortcut

public UniversalJavaLaunchShortcut()
Method Detail

searchAndLaunch

public void searchAndLaunch(Object[] search,
                            String mode)
See Also:
IActionDelegate#run(IAction)

chooseType

protected IType chooseType(IType[] types,
                           String mode)
Prompts the user to select a type

Returns:
the selected type or null if none.

launch

protected void launch(IType type,
                      String mode)
Launches a configuration for the given type


findLaunchConfiguration

protected ILaunchConfiguration findLaunchConfiguration(IType type,
                                                       String mode)
Locate a configuration to relaunch for the given type. If one cannot be found, create one.

Returns:
a re-useable config or null if none

chooseConfiguration

protected ILaunchConfiguration chooseConfiguration(List configList,
                                                   String mode)
Show a selection dialog that allows the user to choose one of the specified launch configurations. Return the chosen config, or null if the user cancelled the dialog.


createConfiguration

protected ILaunchConfiguration createConfiguration(IType type)
Create & return a new configuration based on the specified IType.


getJavaLaunchConfigType

protected ILaunchConfigurationType getJavaLaunchConfigType()
Returns the local java launch config type


showLaunchConfigurationsDialog

protected void showLaunchConfigurationsDialog(ILaunchConfiguration config,
                                              String mode)
showLaunchConfigurationsDialog() Given launch configuration, bring up launch configuration dialog, and display this launch configuration


searchAndLaunchFromRSE

protected void searchAndLaunchFromRSE(IStructuredSelection selection,
                                      ISystemRemoteElementAdapter systemRemoteFileAdapter,
                                      String mode)

chooseTypesFromRSEArchive

protected IRemoteFile chooseTypesFromRSEArchive(IRemoteFile selectedArchive)
Returns:

waitForSearchComplete

protected void waitForSearchComplete(IRemoteSearchResultSet set,
                                     IProgressMonitor monitor)

findConfiguration

protected ILaunchConfiguration findConfiguration(String typeName,
                                                 String classpath,
                                                 String path,
                                                 SystemConnection connection)
Find an existing configuration based on the specified typeName, classPath, working directory and connection.


createConfiguration

protected ILaunchConfiguration createConfiguration(String typeName,
                                                   String classpath,
                                                   String path,
                                                   SystemConnection connection)
Create & return a new configuration based on the specified typeName, classPath, working directory and connection.


setDefaultAttributes

protected void setDefaultAttributes(ILaunchConfigurationWorkingCopy workingCopy,
                                    boolean hasJavaProject)

getLaunchManager

protected ILaunchManager getLaunchManager()

getShell

protected Shell getShell()
Convenience method to get the window that owns this action's Shell.


setPromptMode

public void setPromptMode(boolean needPrompt)

getPromptMode

public boolean getPromptMode()

Remote Systems
v6.4.1

Copyright © 2005 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.