Eclipse JDT
Release 3.0

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

java.lang.Object
  extended byorg.eclipse.debug.ui.AbstractLaunchConfigurationTab
      extended byorg.eclipse.jdt.internal.debug.ui.launcher.JavaLaunchConfigurationTab
          extended byorg.eclipse.jdt.debug.ui.launchConfigurations.JavaMainTab
All Implemented Interfaces:
org.eclipse.jdt.internal.debug.ui.launcher.IEntriesChangedListener, org.eclipse.debug.ui.ILaunchConfigurationTab

public class JavaMainTab
extends org.eclipse.jdt.internal.debug.ui.launcher.JavaLaunchConfigurationTab

A launch configuration tab that displays and edits project and main type name launch configuration attributes.

This class may be instantiated. This class is not intended to be subclassed.

Since:
2.0

Field Summary
static String ATTR_CONSIDER_INHERITED_MAIN
          Boolean launch configuration attribute indicating whether types inheriting a main method should be considerd when searching for a main type.
static String ATTR_INCLUDE_EXTERNAL_JARS
          Boolean launch configuration attribute indicating that external jars (on the runtime classpath) should be searched when looking for a main type.
protected static String EMPTY_STRING
           
protected  org.eclipse.swt.widgets.Button fConsiderInheritedMainButton
           
protected  org.eclipse.swt.widgets.Text fMainText
           
protected  org.eclipse.swt.widgets.Button fProjButton
           
protected  org.eclipse.swt.widgets.Text fProjText
           
protected  org.eclipse.swt.widgets.Button fSearchButton
           
protected  org.eclipse.swt.widgets.Button fSearchExternalJarsCheckButton
           
protected  org.eclipse.swt.widgets.Button fStopInMainCheckButton
           
 
Constructor Summary
JavaMainTab()
           
 
Method Summary
 void activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy workingCopy)
           
protected  IJavaProject chooseJavaProject()
          Realize a Java Project selection dialog and return the first selected project, or null if there was none.
 void createControl(org.eclipse.swt.widgets.Composite parent)
           
 void deactivated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy workingCopy)
           
 void dispose()
           
 org.eclipse.swt.graphics.Image getImage()
           
protected  IJavaProject getJavaProject()
          Return the IJavaProject corresponding to the project name in the project name text field, or null if the text does not match a project name.
 String getName()
           
protected  void handleProjectButtonSelected()
          Show a dialog that lets the user select a project.
protected  void handleSearchButtonSelected()
          Show a dialog that lists all main types
 void initializeFrom(org.eclipse.debug.core.ILaunchConfiguration config)
           
protected  void initializeMainTypeAndName(IJavaElement javaElement, org.eclipse.debug.core.ILaunchConfigurationWorkingCopy config)
          Set the main type & name attributes on the working copy based on the IJavaElement
 boolean isValid(org.eclipse.debug.core.ILaunchConfiguration config)
           
 void performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy config)
           
 void setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy config)
           
protected  void updateExternalJars(org.eclipse.debug.core.ILaunchConfiguration configuration)
           
protected  void updateInheritedMainsFromConfig(org.eclipse.debug.core.ILaunchConfiguration configuration)
           
protected  void updateMainTypeFromConfig(org.eclipse.debug.core.ILaunchConfiguration config)
           
protected  void updateProjectFromConfig(org.eclipse.debug.core.ILaunchConfiguration config)
           
protected  void updateStopInMainFromConfig(org.eclipse.debug.core.ILaunchConfiguration configuration)
           
 
Methods inherited from class org.eclipse.jdt.internal.debug.ui.launcher.JavaLaunchConfigurationTab
entriesChanged, getContext, initializeJavaProject
 
Methods inherited from class org.eclipse.debug.ui.AbstractLaunchConfigurationTab
canSave, createCheckButton, createPushButton, createRadioButton, createSeparator, createVerticalSpacer, getControl, getErrorMessage, getLaunchConfigurationDialog, getLaunchManager, getMessage, getShell, isDirty, launched, setAttribute, setControl, setDirty, setErrorMessage, setLaunchConfigurationDialog, setMessage, updateLaunchConfigurationDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fProjText

