Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse PDE
Release 3.5

org.eclipse.pde.ui.launcher
Class EclipseLaunchShortcut


java.lang.Object
  extended by 

org.eclipse.pde.ui.launcher.AbstractLaunchShortcut
      extended by 
org.eclipse.pde.ui.launcher.EclipseLaunchShortcut
All Implemented Interfaces:
ILaunchShortcut

public class EclipseLaunchShortcut
extends AbstractLaunchShortcut

A launch shortcut capable of launching an Eclipse application. Given the current selection, either a new Eclipse Application launch configuration is created with default settings, or the user is presented with a list of suitable existing Eclipse Application launch configurations to choose from.

This class may be instantiated or subclassed by clients.

Since:
3.3

Field Summary
static  String CONFIGURATION_TYPE
           
 
Constructor Summary
EclipseLaunchShortcut ()
           
 
Method Summary
protected   ILaunchConfiguration findLaunchConfiguration ( String mode)
          This method first tries to locate existing launch configurations that are suitable for the application or framework being launched.
protected   String getLaunchConfigurationTypeName ()
          Returns the Eclipse application configuration type ID as declared in the plugin.xml
protected   String getName ( ILaunchConfigurationType type)
          Returns the name assigned to the new launch configuration
protected  void initializeConfiguration ( ILaunchConfigurationWorkingCopy wc)
          Initializes a new Eclipse Application launch configuration with defaults based on the current selection: If there is no selection or the selected project is a plug-in that does not declare an application, the default product is launched.
protected  boolean isGoodMatch ( ILaunchConfiguration configuration)
          Returns a boolean value indicating whether the launch configuration is a good match for the application or product to launch.
 void launch ( IEditorPart editor, String mode)
           
 void launch ( ISelection selection, String mode)
           
 
Methods inherited from class org.eclipse.pde.ui.launcher. AbstractLaunchShortcut
chooseConfiguration, launch
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIGURATION_TYPE

public static final 
String CONFIGURATION_TYPE
See Also:
Constant Field Values
Constructor Detail

EclipseLaunchShortcut

public EclipseLaunchShortcut()
Method Detail

launch

public void launch(
IEditorPart editor,
                   
String mode)

launch

public void launch(
ISelection selection,
                   
String mode)

findLaunchConfiguration

protected 
ILaunchConfiguration findLaunchConfiguration(
String mode)
Description copied from class: AbstractLaunchShortcut
This method first tries to locate existing launch configurations that are suitable for the application or framework being launched.

  • If none are found, a new launch configuration is created and initialized
  • If one is found, it is launched automatically
  • If more than one is found, a selection dialog is presented to the user and the chosen one will be launched

Overrides:
findLaunchConfiguration in class AbstractLaunchShortcut
Parameters:
mode - mode of launch (run, debug or profile)
Returns:
a launch configuration to run or null if launch is canceled

isGoodMatch

protected boolean isGoodMatch(
ILaunchConfiguration configuration)
Returns a boolean value indicating whether the launch configuration is a good match for the application or product to launch.

Specified by:
isGoodMatch in class AbstractLaunchShortcut
Parameters:
configuration - the launch configuration being evaluated
Returns:
true if the launch configuration is suitable for the application or product to launch with, false otherwise.

initializeConfiguration

protected void initializeConfiguration(
ILaunchConfigurationWorkingCopy wc)
Initializes a new Eclipse Application launch configuration with defaults based on the current selection:
  • If there is no selection or the selected project is a plug-in that does not declare an application, the default product is launched.
  • If the selected project is a plug-in that declares an application, then that application is launched.
  • If the selected project is a plug-in that declares more than one application, then the user is presented with a list of choices to choose from.
Once an application is chosen, the plug-in is searched to see if there is a product bound to this application. If a product is found, the product is launched instead, since a product provides a richer branded experience.

Specified by:
initializeConfiguration in class AbstractLaunchShortcut
Parameters:
wc - the launch configuration working copy to be initialize
Since:
3.3
See Also:
IPDELauncherConstants

getLaunchConfigurationTypeName

protected 
String getLaunchConfigurationTypeName()
Returns the Eclipse application configuration type ID as declared in the plugin.xml

Specified by:
getLaunchConfigurationTypeName in class AbstractLaunchShortcut
Returns:
the Eclipse application configuration type ID

getName

protected 
String getName(
ILaunchConfigurationType type)
Description copied from class: AbstractLaunchShortcut
Returns the name assigned to the new launch configuration

Overrides:
getName in class AbstractLaunchShortcut
Returns:
a name for the new launch configuration

Eclipse PDE
Release 3.5

Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire