public interface IRuntimeClasspathEntry
PROJECT
) - a project entry refers
to all of the built classes in a project, and resolves to the output
location(s) of the associated JavaScript project.ARCHIVE
) - an archive refers to a jar, zip, or
folder in the workspace or in the local file system containing class
files. An archive may have attached source.VARIABLE
) - a variable refers to a
includepath variable, which may refer to a jar.CONTAINER
) - a container refers to includepath
container variable which refers to a collection of archives derived
dynamically, on a per project basis.OTHER
) - a contributed
includepath entry is an extension contributed by a plug-in. The resolution
of a contributed includepath entry is client defined. See
IRuntimeClasspathEntry2
.
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.
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.
Modifier and Type | Field and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
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. |
java.lang.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 . |
java.lang.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. |
java.lang.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. |
java.lang.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.
|
java.lang.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.
|
static final int PROJECT
static final int ARCHIVE
static final int VARIABLE
static final int CONTAINER
static final int OTHER
static final int STANDARD_CLASSES
static final int BOOTSTRAP_CLASSES
static final int USER_CLASSES
int getType()
PROJECT
ARCHIVE
VARIABLE
CONTAINER
OTHER
Since 3.0, a type of OTHER
may be returned.
java.lang.String getMemento() throws CoreException
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.
CoreException
- if an exception occurs generating a mementoIPath getPath()
null
if none. The format of the
path returned depends on this entry's type:
PROJECT
- a workspace relative path to the associated
project.ARCHIVE
- the absolute path of the associated archive,
which may or may not be in the workspace.VARIABLE
- the path corresponding to the associated
includepath variable entry.CONTAINER
- the path corresponding to the associated
includepath container variable entry.OTHER
- the path returned is client defined.
Since 3.0, this method may return null
.
null
org.eclipse.IIncludePathEntry.core.IClasspathEntry#getPath()
IResource getResource()
null
if none. A project, archive, or folder entry may be associated
with a resource.null
IPath getSourceAttachmentPath()
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.
null
if nonevoid setSourceAttachmentPath(IPath path)
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
.
path
- the path to the source archive, or null
if noneIPath getSourceAttachmentRootPath()
null
value
if and only if getSourceAttachmentPath
returns
a non-null
value.null
if
not applicablevoid setSourceAttachmentRootPath(IPath path)
Note that an empty path (Path.EMPTY
) is considered
null
.
path
- root path within the source archive, or null
int getClasspathProperty()
STANDARD_CLASSES
- a standard entry does not need to appear
on the runtime includepathBOOTSTRAP_CLASSES
- a bootstrap entry should appear on the
boot pathUSER_CLASSES
- a user entry should appear on the path
containing user or application classesvoid setClasspathProperty(int location)
STANDARD_CLASSES
- a standard entry does not need to appear
on the runtime includepathBOOTSTRAP_CLASSES
- a bootstrap entry should appear on the
boot pathUSER_CLASSES
- a user entry should appear on the path
conatining user or application classeslocation
- a classpat property constantjava.lang.String getLocation()
null
if none, or if this entry is of type CONTAINER
.null
if nonejava.lang.String getSourceAttachmentLocation()
null
if none.null
if nonejava.lang.String getSourceAttachmentRootLocation()
null
if none.null
if nonejava.lang.String getVariableName()
null
if this entry is not of type VARIABLE
or CONTAINER
.null
if this entry is not of type VARIABLE
or CONTAINER
IIncludePathEntry getClasspathEntry()
null
if none.
Since 3.0, this method may return null
.
null
IJavaScriptProject getJavaProject()
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.null
if noneCopyright (c) IBM Corp. and others 2000, 2016. All Rights Reserved.