|
JavaScript Development Tools Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.wst.jsdt.launching.AbstractVMInstallType
org.eclipse.wst.jsdt.launching.StandardVMType
public class StandardVMType
A VM install type for VMs the conform to the standard JDK installion layout. Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
Field Summary | |
---|---|
static String |
ID_STANDARD_VM_TYPE
|
Constructor Summary | |
---|---|
StandardVMType()
|
Method Summary | |
---|---|
File |
detectInstallLocation()
Tries to detect an installed VM that matches 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 IVMInstall |
doCreateVMInstall(String id)
Subclasses should return a new instance of the appropriate IVMInstall subclass from this method. |
static File |
findJavaExecutable(File vmInstallLocation)
Starting in the specified VM install location, attempt to find the 'java' executable file. |
protected List |
gatherAllLibraries(String[] dirPaths)
Returns a list of all zips and jars contained in the given directories. |
protected File |
getDefaultEndorsedDirectory(File installLocation)
Returns the default location of the endorsed directory, based on the given install location. |
protected File |
getDefaultExtensionDirectory(File installLocation)
Returns the default location of the extension directory, based on the given install location. |
URL |
getDefaultJavadocLocation(File installLocation)
Returns a URL for the default jsdoc location of a VM installed at the given home location, or null if none. |
LibraryLocation[] |
getDefaultLibraryLocations(File installLocation)
NOTE: We do not add libraries from the "endorsed" directory explicitly, as the bootpath contains these entries already (if they exist). |
protected IPath |
getDefaultPackageRootPath()
|
protected String |
getDefaultRootPath()
|
protected IPath |
getDefaultSystemLibrary(File javaHome)
Return an IPath corresponding to the single library file containing the
standard JavaScript classes for most VMs version 1.2 and above. |
protected IPath |
getDefaultSystemLibrarySource(File libLocation)
Returns a path to the source attachment for the given libaray, or an empty path if none. |
String |
getName()
Returns the display name of this VM type. |
protected String |
getVMVersion(File javaHome,
File javaExecutable)
Returns the version of the VM at the given location, with the given executable. |
protected String[] |
parsePaths(String paths)
|
protected void |
setDefaultRootPath(String defaultRootPath)
|
IStatus |
validateInstallLocation(File javaHome)
Validates the given location of a VM installation. |
Methods inherited from class org.eclipse.wst.jsdt.launching.AbstractVMInstallType |
---|
createVMInstall, findVMInstall, findVMInstallByName, getId, getVMInstalls, setInitializationData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ID_STANDARD_VM_TYPE
Constructor Detail |
---|
public StandardVMType()
Method Detail |
---|
public static File findJavaExecutable(File vmInstallLocation)
File
object, otherwise return
null
.
public String getName()
IVMInstallType
protected IVMInstall doCreateVMInstall(String id)
AbstractVMInstallType
IVMInstall
subclass from this method.
doCreateVMInstall
in class AbstractVMInstallType
id
- The vm's id. The IVMInstall
instance that is created must
return id
from its getId()
method.
Must not be null
.
null
.protected String getVMVersion(File javaHome, File javaExecutable)
javaHome
- javaExecutable
-
public File detectInstallLocation()
IVMInstallType
null
if they
can't assure that a given vm install matches this IVMInstallType.
null
if unable
to locate an installed VM.protected IPath getDefaultSystemLibrary(File javaHome)
IPath
corresponding to the single library file containing the
standard JavaScript classes for most VMs version 1.2 and above.
protected IPath getDefaultSystemLibrarySource(File libLocation)
libLocation
-
protected IPath getDefaultPackageRootPath()
public LibraryLocation[] getDefaultLibraryLocations(File installLocation)
installLocation
- home location
installLocation
.org.eclipse.jdt.launching.IVMInstallType#getDefaultLibraryLocations(File)
protected List gatherAllLibraries(String[] dirPaths)
dirPaths
- a list of absolute paths of directories to search
protected File getDefaultExtensionDirectory(File installLocation)
null
if an extension directory is not supported.
installLocation
-
null
protected File getDefaultEndorsedDirectory(File installLocation)
null
if an endorsed directory is not supported.
installLocation
-
null
protected String getDefaultRootPath()
protected void setDefaultRootPath(String defaultRootPath)
public IStatus validateInstallLocation(File javaHome)
IVMInstallType
For example, an implementation might check whether the VM executable is present.
javaHome
- the root directory of a potential installation for
this type of VM
protected String[] parsePaths(String paths)
public void disposeVMInstall(String id)
IVMInstallType
disposeVMInstall
in interface IVMInstallType
disposeVMInstall
in class AbstractVMInstallType
id
- the id of the VM to be disposed.public URL getDefaultJavadocLocation(File installLocation)
AbstractVMInstallType
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.
getDefaultJavadocLocation
in class AbstractVMInstallType
installLocation
- home location
null
|
JavaScript Development Tools Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |