public abstract class SourcePathProvider extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
SourcePathProvider.Registration
Declarative registration of a SourcePathProvider implementation.
|
Modifier and Type | Field and Description |
---|---|
static String |
PROP_SOURCE_ROOTS
Property name constant.
|
Constructor and Description |
---|
SourcePathProvider() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addPropertyChangeListener(PropertyChangeListener l)
Adds property change listener.
|
abstract String[] |
getOriginalSourceRoots()
Returns set of original source roots.
|
abstract String |
getRelativePath(String url,
char directorySeparator,
boolean includeExtension)
Returns relative path (java/lang/Thread.java) for given url
("file:///C:/Sources/java/lang/Thread.java").
|
String |
getSourceRoot(String url)
Returns the source root (if any) for given url.
|
abstract String[] |
getSourceRoots()
Returns array of source roots.
|
abstract String |
getURL(String relativePath,
boolean global)
Translates a relative path ("java/lang/Thread.java") to url
("file:///C:/Sources/java/lang/Thread.java").
|
abstract void |
removePropertyChangeListener(PropertyChangeListener l)
Removes property change listener.
|
abstract void |
setSourceRoots(String[] sourceRoots)
Sets array of source roots.
|
public static final String PROP_SOURCE_ROOTS
public abstract String getRelativePath(String url, char directorySeparator, boolean includeExtension)
url
- a url of resource filedirectorySeparator
- a directory separator characterincludeExtension
- whether the file extension should be included
in the resultpublic abstract String getURL(String relativePath, boolean global)
relativePath
- a relative path (java/lang/Thread.java)global
- true if global path should be usedpublic String getSourceRoot(String url)
url
- a url of resource filenull
when no source root was found.public abstract String[] getSourceRoots()
public abstract void setSourceRoots(String[] sourceRoots)
sourceRoots
- a new array of sourceRootspublic abstract String[] getOriginalSourceRoots()
public abstract void addPropertyChangeListener(PropertyChangeListener l)
l
- new listener.public abstract void removePropertyChangeListener(PropertyChangeListener l)
l
- removed listener.