protected org.eclipse.swt.widgets.Text fProjText

fProjButton

protected org.eclipse.swt.widgets.Button fProjButton

fMainText

protected org.eclipse.swt.widgets.Text fMainText

fSearchButton

protected org.eclipse.swt.widgets.Button fSearchButton

fSearchExternalJarsCheckButton

protected org.eclipse.swt.widgets.Button fSearchExternalJarsCheckButton

fConsiderInheritedMainButton

protected org.eclipse.swt.widgets.Button fConsiderInheritedMainButton

fStopInMainCheckButton

protected org.eclipse.swt.widgets.Button fStopInMainCheckButton

EMPTY_STRING

protected static final String EMPTY_STRING
See Also:
Constant Field Values

ATTR_INCLUDE_EXTERNAL_JARS

public static final String ATTR_INCLUDE_EXTERNAL_JARS
Boolean launch configuration attribute indicating that external jars (on the runtime classpath) should be searched when looking for a main type. Default value is false.

Since:
2.1

ATTR_CONSIDER_INHERITED_MAIN

public static final String ATTR_CONSIDER_INHERITED_MAIN
Boolean launch configuration attribute indicating whether types inheriting a main method should be considerd when searching for a main type. Default value is false.

Since:
3.0
Constructor Detail

JavaMainTab

public JavaMainTab()
Method Detail

createControl

public void createControl(org.eclipse.swt.widgets.Composite parent)
See Also:
ILaunchConfigurationTab.createControl(Composite)

initializeFrom

public void initializeFrom(org.eclipse.debug.core.ILaunchConfiguration config)
See Also:
ILaunchConfigurationTab.initializeFrom(ILaunchConfiguration)

updateProjectFromConfig

protected void updateProjectFromConfig(org.eclipse.debug.core.ILaunchConfiguration config)

updateMainTypeFromConfig

protected void updateMainTypeFromConfig(org.eclipse.debug.core.ILaunchConfiguration config)

updateStopInMainFromConfig

protected void updateStopInMainFromConfig(org.eclipse.debug.core.ILaunchConfiguration configuration)

updateInheritedMainsFromConfig

protected void updateInheritedMainsFromConfig(org.eclipse.debug.core.ILaunchConfiguration configuration)

updateExternalJars

protected void updateExternalJars(org.eclipse.debug.core.ILaunchConfiguration configuration)

performApply

public void performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy config)
See Also:
ILaunchConfigurationTab.performApply(ILaunchConfigurationWorkingCopy)

dispose

public void dispose()
See Also:
ILaunchConfigurationTab.dispose()

handleSearchButtonSelected

protected void handleSearchButtonSelected()
Show a dialog that lists all main types


handleProjectButtonSelected

protected void handleProjectButtonSelected()
Show a dialog that lets the user select a project. This in turn provides context for the main type, allowing the user to key a main type name, or constraining the search for main types to the specified project.


chooseJavaProject

protected IJavaProject chooseJavaProject()
Realize a Java Project selection dialog and return the first selected project, or null if there was none.


getJavaProject

protected IJavaProject getJavaProject()
Return the IJavaProject corresponding to the project name in the project name text field, or null if the text does not match a project name.


isValid

public boolean isValid(org.eclipse.debug.core.ILaunchConfiguration config)
See Also:
ILaunchConfigurationTab.isValid(ILaunchConfiguration)

setDefaults

public void setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy config)
See Also:
ILaunchConfigurationTab.setDefaults(ILaunchConfigurationWorkingCopy)

initializeMainTypeAndName

protected void initializeMainTypeAndName(IJavaElement javaElement,
                                         org.eclipse.debug.core.ILaunchConfigurationWorkingCopy config)
Set the main type & name attributes on the working copy based on the IJavaElement


getName

public String getName()
See Also:
ILaunchConfigurationTab.getName()

getImage

public org.eclipse.swt.graphics.Image getImage()
See Also:
ILaunchConfigurationTab.getImage()

activated

public void activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy workingCopy)

deactivated

public void deactivated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy workingCopy)

Eclipse JDT
Release 3.0

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