com.borland.jbuilder.node
Class JBProject
java.lang.Object
|
+--com.borland.primetime.node.Node
|
+--com.borland.primetime.node.UrlNode
|
+--com.borland.primetime.node.Project
|
+--com.borland.jbuilder.node.JBProject
- public class JBProject
- extends Project
- implements NodeContainer
Instances of JBProject represent JBuilder-specific projects. JBuilder
projects have all the usual project characteristics plus access to project
paths, package management facilities based on those paths and JOT.
The method getPaths()
a representation of the project's
current path selections. The methods findClassPathUrl()
,
findSourcePathUrl()
, findPathUrl()
and
getPackageContent()
provide means for getting up-to-date
information about the contents visible along these paths.
The JOT package manager associated with a JBProject is available via the
getJotPackages()
method.
Constructor Summary |
JBProject(Url url)
All Project subtypes must expose this constructor signature. |
Methods inherited from class com.borland.primetime.node.Project |
addProjectListener,
check,
createFileNode,
createProject,
dumpAllNodes,
dumpProjects,
findNode,
findNodes,
findProject,
fireChildrenChanged,
fireNodeChanged,
fireProjectPropertyChanged,
getDisplayName,
getDisplaySequence,
getEncoding,
getLongDisplayName,
getNode,
getProject,
getProject,
getProjectPath,
getUrl,
isNew,
isPersistant,
isProjectExtension,
isProjectUrl,
registerProjectClass,
removeProjectListener,
rename,
revert,
save,
saveAs,
setEncoding,
setUrl |
Methods inherited from class com.borland.primetime.node.Node |
addNodeListener,
compareTo,
dumpNodes,
dumpNodes,
dumpNodes,
equals,
fireNodeRenamed,
getChildren,
getDisplayChildren,
getNodeID,
getParent,
getProperties,
getProperty,
getProperty,
getProperty,
hasChildren,
hasDisplayChildren,
hashCode,
removeNodeListener,
setParent,
setProperty,
setProperty,
setProperty,
toString |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
ICON
public static final javax.swing.Icon ICON
PROPERTY_SOURCEPATH
public static final java.lang.String PROPERTY_SOURCEPATH
PROPERTY_OUTPATH
public static final java.lang.String PROPERTY_OUTPATH
PROPERTY_DOCPATH
public static final java.lang.String PROPERTY_DOCPATH
PROPERTY_LIBRARIES
public static final java.lang.String PROPERTY_LIBRARIES
PROPERTY_JDK
public static final java.lang.String PROPERTY_JDK
PROJECT_DIRECTORY
public static final java.lang.String PROJECT_DIRECTORY
SOURCE_DIRECTORY
public static final java.lang.String SOURCE_DIRECTORY
CLASSES_DIRECTORY
public static final java.lang.String CLASSES_DIRECTORY
DOC_DIRECTORY
public static final java.lang.String DOC_DIRECTORY
JBProject
public JBProject(Url url)
throws DuplicateNodeException,
InvalidUrlException
- All Project subtypes must expose this constructor signature.
initOpenTool
public static void initOpenTool(byte majorVersion,
byte minorVersion)
- OpenTool initialization
getPaths
public ProjectPathSet getPaths()
- Returns:
- An instance of ProjectPathSet that describes the projects paths
and dependancies, guaranteed to be non-null.
getComponents
public CmtComponents getComponents()
- Returns:
- a CmtComponentManager interface that allows access to component functionality
getJotPackages
public JotPackages getJotPackages()
- Returns:
- An instance of the associated JotPackages interface for JOT
clients, guaranteed to be non-null.
findPathUrl
public Url findPathUrl(Url[] path,
java.lang.String pathName)
- Locates the first location along a list of path root where a given subpath
exists.
- Parameters:
path
- An array of Url roots to search for the subpath. Must not
be null.pathName
- A relative path (as defined by Url
) to search
for.- Returns:
- The first matching Url on the path, or null if no such subpath
is defined for any of the path roots.
findSourcePathUrl
public Url findSourcePathUrl(java.lang.String pathName)
- Locates the first location along the project's full source path where a
given subpath exists. The 'full' source path includes the project's
sources and source for all libraries associated with the project.
- Parameters:
pathName
- A relative path (as defined by Url
) to search
for.- Returns:
- The first matching Url on the path, or null if no such subpath
is defined for any of the path roots.
findClassPathUrl
public Url findClassPathUrl(java.lang.String pathName)
- Locates the first location along the project's full class path where a
given subpath exists. The 'full' class path includes the project's
classes and classes for all libraries associated with the project.
- Parameters:
pathName
- A relative path (as defined by Url
) to search
for.- Returns:
- The first matching Url on the path, or null if no such subpath
is defined for any of the path roots.
getPackageContent
public java.util.Set getPackageContent(Url[] path,
java.lang.String packageName,
int type)
Returns a Set containing Url representations of all items found on the
path in the specified package. Items that occur in multiple places on
the path are reported only once, at the location of the first
occurence.
- Parameters:
path
- An array of Url roots to search.packageName
- The subpackage to search, similar to a Url relative
path but using '.' as the path separator rather than a slash.type
- One of Filesystem.TYPE_DIRECTORY
,
Filesystem.TYPE_FILE
, or Filesystem.TYPE_BOTH
.
getPackageNodes
public Node[] getPackageNodes(java.lang.String packageName)
- Parameters:
packageName
- The subpackage to search, similar to a Url relative
path but using '.' as the path separator rather than a slash.- Returns:
- An array of
Node
instances representing the items
found on the path.
getDebugInfoManager
public DebugInfoManager getDebugInfoManager()
isModified
public boolean isModified()
- Describes whether or not unsaved changes exist in the project's state.
- Overrides:
- isModified in class Project
- Returns:
- True if changes have been made that have not yet been saved to the
project file.
preProjectSave
protected void preProjectSave(Url rootUrl)
- Overrides:
- preProjectSave in class Project
postProjectLoad
protected void postProjectLoad(Url rootUrl)
- Overrides:
- postProjectLoad in class Project
getDisplayIcon
public javax.swing.Icon getDisplayIcon()
- Description copied from class: Node
- Provides an image to be used for graphical representation of the node.
- Overrides:
- getDisplayIcon in class Project
- Tags copied from class: Node
- Returns:
- An Icon instance.