Eclipse JDT
2.1

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_PREFIX
           
protected static String EMPTY_STRING
           
protected  String fDefaultVMName
          Name of the default VM or null if a default VM does not exist.
protected  ILaunchConfigurationTab fDynamicTab
           
protected  Composite fDynamicTabHolder
           
protected  boolean fIsInitializing
           
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
protected  String constructDefaultJREName(IVMInstall defaultVM)
           
 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  int getVMNameIndex(String searchVMName)
          Return the index of the specified VM name in the array of VM names contained in the JRE combo box widget.
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(String name)
          Reply whether or not a new VM of the specified name 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_OLD(String typeID, String vmName)
          Cause the specified VM name to be selected in the JRE combo box.
protected  void selectJREComboBoxEntry(String typeID, String vmName)
           
 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, 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

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

fIsInitializing

protected boolean fIsInitializing

DEFAULT_JRE_NAME_PREFIX

protected static final String DEFAULT_JRE_NAME_PREFIX

EMPTY_STRING

protected static final String EMPTY_STRING

fDefaultVMName

protected String fDefaultVMName
Name of the default VM or null if a default VM does not exist.
Constructor Detail

JavaJRETab

public JavaJRETab()
Method Detail

createControl

public void createControl(Composite parent)
Overrides:
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)
Overrides:
setDefaults in class AbstractLaunchConfigurationTab
See Also:
ILaunchConfigurationTab.setDefaults(ILaunchConfigurationWorkingCopy)

initializeFrom

public void initializeFrom(ILaunchConfiguration configuration)
Overrides:
initializeFrom in class AbstractLaunchConfigurationTab
See Also:
ILaunchConfigurationTab.initializeFrom(ILaunchConfiguration)

performApply

public void performApply(ILaunchConfigurationWorkingCopy configuration)
Overrides:
performApply in class AbstractLaunchConfigurationTab
See Also:
ILaunchConfigurationTab.performApply(ILaunchConfigurationWorkingCopy)

isValid

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

getName

public String getName()
Overrides:
getName in class AbstractLaunchConfigurationTab
See Also:
ILaunchConfigurationTab.getName()

getImage

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

isDuplicateName

public boolean isDuplicateName(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 would constitute a duplicate.
Specified by:
isDuplicateName in interface org.eclipse.jdt.internal.debug.ui.launcher.IAddVMDialogRequestor
See Also:
IAddVMDialogRequestor.isDuplicateName(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
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

constructDefaultJREName

protected String constructDefaultJREName(IVMInstall defaultVM)

selectJREComboBoxEntry_OLD

protected void selectJREComboBoxEntry_OLD(String typeID,
                                          String vmName)
Cause the specified VM name 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"

selectJREComboBoxEntry

protected void selectJREComboBoxEntry(String typeID,
                                      String vmName)

getVMNameIndex

protected int getVMNameIndex(String searchVMName)
Return the index of the specified VM name in the array of VM names contained in the JRE combo box widget. Return -1 if the specified name is not found.

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.
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.1

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