Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

oracle.jdeveloper.model
Class JProjectUtil

java.lang.Object
  extended by oracle.jdeveloper.model.JProjectUtil

public final class JProjectUtil
extends java.lang.Object


Method Summary
static void addLibraries(Project proj, java.lang.Object[] libraries)
          Adds the specified libraries to a project, and fires PropertyChangeEvents if the project's classpath, sourcepath, or docpath changed.
static void execturePathChange(Project project, java.lang.Runnable runnable)
          Deprecated. Use project.applyBatchChanges Executes a runnable and sends property path changed events. Example Usage:
  Runnable changePathRunnable = new Runnable()
  {
    project.addLibrary(...);
    project.setOutputDirectory(...);
  };
  JProjectUtil.execturePathChange(changePathRunnable);
 
static java.lang.String getLibraryNameFromPath(java.net.URL path)
          Get the library name given the URL path.
static java.net.URL getProjectBasePath(Project project)
          Retrieves the URL that denotes the base path that should be used when creating new source files.
static void removeLibraries(Project proj, java.lang.Object[] libraries)
          Removes the specified libraries from a project, and fires PropertyChangeEvents if the project's classpath, sourcepath, or docpath changed.
static void setOutputDirectory(Project project, java.net.URL outputDirectory)
          Sets the location for a project's generated class files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getProjectBasePath

public static java.net.URL getProjectBasePath(Project 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.

addLibraries

public static void addLibraries(Project proj,
                                java.lang.Object[] libraries)
Adds the specified libraries to a project, and fires PropertyChangeEvents if the project's classpath, sourcepath, or docpath changed.


removeLibraries

public static void removeLibraries(Project proj,
                                   java.lang.Object[] libraries)
Removes the specified libraries from a project, and fires PropertyChangeEvents if the project's classpath, sourcepath, or docpath changed.


setOutputDirectory

public static void setOutputDirectory(Project project,
                                      java.net.URL outputDirectory)
Sets the location for a project's generated class files.

Parameters:
project - the project
outputDirectory - the output path URL

execturePathChange

public static void execturePathChange(Project project,
                                      java.lang.Runnable runnable)
Deprecated. Use project.applyBatchChanges Executes a runnable and sends property path changed events. Example Usage:
  Runnable changePathRunnable = new Runnable()
  {
    project.addLibrary(...);
    project.setOutputDirectory(...);
  };
  JProjectUtil.execturePathChange(changePathRunnable);
 


getLibraryNameFromPath

public static java.lang.String getLibraryNameFromPath(java.net.URL path)
Get the library name given the URL path. For eg. the library name for a URL path "jar:file:/C:/jdev_work/jdev/lib/jdev.jar!/" is "JDev.jar".

Parameters:
path - The URL path
Returns:
String The library name

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

Copyright © 1997, 2011, Oracle. All rights reserved.