Eclipse JDT
2.0

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

java.lang.Object
  |
  +--org.eclipse.debug.ui.AbstractLaunchConfigurationTab
        |
        +--org.eclipse.jdt.internal.debug.ui.launcher.JavaLaunchConfigurationTab
              |
              +--org.eclipse.jdt.debug.ui.launchConfigurations.JavaJRETab
All Implemented Interfaces:
org.eclipse.jdt.internal.debug.ui.launcher.IAddVMDialogRequestor, org.eclipse.jdt.internal.debug.ui.launcher.IEntriesChangedListener, ILaunchConfigurationTab

public class JavaJRETab
extends org.eclipse.jdt.internal.debug.ui.launcher.JavaLaunchConfigurationTab
implements org.eclipse.jdt.internal.debug.ui.launcher.IAddVMDialogRequestor

A launch configuration tab that displays and edits the VM install launch configuration attributes.

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

Since:
2.0

Field Summary
protected static String DEFAULT_JRE_NAME
           
protected static String EMPTY_STRING
           
protected  ILaunchConfigurationTab fDynamicTab
           
protected  Composite fDynamicTabHolder
           
protected  Button fJREAddButton
           
protected  Combo fJRECombo
           
protected  Label fJRELabel
           
protected  ILaunchConfiguration fLaunchConfiguration
           
protected  boolean fOkToClearUnknownVM
           
protected  String fUnknownVMName
           
protected  String fUnknownVMType
           
protected  boolean fUseDynamicArea
           
protected  List fVMStandins
           
protected  IVMInstallType[] fVMTypes
           
protected  ILaunchConfigurationWorkingCopy fWorkingCopy
           
 
Constructor Summary
JavaJRETab()
           
 
Method Summary
protected  void clearJREComboBoxEntry()
          Convenience method to remove any selection in the JRE combo box
 void createControl(Composite parent)
           
protected  ILaunchConfigurationTab getDynamicTab()
           
protected  Composite getDynamicTabHolder()
           
 String getErrorMessage()
          Overridden here so that any error message in the dynamic UI gets returned.
 Image getImage()
           
protected  ILaunchConfiguration getLaunchConfiguration()
           
protected  ILaunchConfigurationWorkingCopy getLaunchConfigurationWorkingCopy()
           
 String getName()
           
protected  ILaunchConfigurationTab getTabForCurrentJRE()
          Return the class that implements ILaunchConfigurationTab that is registered against the install type of the currently selected VM.
protected  void handleJREAddButtonSelected()
          Show a dialog that lets the user add a new JRE definition
protected  void handleJREComboBoxModified()
          Notification that the user changed the selection in the JRE combo box.
 void initializeFrom(ILaunchConfiguration configuration)
           
protected  void initializeJREComboBox()
          Load the JRE related collections, and use these to set the values on the combo box
 boolean isDuplicateName(IVMInstallType type, String name)
          Reply whether or not a new VM of the specified name and type would constitute a duplicate.
protected  boolean isUseDynamicJREArea()
           
 boolean isValid(ILaunchConfiguration config)
           
protected  void loadDynamicJREArea()
          Show the contributed piece of UI that was registered for the install type of the currently selected VM.
 void performApply(ILaunchConfigurationWorkingCopy configuration)
           
protected  void populateJREComboBox()
          Set the available items on the JRE combo box
protected  void selectJREComboBoxEntry(String typeID, String vmName)
          Cause the specified VM to be selected in the JRE combo box.
 void setDefaults(ILaunchConfigurationWorkingCopy config)
           
protected  void setDynamicTab(ILaunchConfigurationTab tab)
           
protected  void setDynamicTabHolder(Composite tabHolder)
           
protected  void setLaunchConfiguration(ILaunchConfiguration launchConfiguration)
           
protected  void setLaunchConfigurationWorkingCopy(ILaunchConfigurationWorkingCopy workingCopy)
           
 void setVMSpecificArgumentsVisible(boolean visible)
          Sets whether this tab will display the VM specific arguments area if a JRE supports VM specific arguments.
protected  void updateJREFromConfig(ILaunchConfiguration config)
           
 void vmAdded(IVMInstall vm)
          Notification that a VM has been added from the AddVMDialog.
 
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, createPushButton, createRadioButton, createVerticalSpacer, dispose, getControl, getLaunchConfigurationDialog, getLaunchManager, getMessage, getShell, launched, setControl, setErrorMessage, setLaunchConfigurationDialog, setMessage, updateLaunchConfigurationDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fJRELabel

protected Label fJRELabel

fJRECombo

protected Combo fJRECombo

fJREAddButton

protected Button fJREAddButton

fUnknownVMType

protected String fUnknownVMType

fUnknownVMName

protected String fUnknownVMName

fOkToClearUnknownVM

protected boolean fOkToClearUnknownVM

fVMTypes

protected IVMInstallType[] fVMTypes

fVMStandins

protected List fVMStandins

fDynamicTab

protected ILaunchConfigurationTab fDynamicTab

fDynamicTabHolder

protected Composite fDynamicTabHolder

fUseDynamicArea

protected boolean fUseDynamicArea

fWorkingCopy

protected ILaunchConfigurationWorkingCopy fWorkingCopy

fLaunchConfiguration

protected ILaunchConfiguration fLaunchConfiguration

DEFAULT_JRE_NAME

protected static final String DEFAULT_JRE_NAME

EMPTY_STRING

protected static final String EMPTY_STRING
See Also:
Constant Field Values
Constructor Detail

JavaJRETab

public JavaJRETab()
Method Detail

createControl

public void createControl(Composite parent)
Specified by:
createControl in interface ILaunchConfigurationTab
Specified by:
createControl in class AbstractLaunchConfigurationTab
See Also:
ILaunchConfigurationTab.createControl(Composite)

