Package org.eclipse.jdt.launching
Class AbstractVMInstallType
java.lang.Object
org.eclipse.jdt.launching.AbstractVMInstallType
- All Implemented Interfaces:
org.eclipse.core.runtime.IExecutableExtension,IVMInstallType
public abstract class AbstractVMInstallType
extends Object
implements IVMInstallType, org.eclipse.core.runtime.IExecutableExtension
Abstract implementation of a VM install type.
Subclasses should implement
IVMInstall doCreateVMInstall(String id)String getName()IStatus validateInstallLocation(File installLocation)
Clients implementing VM install types should subclass this class.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs a new VM install type. -
Method Summary
Modifier and TypeMethodDescriptionCreates a new instance of this VM Install type.voidRemove the VM associated with the given id from the set of VMs managed by this VM type.protected abstract IVMInstallSubclasses should return a new instance of the appropriateIVMInstallsubclass from this method.findVMInstall(String id) Finds the VM with the given id.findVMInstallByName(String name) Finds the VM with the given name.getDefaultJavadocLocation(File installLocation) Returns a URL for the default javadoc location of a VM installed at the given home location, ornullif none.getDefaultVMArguments(File installLocation) Returns a string of default VM arguments for a VM installed at the given home location, ornullif none.getId()Returns the globally unique id of this VM type.Returns all VM instances managed by this VM type.voidsetInitializationData(org.eclipse.core.runtime.IConfigurationElement config, String propertyName, Object data) Initializes the id parameter from the "id" attribute in the configuration markup.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.jdt.launching.IVMInstallType
detectInstallLocation, getDefaultLibraryLocations, getName, validateInstallLocation
-
Constructor Details
-
AbstractVMInstallType
protected AbstractVMInstallType()Constructs a new VM install type.
-
-
Method Details
-
getVMInstalls
Description copied from interface:IVMInstallTypeReturns all VM instances managed by this VM type.- Specified by:
getVMInstallsin interfaceIVMInstallType- Returns:
- the list of VM instances managed by this VM type
-
disposeVMInstall
Description copied from interface:IVMInstallTypeRemove the VM associated with the given id from the set of VMs managed by this VM type. Has no effect if a VM with the given id is not currently managed by this type. A VM install that is disposed may not be used anymore.- Specified by:
disposeVMInstallin interfaceIVMInstallType- Parameters:
id- the id of the VM to be disposed.
-
findVMInstall
Description copied from interface:IVMInstallTypeFinds the VM with the given id.- Specified by:
findVMInstallin interfaceIVMInstallType- Parameters:
id- the VM id- Returns:
- a VM instance, or
nullif not found
-
createVMInstall
Description copied from interface:IVMInstallTypeCreates a new instance of this VM Install type. The newly created IVMInstall is managed by this IVMInstallType.- Specified by:
createVMInstallin interfaceIVMInstallType- Parameters:
id- An id String that must be unique within this IVMInstallType.- Returns:
- the newly created VM instance
- Throws:
IllegalArgumentException- If the id exists already.
-
doCreateVMInstall
Subclasses should return a new instance of the appropriateIVMInstallsubclass from this method.- Parameters:
id- The vm's id. TheIVMInstallinstance that is created must returnidfrom itsgetId()method. Must not benull.- Returns:
- the newly created IVMInstall instance. Must not return
null.
-
setInitializationData
public void setInitializationData(org.eclipse.core.runtime.IConfigurationElement config, String propertyName, Object data) Initializes the id parameter from the "id" attribute in the configuration markup. Subclasses should not override this method.- Specified by:
setInitializationDatain interfaceorg.eclipse.core.runtime.IExecutableExtension- Parameters:
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 thecreateExecutableExtension(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 aString, aHashtable, ornull.- See Also:
-
getId
Description copied from interface:IVMInstallTypeReturns the globally unique id of this VM type. Clients are responsible for providing a unique id.- Specified by:
getIdin interfaceIVMInstallType- Returns:
- the id of this IVMInstallType
-
findVMInstallByName
Description copied from interface:IVMInstallTypeFinds the VM with the given name.- Specified by:
findVMInstallByNamein interfaceIVMInstallType- Parameters:
name- the VM name- Returns:
- a VM instance, or
nullif not found
-
getDefaultJavadocLocation
Returns a URL for the default javadoc location of a VM installed at the given home location, ornullif none. The default implementation returnsnull, 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.- Parameters:
installLocation- home location- Returns:
- default javadoc location or
null - Since:
- 2.1
-
getDefaultVMArguments
Returns a string of default VM arguments for a VM installed at the given home location, ornullif none. The default implementation returnsnull, 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.- Parameters:
installLocation- home location- Returns:
- default VM arguments or
nullif none - Since:
- 3.4
-