public abstract class AbstractVMInstallType extends Object implements IVMInstallType, IExecutableExtension
IVMInstall doCreateVMInstall(String id)
String getName()
IStatus validateInstallLocation(File installLocation)
Clients implementing VM install types should subclass this class.
Modifier | Constructor and Description |
---|---|
protected |
AbstractVMInstallType()
Constructs a new VM install type.
|
Modifier and Type | Method and Description |
---|---|
IVMInstall |
createVMInstall(String id)
Creates a new instance of this VM Install type.
|
void |
disposeVMInstall(String id)
Remove the VM associated with the given id from the set of VMs managed by
this VM type.
|
protected abstract IVMInstall |
doCreateVMInstall(String id)
Subclasses should return a new instance of the appropriate
IVMInstall subclass from this method. |
IVMInstall |
findVMInstall(String id)
Finds the VM with the given id.
|
IVMInstall |
findVMInstallByName(String name)
Finds the VM with the given name.
|
URL |
getDefaultJavadocLocation(File installLocation)
Returns a URL for the default javadoc location of a VM installed at the
given home location, or
null if none. |
String |
getDefaultVMArguments(File installLocation)
Returns a string of default VM arguments for a VM installed at the
given home location, or
null if none. |
String |
getId()
Returns the globally unique id of this VM type.
|
IVMInstall[] |
getVMInstalls()
Returns all VM instances managed by this VM type.
|
void |
setInitializationData(IConfigurationElement config,
String propertyName,
Object data)
Initializes the id parameter from the "id" attribute
in the configuration markup.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
detectInstallLocation, getDefaultLibraryLocations, getName, validateInstallLocation
protected AbstractVMInstallType()
public IVMInstall[] getVMInstalls()
IVMInstallType
getVMInstalls
in interface IVMInstallType
public void disposeVMInstall(String id)
IVMInstallType
disposeVMInstall
in interface IVMInstallType
id
- the id of the VM to be disposed.public IVMInstall findVMInstall(String id)
IVMInstallType
findVMInstall
in interface IVMInstallType
id
- the VM idnull
if not foundpublic IVMInstall createVMInstall(String id) throws IllegalArgumentException
IVMInstallType
createVMInstall
in interface IVMInstallType
id
- An id String that must be unique within this IVMInstallType.IllegalArgumentException
- If the id exists already.protected abstract IVMInstall doCreateVMInstall(String id)
IVMInstall
subclass from this method.id
- The vm's id. The IVMInstall
instance that is created must
return id
from its getId()
method.
Must not be null
.null
.public void setInitializationData(IConfigurationElement config, String propertyName, Object data)
setInitializationData
in interface IExecutableExtension
config
- the configuration element used to trigger this execution.
It can be queried by the executable extension for specific
configuration propertiespropertyName
- the name of an attribute of the configuration element
used on the createExecutableExtension(String)
call. This
argument can be used in the cases where a single configuration element
is used to define multiple executable extensions.data
- adapter data in the form of a String
,
a Hashtable
, or null
.IExecutableExtension.setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
public String getId()
IVMInstallType
getId
in interface IVMInstallType
public IVMInstall findVMInstallByName(String name)
IVMInstallType
findVMInstallByName
in interface IVMInstallType
name
- the VM namenull
if not foundpublic URL getDefaultJavadocLocation(File installLocation)
null
if none. The default
implementation returns null
, subclasses must override as
appropriate.
Note, this method would ideally be added to IVMInstallType
,
but it would have been a breaking API change between 2.0 and 2.1. Thus,
it has been added to the abstract base class that VM install types should
subclass.
installLocation
- home locationnull
public String getDefaultVMArguments(File installLocation)
null
if none.
The default implementation returns null
, subclasses must override
as appropriate.
Note, this method would ideally be added to IVMInstallType
,
but it would have been a breaking API change between 2.0 and 3.4. Thus,
it has been added to the abstract base class that VM install types should
subclass.
installLocation
- home locationnull
if none
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.