setDynamicTabHolder

protected void setDynamicTabHolder(Composite tabHolder)

getDynamicTabHolder

protected Composite getDynamicTabHolder()

setDynamicTab

protected void setDynamicTab(ILaunchConfigurationTab tab)

getDynamicTab

protected ILaunchConfigurationTab getDynamicTab()

setDefaults

public void setDefaults(ILaunchConfigurationWorkingCopy config)
Specified by:
setDefaults in interface ILaunchConfigurationTab
Specified by:
setDefaults in class AbstractLaunchConfigurationTab
See Also:
ILaunchConfigurationTab.setDefaults(ILaunchConfigurationWorkingCopy)

initializeFrom

public void initializeFrom(ILaunchConfiguration configuration)
Specified by:
initializeFrom in interface ILaunchConfigurationTab
Specified by:
initializeFrom in class AbstractLaunchConfigurationTab
See Also:
ILaunchConfigurationTab.initializeFrom(ILaunchConfiguration)

performApply

public void performApply(ILaunchConfigurationWorkingCopy configuration)
Specified by:
performApply in interface ILaunchConfigurationTab
Specified by:
performApply in class AbstractLaunchConfigurationTab
See Also:
ILaunchConfigurationTab.performApply(ILaunchConfigurationWorkingCopy)

isValid

public boolean isValid(ILaunchConfiguration config)
Specified by:
isValid in interface ILaunchConfigurationTab
Overrides:
isValid in class AbstractLaunchConfigurationTab
See Also:
ILaunchConfigurationTab.isValid(ILaunchConfiguration)

getName

public String getName()
Specified by:
getName in interface ILaunchConfigurationTab
Specified by:
getName in class AbstractLaunchConfigurationTab
See Also:
ILaunchConfigurationTab.getName()

getImage

public Image getImage()
Specified by:
getImage in interface ILaunchConfigurationTab
Overrides:
getImage in class AbstractLaunchConfigurationTab
See Also:
ILaunchConfigurationTab.getImage()

isDuplicateName

public boolean isDuplicateName(IVMInstallType type,
                               String name)
Description copied from interface: org.eclipse.jdt.internal.debug.ui.launcher.IAddVMDialogRequestor
Reply whether or not a new VM of the specified name and type would constitute a duplicate.

Specified by:
isDuplicateName in interface org.eclipse.jdt.internal.debug.ui.launcher.IAddVMDialogRequestor
Parameters:
type - the type of a potential new VM
name - the name of a potential new VM
Returns:
whether a new VM of the specified type and name would be a duplicate VM
See Also:
IAddVMDialogRequestor.isDuplicateName(IVMInstallType, String)

vmAdded

public void vmAdded(IVMInstall vm)
Description copied from interface: org.eclipse.jdt.internal.debug.ui.launcher.IAddVMDialogRequestor
Notification that a VM has been added from the AddVMDialog.

Specified by:
vmAdded in interface org.eclipse.jdt.internal.debug.ui.launcher.IAddVMDialogRequestor
Parameters:
vm - the added vm
See Also:
IAddVMDialogRequestor.vmAdded(IVMInstall)

updateJREFromConfig

protected void updateJREFromConfig(ILaunchConfiguration config)

initializeJREComboBox

protected void initializeJREComboBox()
Load the JRE related collections, and use these to set the values on the combo box


handleJREComboBoxModified

protected void handleJREComboBoxModified()
Notification that the user changed the selection in the JRE combo box.


handleJREAddButtonSelected

protected void handleJREAddButtonSelected()
Show a dialog that lets the user add a new JRE definition


populateJREComboBox

protected void populateJREComboBox()
Set the available items on the JRE combo box


selectJREComboBoxEntry

protected void selectJREComboBoxEntry(String typeID,
                                      String vmName)
Cause the specified VM to be selected in the JRE combo box. This relies on the fact that the JRE names in the combo box are in the same order as they are in the fVMStandins list.

Parameters:
typeID - the VM install type identifier, or null to select "default"
vmName - vm name, or null to select "default"

clearJREComboBoxEntry

protected void clearJREComboBoxEntry()
Convenience method to remove any selection in the JRE combo box


getTabForCurrentJRE

protected ILaunchConfigurationTab getTabForCurrentJRE()
Return the class that implements ILaunchConfigurationTab that is registered against the install type of the currently selected VM.


loadDynamicJREArea

protected void loadDynamicJREArea()
Show the contributed piece of UI that was registered for the install type of the currently selected VM.


getLaunchConfigurationWorkingCopy

protected ILaunchConfigurationWorkingCopy getLaunchConfigurationWorkingCopy()

getErrorMessage

public String getErrorMessage()
Overridden here so that any error message in the dynamic UI gets returned.

Specified by:
getErrorMessage in interface ILaunchConfigurationTab
Overrides:
getErrorMessage in class AbstractLaunchConfigurationTab
See Also:
ILaunchConfigurationTab.getErrorMessage()

setLaunchConfigurationWorkingCopy

protected void setLaunchConfigurationWorkingCopy(ILaunchConfigurationWorkingCopy workingCopy)

getLaunchConfiguration

protected ILaunchConfiguration getLaunchConfiguration()

setLaunchConfiguration

protected void setLaunchConfiguration(ILaunchConfiguration launchConfiguration)

setVMSpecificArgumentsVisible

public void setVMSpecificArgumentsVisible(boolean visible)
Sets whether this tab will display the VM specific arguments area if a JRE supports VM specific arguments.

Parameters:
visible - whether this tab will display the VM specific arguments area if a JRE supports VM specific arguments

isUseDynamicJREArea

protected boolean isUseDynamicJREArea()

Eclipse JDT
2.0

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