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 JDT
Release 3.5

org.eclipse.jdt.debug.ui.launchConfigurations
Class JavaLaunchShortcut


java.lang.Object
  extended by 
org.eclipse.jdt.debug.ui.launchConfigurations.JavaLaunchShortcut
All Implemented Interfaces:
ILaunchShortcut, ILaunchShortcut2
Direct Known Subclasses:
JavaAppletLaunchShortcut, JavaApplicationLaunchShortcut

public abstract class JavaLaunchShortcut
extends Object
implements ILaunchShortcut2

Common behavior for Java launch shortcuts

This class may be subclassed.

Since:
3.3

Constructor Summary
JavaLaunchShortcut ()
           
 
Method Summary
protected   ILaunchConfiguration chooseConfiguration ( List configList)
          Returns a configuration from the given collection of configurations that should be launched, or null to cancel.
protected   IType chooseType ( IType[] types, String title)
          Prompts the user to select a type from the given types.
protected abstract   ILaunchConfiguration createConfiguration ( IType type)
          Creates and returns a new configuration based on the specified type.
protected   ILaunchConfiguration findLaunchConfiguration ( IType type, ILaunchConfigurationType configType)
          Finds and returns an existing configuration to re-launch for the given type, or null if there is no existing configuration.
protected abstract   IType[] findTypes ( Object[] elements, IRunnableContext context)
          Finds and returns the types in the given collection of elements that can be launched.
protected abstract   ILaunchConfigurationType getConfigurationType ()
          Returns the type of configuration this shortcut is applicable to.
protected abstract   String getEditorEmptyMessage ()
          Returns an error message to use when the editor does not contain a type that can be launched.
  IResource getLaunchableResource ( IEditorPart editorpart)
           
  IResource getLaunchableResource ( ISelection selection)
           
  ILaunchConfiguration[] getLaunchConfigurations ( IEditorPart editorpart)
           
  ILaunchConfiguration[] getLaunchConfigurations ( ISelection selection)
           
protected abstract   String getSelectionEmptyMessage ()
          Returns an error message to use when the selection does not contain a type that can be launched.
protected   Shell getShell ()
          Convenience method to return the active workbench window shell.
protected abstract   String getTypeSelectionTitle ()
          Returns a title for a type selection dialog used to prompt the user when there is more than one type that can be launched.
 void launch ( IEditorPart editor, String mode)
           
 void launch ( ISelection selection, String mode)
           
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaLaunchShortcut

public JavaLaunchShortcut()
Method Detail

getConfigurationType

protected abstract 
ILaunchConfigurationType getConfigurationType()
Returns the type of configuration this shortcut is applicable to.

Returns:
the type of configuration this shortcut is applicable to

createConfiguration

protected abstract 
ILaunchConfiguration createConfiguration(
IType type)
Creates and returns a new configuration based on the specified type.

Parameters:
type - type to create a launch configuration for
Returns:
launch configuration configured to launch the specified type

findTypes

protected abstract 
IType[] findTypes(
Object[] elements,
                                     
IRunnableContext context)
                              throws 
InterruptedException,
                                     
CoreException
Finds and returns the types in the given collection of elements that can be launched.

Parameters:
elements - scope to search for types that can be launched
context - progress reporting context
Returns:
collection of types that can be launched, possibly empty
Throws:
InterruptedException - if the search is canceled
CoreException - if the search fails

getTypeSelectionTitle

protected abstract 
String getTypeSelectionTitle()
Returns a title for a type selection dialog used to prompt the user when there is more than one type that can be launched.

Returns:
type selection dialog title

getEditorEmptyMessage

protected abstract 
String getEditorEmptyMessage()
Returns an error message to use when the editor does not contain a type that can be launched.

Returns:
error message when editor cannot be launched

getSelectionEmptyMessage

protected abstract 
String getSelectionEmptyMessage()
Returns an error message to use when the selection does not contain a type that can be launched.

Returns:
error message when selection cannot be launched

chooseType

protected 
IType chooseType(
IType[] types,
                           
String title)
Prompts the user to select a type from the given types.

Parameters:
types - the types to choose from
title - the selection dialog title
Returns:
the selected type or null if none.

findLaunchConfiguration

protected 
ILaunchConfiguration findLaunchConfiguration(
IType type,
                                                       
ILaunchConfigurationType configType)
Finds and returns an existing configuration to re-launch for the given type, or null if there is no existing configuration.

Returns:
a configuration to use for launching the given type or null if none

chooseConfiguration

protected 
ILaunchConfiguration chooseConfiguration(
List configList)
Returns a configuration from the given collection of configurations that should be launched, or null to cancel. Default implementation opens a selection dialog that allows the user to choose one of the specified launch configurations. Returns the chosen configuration, or null if the user cancels.

Parameters:
configList - list of configurations to choose from
Returns:
configuration to launch or null to cancel

getShell

protected 
Shell getShell()
Convenience method to return the active workbench window shell.

Returns:
active workbench window shell

launch

public void launch(
IEditorPart editor,
                   
String mode)
Specified by:
launch in interface ILaunchShortcut

launch

public void launch(
ISelection selection,
                   
String mode)
Specified by:
launch in interface ILaunchShortcut

getLaunchableResource

public 
IResource getLaunchableResource(
IEditorPart editorpart)
Specified by:
getLaunchableResource in interface ILaunchShortcut2

getLaunchableResource

public 
IResource getLaunchableResource(
ISelection selection)
Specified by:
getLaunchableResource in interface ILaunchShortcut2

getLaunchConfigurations

public 
ILaunchConfiguration[] getLaunchConfigurations(
IEditorPart editorpart)
Specified by:
getLaunchConfigurations in interface ILaunchShortcut2

getLaunchConfigurations

public 
ILaunchConfiguration[] getLaunchConfigurations(
ISelection selection)
Specified by:
getLaunchConfigurations in interface ILaunchShortcut2

Eclipse JDT
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