站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

SourcePathProvider (NetBeans Debugger JPDA API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.spi.debugger.jpda
Class SourcePathProvider

java.lang.Object
  extended byorg.netbeans.spi.debugger.jpda.SourcePathProvider

public abstract class SourcePathProvider
extends Object

Defines source path for debugger. It translates relative path (like "java/lang/Thread.java", or class name) to url ("file:///C:/Sources/java/lang/Thread.java"). It allows to define and modify source path. All instances of this class should be registerred in "Meta-inf/debugger//org.netbeans.spi.debugger.jpda.EngineContextProvider" files. There should be at least one instance installed.


Field Summary
static String PROP_SOURCE_ROOTS
          Property name constant.
 
Constructor Summary
SourcePathProvider()
           
 
Method Summary
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").
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_SOURCE_ROOTS

public static final String PROP_SOURCE_ROOTS
Property name constant.

See Also:
Constant Field Values
Constructor Detail

SourcePathProvider

public SourcePathProvider()
Method Detail

getRelativePath

public 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").

Parameters:
url - a url of resource file
directorySeparator - a directory separator character
includeExtension - whether the file extension should be included in the result
Returns:
relative path

getURL

public abstract String getURL(String relativePath,
                              boolean global)
Translates a relative path ("java/lang/Thread.java") to url ("file:///C:/Sources/java/lang/Thread.java"). Uses GlobalPathRegistry if global == true.

Parameters:
relativePath - a relative path (java/lang/Thread.java)
global - true if global path should be used
Returns:
url

getSourceRoots

public abstract String[] getSourceRoots()
Returns array of source roots.


setSourceRoots

public abstract void setSourceRoots(String[] sourceRoots)
Sets array of source roots.

Parameters:
sourceRoots - a new array of sourceRoots

getOriginalSourceRoots

public abstract String[] getOriginalSourceRoots()
Returns set of original source roots.

Returns:
set of original source roots

addPropertyChangeListener

public abstract void addPropertyChangeListener(PropertyChangeListener l)
Adds property change listener.

Parameters:
l - new listener.

removePropertyChangeListener

public abstract void removePropertyChangeListener(PropertyChangeListener l)
Removes property change listener.

Parameters:
l - removed listener.

 

Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.