oracle.jdeveloper.model
Class JProjectUtil
java.lang.Object
|
+--oracle.jdeveloper.model.JProjectUtil
- public final class JProjectUtil
- extends java.lang.Object
Method Summary |
static void |
addLibraries(JProject proj,
java.lang.String[] libraries)
Adds the specified libraries to a project, and fires PropertyChangeEvents
if the project's classpath, sourcepath, or docpath changed. |
static Node |
createNodeInProject(JProject project,
java.net.URL url)
Deprecated. Use NodeFactory.create |
static java.net.URL |
getProjectBasePath(JProject project)
Retrieves the URL that denotes the base path that should be used when
creating new source files. |
static java.net.URL |
toCommitURL(java.lang.String path,
java.net.URL defWspDir,
java.net.URL defaultValue)
If defWspDir is not null this method builds an absolute
path using defWspDir as the base directory. |
static java.lang.String |
toDisplayPath(URLPath paths,
java.net.URL defWspDir)
If defWspDir is not null this method returns the first
paths relative defWspDir . |
static java.lang.String |
toDisplayPath(java.net.URL path,
java.net.URL defWspDir)
If defWspDir is not null this method returns
path relative defWspDir . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROP_PACKAGE_COUNTER
public static final java.lang.String PROP_PACKAGE_COUNTER
createNodeInProject
public static Node createNodeInProject(JProject project,
java.net.URL url)
- Deprecated. Use NodeFactory.create
- Create a new Node and add it to this Container.
- Parameters:
project
- the Project
where the new
Node
should be added.URL
- the URL of the new Node
.- Returns:
- the newly created node.
getProjectBasePath
public static java.net.URL getProjectBasePath(JProject project)
- Retrieves the URL that denotes the base path that should be used when
creating new source files. The base path is defined to be the first
entry in the project's source path, if it exists; otherwise the directory
containing the project is used.
- Parameters:
project
- the project whose base path is required.- Returns:
- the base path of the project.
toCommitURL
public static java.net.URL toCommitURL(java.lang.String path,
java.net.URL defWspDir,
java.net.URL defaultValue)
- If
defWspDir
is not null this method builds an absolute
path using defWspDir
as the base directory. Otherwise,
it converts path
into an URL
and returns it.
toDisplayPath
public static java.lang.String toDisplayPath(URLPath paths,
java.net.URL defWspDir)
- If
defWspDir
is not null this method returns the first
paths
relative defWspDir
. Otherwise,
it returns the platform independent representation of the
paths
URL
.
toDisplayPath
public static java.lang.String toDisplayPath(java.net.URL path,
java.net.URL defWspDir)
- If
defWspDir
is not null this method returns
path
relative defWspDir
. Otherwise,
it returns the platform independent representation of the
path
URL
.
addLibraries
public static void addLibraries(JProject proj,
java.lang.String[] libraries)
- Adds the specified libraries to a project, and fires PropertyChangeEvents
if the project's classpath, sourcepath, or docpath changed.