Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.ide.model
Class Project  view Project download Project.java

java.lang.Object
  extended byjavax.ide.model.Element
      extended byjavax.ide.model.Document
          extended byjavax.ide.model.Project
All Implemented Interfaces:
Folder

public final class Project
extends Document
implements Folder

Project interface. Projects are documents encapsulating the user work. A project specifies the source path where the java source files are rooted, the class path used when compiling and running the project, the ouput path where compiled classes are saved.


Field Summary
static java.lang.String PROJECT_ID
          Constant identifying the project document type.
static java.lang.String PROP_CLASS_PATH
          Identifies the bound property 'classPath'.
static java.lang.String PROP_OUTPUT_PATH
          Identifies the bound property 'outputPath'.
static java.lang.String PROP_SOURCE_PATH
          Identifies the bound property 'sourcePath'.
 
Fields inherited from class javax.ide.model.Document
 
Constructor Summary
Project()
           
 
Method Summary
 boolean add(java.util.Collection children)
          Appends children Element to the end of the Folder.
 boolean add(Element child)
          Appends a child Element to the end of the Folder.
 void addClassPath(javax.ide.net.URIPath path)
           
 boolean canAdd(Element element)
          Other classes can call this method to determine whether the given Element can be added to the Folder.
 boolean canRemove(Element element)
          Other classes can call this method to determine whether the specified Element can be removed from this Folder.
 boolean containsChild(Element child)
          Returns true if the folder contains the specified child Element; returns false otherwise.
 javax.ide.net.URIPath getClassPath()
          Get the class path.
 javax.ide.model.java.JavaModel getJavaModel()
          Get the javax.ide.model.java.JavaModel associated with this project.
 java.net.URI getOutputDirectory()
          Get the java.net.URI where the output from compiling project sources is located.
 java.util.prefs.Preferences getPreferences()
           
private  javax.ide.model.spi.ProjectImpl getProjectImpl()
           
 javax.ide.net.URIPath getSourcePath()
          Get the source path.
 boolean remove(java.util.Collection children)
          Removes the specified children Element.
 boolean remove(Element child)
          Removes the specified child Element.
 void removeAll()
          Removes all children from the folder.
 void setOutputDirectory(java.net.URI outputDirectory)
           
 int size()
          Returns the current number of children in the folder.
 
Methods inherited from class javax.ide.model.Document
addDocumentListener, close, equals, getDisplayInfo, getElementImpl, getReader, getTimestamp, getURI, hashCode, isDirty, isNew, isOpen, isReadOnly, markDirty, open, removeDocumentListener, save, setDisplayInfo, setURI
 
Methods inherited from class javax.ide.model.Element
getIcon, getLabel, getLongLabel, getToolTip
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROJECT_ID

public static final java.lang.String PROJECT_ID
Constant identifying the project document type.

See Also:
Constant Field Values

PROP_SOURCE_PATH

public static final java.lang.String PROP_SOURCE_PATH
Identifies the bound property 'sourcePath'.

See Also:
Constant Field Values

PROP_CLASS_PATH

public static final java.lang.String PROP_CLASS_PATH
Identifies the bound property 'classPath'.

See Also:
Constant Field Values

PROP_OUTPUT_PATH

public static final java.lang.String PROP_OUTPUT_PATH
Identifies the bound property 'outputPath'.

See Also:
Constant Field Values
Constructor Detail

Project

public Project()
Method Detail

getProjectImpl

private javax.ide.model.spi.ProjectImpl getProjectImpl()

getSourcePath

public javax.ide.net.URIPath getSourcePath()
Get the source path. The source path where the contents of this project can be found.


getClassPath

public javax.ide.net.URIPath getClassPath()
Get the class path. The class path points to where the compiled classes used by this project can be found.


setOutputDirectory

public void setOutputDirectory(java.net.URI outputDirectory)

getPreferences

public java.util.prefs.Preferences getPreferences()

getJavaModel

public javax.ide.model.java.JavaModel getJavaModel()
Get the javax.ide.model.java.JavaModel associated with this project.


canAdd

public boolean canAdd(Element element)
Description copied from interface: Folder
Other classes can call this method to determine whether the given Element can be added to the Folder.

Specified by:
canAdd in interface Folder

add

public boolean add(Element child)
Description copied from interface: Folder
Appends a child Element to the end of the Folder.

Specified by:
add in interface Folder

add

public boolean add(java.util.Collection children)
Description copied from interface: Folder
Appends children Element to the end of the Folder.

Specified by:
add in interface Folder

canRemove

public boolean canRemove(Element element)
Description copied from interface: Folder
Other classes can call this method to determine whether the specified Element can be removed from this Folder.

Specified by:
canRemove in interface Folder

remove

public boolean remove(Element child)
Description copied from interface: Folder
Removes the specified child Element. If the child object appears more than once, only the first instance is removed.

Specified by:
remove in interface Folder

remove

public boolean remove(java.util.Collection children)
Description copied from interface: Folder
Removes the specified children Element. If any of the children appears more than once, only the first instance is removed.

Specified by:
remove in interface Folder

containsChild

public boolean containsChild(Element child)
Description copied from interface: Folder
Returns true if the folder contains the specified child Element; returns false otherwise.

Specified by:
containsChild in interface Folder

size

public int size()
Description copied from interface: Folder
Returns the current number of children in the folder.

Specified by:
size in interface Folder

removeAll

public void removeAll()
Description copied from interface: Folder
Removes all children from the folder.

Specified by:
removeAll in interface Folder

addClassPath

public void addClassPath(javax.ide.net.URIPath path)

getOutputDirectory

public java.net.URI getOutputDirectory()
Get the java.net.URI where the output from compiling project sources is located.