Class AbstractVMInstallPage
java.lang.Object
org.eclipse.jface.dialogs.DialogPage
org.eclipse.jface.wizard.WizardPage
org.eclipse.jdt.debug.ui.launchConfigurations.AbstractVMInstallPage
- All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage
,org.eclipse.jface.dialogs.IMessageProvider
,org.eclipse.jface.wizard.IWizardPage
public abstract class AbstractVMInstallPage
extends org.eclipse.jface.wizard.WizardPage
A wizard page used to edit the attributes of an installed JRE. A page is
provided by JDT to edit standard JREs, but clients may contribute a custom
page for a VM install type if required.
A VM install page is contributed via the vmInstallPages
extension
point. Following is an example definition of a VM install page.
<extension point="org.eclipse.jdt.debug.ui.vmInstallPages"> <vmInstallPage vmInstallType="org.eclipse.jdt.launching.EEVMType" class="org.eclipse.jdt.internal.debug.ui.jres.EEVMPage"> </vmInstallPage> </extension>The attributes are specified as follows:
vmInstallType
Specifies the VM install type this wizard page is to be used for. Unique identifier corresponding to anIVMInstallType
's id.class
Wizard page implementation. Must be a subclass oforg.eclipse.jdt.debug.ui.launchConfigurations.AbstractVMInstallPage
.
Clients contributing a custom VM install page via the vmInstallPages
extension point must subclass this class.
- Since:
- 3.3
-
Field Summary
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractVMInstallPage
(String pageName) Constructs a new page with the given page name.protected
AbstractVMInstallPage
(String pageName, String title, org.eclipse.jface.resource.ImageDescriptor titleImage) Creates a new wizard page with the given name, title, and image. -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
finish()
Called when the VM install page wizard is closed by selecting the finish button.protected org.eclipse.core.runtime.IStatus
Returns the current status of the name being used for the VM.org.eclipse.jface.wizard.IWizardPage
abstract VMStandin
Returns the edited or created VM install.protected abstract org.eclipse.core.runtime.IStatus[]
Returns a collection of status messages pertaining to the current edit status of the VM on this page.protected void
nameChanged
(String newName) Deprecated.protected void
nameChanged
(String newName, boolean init) Updates the name status based on the new name.void
setExistingNames
(String[] names) Sets the names of existing VMs, not including the VM being edited.void
Sets the VM install to be edited.protected void
setStatusMessage
(org.eclipse.core.runtime.IStatus status) Sets this page's message based on the status severity.protected void
Updates the status message on the page, based on the status of the VM and other status provided by the page.Methods inherited from class org.eclipse.jface.wizard.WizardPage
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage
createControl, dispose, getControl, getDescription, getErrorMessage, getMessage, getTitle, performHelp, setVisible
Methods inherited from interface org.eclipse.jface.wizard.IWizardPage
getMinimumPageSize
-
Constructor Details
-
AbstractVMInstallPage
Constructs a new page with the given page name.- Parameters:
pageName
- the name of the page
-
AbstractVMInstallPage
protected AbstractVMInstallPage(String pageName, String title, org.eclipse.jface.resource.ImageDescriptor titleImage) Creates a new wizard page with the given name, title, and image.- Parameters:
pageName
- the name of the pagetitle
- the title for this wizard page, ornull
if nonetitleImage
- the image descriptor for the title of this wizard page, ornull
if none
-
-
Method Details
-
finish
public abstract boolean finish()Called when the VM install page wizard is closed by selecting the finish button. Implementers typically override this method to store the page result (new/changed vm install returned in getSelection) into its model.- Returns:
- if the operation was successful. Only when returned
true
, the wizard will close.
-
getSelection
Returns the edited or created VM install. This method may returnnull
if no VM install exists.- Returns:
- the edited or created VM install.
-
setSelection
Sets the VM install to be edited.- Parameters:
vm
- the VM install to edit
-
nameChanged
Deprecated.Updates the name status based on the new name. This method should be called by the page each time the VM name changes. Use nameChanged(String newName, boolean init)- Parameters:
newName
- new name of VM
-
nameChanged
Updates the name status based on the new name. This method should be called by the page each time the VM name changes.- Parameters:
newName
- new name of VMinit
-true
if page is getting initialized elsefalse
- Since:
- 3.11
-
setExistingNames
Sets the names of existing VMs, not including the VM being edited. This method is called by the wizard and clients should not call this method.- Parameters:
names
- existing VM names or an empty array
-
getNextPage
public org.eclipse.jface.wizard.IWizardPage getNextPage()- Specified by:
getNextPage
in interfaceorg.eclipse.jface.wizard.IWizardPage
- Overrides:
getNextPage
in classorg.eclipse.jface.wizard.WizardPage
-
setStatusMessage
protected void setStatusMessage(org.eclipse.core.runtime.IStatus status) Sets this page's message based on the status severity.- Parameters:
status
- status with message and severity
-
getNameStatus
protected org.eclipse.core.runtime.IStatus getNameStatus()Returns the current status of the name being used for the VM.- Returns:
- status of current VM name
-
updatePageStatus
protected void updatePageStatus()Updates the status message on the page, based on the status of the VM and other status provided by the page. -
getVMStatus
protected abstract org.eclipse.core.runtime.IStatus[] getVMStatus()Returns a collection of status messages pertaining to the current edit status of the VM on this page. An empty collection or a collection of OK status objects indicates all is well.- Returns:
- collection of status objects for this page
-