JavaScript Development Tools
Release 3.2

org.eclipse.wst.jsdt.launching
Interface IRuntimeClasspathEntry

All Known Subinterfaces:
IRuntimeClasspathEntry2

public interface IRuntimeClasspathEntry

Represents an entry on a runtime includepath. A runtime includepath entry may refer to one of the following:

Clients may implement this interface for contributed a includepath entry types (i.e. type OTHER). Note, contributed includepath entries are new in 3.0, and are only intended to be contributed by the JavaScript debugger.

See Also:
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 int ARCHIVE
          Type identifier for archive entries.
static int BOOTSTRAP_CLASSES
          Classpath property identifier for entries that should appear on the bootstrap path explicitly.
static int CONTAINER
          Type identifier for container entries.
static int OTHER
          Type identifier for contributed entries.
static int PROJECT
          Type identifier for project entries.
static int STANDARD_CLASSES
          Classpath property identifier for entries that appear on the bootstrap path by default.
static int USER_CLASSES
          Classpath property identifier for entries that should appear on the user includepath.
static int VARIABLE
          Type identifier for variable entries.
 
Method Summary
 IIncludePathEntry getClasspathEntry()
          Returns a includepath entry equivalent to this runtime includepath entry, or null if none.
 int getClasspathProperty()
          Returns a constant indicating where this entry should appear on the runtime includepath by default.
 IJavaScriptProject getJavaProject()
          Returns the JavaScript project associated with this runtime includepath entry or null if none.
 String getLocation()
          Returns an absolute path in the local file system for this entry, or null if none, or if this entry is of type CONTAINER.
 String getMemento()
          Returns a memento for this includepath entry.
 IPath getPath()
          Returns the path associated with this entry, or null if none.
 IResource getResource()
          Returns the resource associated with this entry, or null if none.
 String getSourceAttachmentLocation()
          Returns an absolute path in the local file system for the source attachment associated with this entry entry, or null if none.
 IPath getSourceAttachmentPath()
          Returns the path to the source archive associated with this entry, or null if this includepath entry has no source attachment.
 String getSourceAttachmentRootLocation()
          Returns a path relative to this entry's source attachment path for the root location containing source, or null if none.
 IPath getSourceAttachmentRootPath()
          Returns the path within the source archive where package fragments are located.
 int getType()
          Returns this includepath entry's type.
 String getVariableName()
          Returns the first segment of the path associated with this entry, or null if this entry is not of type VARIABLE or CONTAINER.
 void setClasspathProperty(int location)
          Sets whether this entry should appear on the bootstrap includepath, the user includepath, or whether this entry is a standard bootstrap entry that does not need to appear on the includepath.
 void setSourceAttachmentPath(IPath path)
          Sets the path to the source archive associated with this entry, or null if this includepath entry has no source attachment.
 void setSourceAttachmentRootPath(IPath path)
          Sets the path within the source archive where package fragments are located.
 

Field Detail

PROJECT

static final int PROJECT
Type identifier for project entries.

See Also:
Constant Field Values

ARCHIVE

static final int ARCHIVE
Type identifier for archive entries.

See Also:
Constant Field Values

VARIABLE

static final int VARIABLE
Type identifier for variable entries.

See Also:
Constant Field Values

CONTAINER

static final int CONTAINER
Type identifier for container entries.

See Also:
Constant Field Values

OTHER

static final int OTHER
Type identifier for contributed entries.

See Also:
Constant Field Values

STANDARD_CLASSES

static final int STANDARD_CLASSES
Classpath property identifier for entries that appear on the bootstrap path by default.

See Also:
Constant Field Values

BOOTSTRAP_CLASSES

static final int BOOTSTRAP_CLASSES
Classpath property identifier for entries that should appear on the bootstrap path explicitly.

See Also:
Constant Field Values

USER_CLASSES

static final int USER_CLASSES
Classpath property identifier for entries that should appear on the user includepath.

See Also:
Constant Field Values
Method Detail

getType

int getType()
Returns this includepath entry's type. The type of a runtime includepath entry is identified by one of the following constants:

Since 3.0, a type of OTHER may be returned.

Returns:
this includepath entry's type

getMemento

String getMemento()
                  throws CoreException
Returns a memento for this includepath entry.

Since 3.0, the memento for a contributed includepath entry (i.e. of type OTHER), must be in the form of an XML document, with the following element structure:

 
    
    
 
 
The id attribute is the unique identifier of the extension that contributed this runtime includepath entry type, via the extension point org.eclipse.jdt.launching.runtimeClasspathEntries. The memento element will be used to initialize a restored runtime includepath entry, via the method IRuntimeClasspathEntry2.initializeFrom(Element memento). The attributes of the memento element are client defined.

Returns:
a memento for this includepath entry
Throws:
CoreException - if an exception occurs generating a memento

getPath

IPath getPath()
Returns the path associated with this entry, or null if none. The format of the path returned depends on this entry's type:

Since 3.0, this method may return null.

Returns:
the path associated with this entry, or null
See Also:
org.eclipse.IIncludePathEntry.core.IClasspathEntry#getPath()

getResource

IResource getResource()
Returns the resource associated with this entry, or null if none. A project, archive, or folder entry may be associated with a resource.

Returns:
the resource associated with this entry, or null

getSourceAttachmentPath

IPath getSourceAttachmentPath()
Returns the path to the source archive associated with this entry, or null if this includepath entry has no source attachment.

Only archive and variable entries may have source attachments. For archive entries, the path (if present) locates a source archive. For variable entries, the path (if present) has an analogous form and meaning as the variable path, namely the first segment is the name of a includepath variable.

Returns:
the path to the source archive, or null if none

setSourceAttachmentPath

void setSourceAttachmentPath(IPath path)
Sets the path to the source archive associated with this entry, or null if this includepath entry has no source attachment.

Only archive and variable entries may have source attachments. For archive entries, the path refers to a source archive. For variable entries, the path has an analogous form and meaning as the variable path, namely the first segment is the name of a includepath variable.

Note that an empty path (Path.EMPTY) is considered null.

Parameters:
path - the path to the source archive, or null if none

getSourceAttachmentRootPath

IPath getSourceAttachmentRootPath()
Returns the path within the source archive where package fragments are located. An empty path indicates that packages are located at the root of the source archive. Returns a non-null value if and only if getSourceAttachmentPath returns a non-null value.

Returns:
root path within the source archive, or null if not applicable

setSourceAttachmentRootPath

void setSourceAttachmentRootPath(IPath path)
Sets the path within the source archive where package fragments are located. A root path indicates that packages are located at the root of the source archive. Only valid if a source attachment path is also specified.

Note that an empty path (Path.EMPTY) is considered null.

Parameters:
path - root path within the source archive, or null

getClasspathProperty

int getClasspathProperty()
Returns a constant indicating where this entry should appear on the runtime includepath by default. The value returned is one of the following:

Returns:
where this entry should appear on the runtime includepath

setClasspathProperty

void setClasspathProperty(int location)
Sets whether this entry should appear on the bootstrap includepath, the user includepath, or whether this entry is a standard bootstrap entry that does not need to appear on the includepath. The location is one of:

Parameters:
location - a classpat property constant

getLocation

String getLocation()
Returns an absolute path in the local file system for this entry, or null if none, or if this entry is of type CONTAINER.

Returns:
an absolute path in the local file system for this entry, or null if none

getSourceAttachmentLocation

String getSourceAttachmentLocation()
Returns an absolute path in the local file system for the source attachment associated with this entry entry, or null if none.

Returns:
an absolute path in the local file system for the source attachment associated with this entry entry, or null if none

getSourceAttachmentRootLocation

String getSourceAttachmentRootLocation()
Returns a path relative to this entry's source attachment path for the root location containing source, or null if none.

Returns:
a path relative to this entry's source attachment path for the root location containing source, or null if none

getVariableName

String getVariableName()
Returns the first segment of the path associated with this entry, or null if this entry is not of type VARIABLE or CONTAINER.

Returns:
the first segment of the path associated with this entry, or null if this entry is not of type VARIABLE or CONTAINER

getClasspathEntry

IIncludePathEntry getClasspathEntry()
Returns a includepath entry equivalent to this runtime includepath entry, or null if none.

Since 3.0, this method may return null.

Returns:
a includepath entry equivalent to this runtime includepath entry, or null

getJavaProject

IJavaScriptProject getJavaProject()
Returns the JavaScript project associated with this runtime includepath entry or null if none. Runtime includepath entries of type CONTAINER may be associated with a project for the purposes of resolving the entries in a container.

Returns:
the JavaScript project associated with this runtime includepath entry or null if none

JavaScript Development Tools
Release 3.2

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