Re: Java Project API/SPI
Jan Pokorsky <[email protected]> Tue, 22 Jul 2003 16:56:09 +0200
| Newsgroups | gmane.comp.java.netbeans.modules.projects.devel |
|---|---|
| Organization | Sun Microsystems, Inc. |
| Message-ID | <[email protected]> |
Svatopluk Dedic wrote: > Jan Pokorsky wrote: > >> >> First of all I do not think the main purpose of JavaProject is to be >> implemented by providers but to be consumed by clients. Actually there >> is just one provider. So why clutter the class with methods useful >> only for providers. Maybe we could hide the spi part at all till some >> one > > > IMHO this approach clutters the platform with paired types, one for API, > one for SPI, while it is obvious for a client what methods it calls (the > public ones) and what methods are part of the contract. > > Comparing to other frameworks (e.g. Eclipse), NetBeans take the purity > approach far from APIs that are readable (and understandable) by > platform users. Eclipse takes the issue into the other extreme by merely > documenting methods to be for client use, provider use or internal use. > Strangely, their APIs seems more scannable than ours. > I've been inspired by http://openide.netbeans.org/tutorial/api-design.html document that suggests to separate api for clients from support api and that clarifies reasons. ProjectPath and JavaProject seem to me as good candidates. > This separation should be (IMHO) only considered when the SPI interface > is very slim compared to the client-side API built around it. But even > then, there's no added value since the paired API/SPI classes have to > evolve in sync, with exactly the same compatibility considerations as > with protected methods directly in an abstract API class. Definitely you have to evolve classes in sync but you have more possibilities to do it in compatible way. But it is not my intention to repeat here pros and cons from the document mentioned above ;-) I have prepared javadoc of the separated JavaProject (->JavaProject + BasicJavaProject). You can review it in the attachement so that we do not speak about imaginary classes. In case of ProjectPath the separation is straightforward. > >> really needs to plug own implementation in. Do you suppose to provide >> it in ide4dev? >> > OTOH, modal Ok/Cancel project settings dialog, which would allow to > create targets and resources could use one. Hopefully the Ok/Cancel model will be a part of the standard distribution but who knows. Anyway I accept it as a usecase. Jan --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
JavaProject.html
(text/html, 40 KB)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Tue Jul 22 15:01:18 CEST 2003 -->
<TITLE>
JavaProject
</TITLE>
<META NAME="keywords" CONTENT="org.netbeans.api.java.project.JavaProject,JavaProject class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="JavaProject";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="JavaProject.html" TARGET="_top"><B>NO FRAMES</B></A>
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.netbeans.api.java.project.api</FONT>
<BR>
Class JavaProject</H2>
<PRE>
java.lang.Object
|
+--<B>org.netbeans.api.java.project.JavaProject</B>
</PRE>
<HR>
<DL>
<DT>public final class <B>JavaProject</B><DT>extends java.lang.Object</DL>
<P>
This class represents the Java flavour of a project. It's purpose is to
provide connection between core java project abstraction and expose some
management functions for them.
<P>
<P>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#MIME_JAVA_CLASSES">MIME_JAVA_CLASSES</A></B></CODE>
<BR>
Content type for java class containers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#MIME_JAVA_SOURCES">MIME_JAVA_SOURCES</A></B></CODE>
<BR>
Content type for java source containers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#MIME_JAVAC_TARGET">MIME_JAVAC_TARGET</A></B></CODE>
<BR>
MIMEtype for Javac compilation targets.</TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#addProjectListener(org.netbeans.api.java.project.ProjectListener)">addProjectListener</A></B>(<A HREF="../../../../../../org/netbeans/api/java/project/ProjectListener.html">ProjectListener</A> l)</CODE>
<BR>
Registers a listener, which will be notified about changes in Java project
definition.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#assignSources(org.netbeans.api.java.project.JavaDescriptor, org.netbeans.api.java.project.CompilationUnit)">assignSources</A></B>(<A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> desc,
<A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A> unit)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#assignSources(org.netbeans.api.java.project.JavaDescriptor, org.netbeans.api.java.project.CompilationUnit, org.netbeans.api.java.project.JavaDescriptor)">assignSources</A></B>(<A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> desc,
<A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A> unit,
<A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> insertBefore)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#createCompilationUnit(java.lang.String)">createCompilationUnit</A></B>(java.lang.String name)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#createCompilationUnit(java.lang.String, java.lang.String, java.util.List)">createCompilationUnit</A></B>(java.lang.String name,
java.lang.String displayName,
java.util.List initialRoots)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#createJavaSources(org.openide.filesystems.FileObject, java.lang.String, java.lang.String)">createJavaSources</A></B>(org.openide.filesystems.FileObject rootFolder,
java.lang.String proposedID,
java.lang.String displayName)</CODE>
<BR>
Declares that the given subtree contains java sources for the project.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#findMatchingDescriptor(org.openide.filesystems.FileObject)">findMatchingDescriptor</A></B>(org.openide.filesystems.FileObject folder)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> org.netbeans.api.projects.ProjectMember</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#findSource(org.openide.filesystems.FileObject, org.netbeans.api.projects.settings.Configuration)">findSource</A></B>(org.openide.filesystems.FileObject compiledClass,
org.netbeans.api.projects.settings.Configuration cfg)</CODE>
<BR>
This method tries to find a source for the given output <code>.class</code> file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#findSourceDescriptor(org.openide.filesystems.FileObject)">findSourceDescriptor</A></B>(org.openide.filesystems.FileObject src)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#getClassesDescriptor(org.netbeans.api.projects.ProjectMember)">getClassesDescriptor</A></B>(org.netbeans.api.projects.ProjectMember pm)</CODE>
<BR>
A convenience method, which obtains a JavaDescriptor describing (produced) java classes from a ProjectMember.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#getCompilationUnit(org.netbeans.api.java.project.JavaDescriptor)">getCompilationUnit</A></B>(<A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> jd)</CODE>
<BR>
Finds a CompilationUnit, which "owns" the passed JavaDescriptor, that is when the Descriptor
describes a source for that CompilationUnit, or its output.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#getCompilationUnit(org.netbeans.api.projects.ProjectMember)">getCompilationUnit</A></B>(org.netbeans.api.projects.ProjectMember member)</CODE>
<BR>
Finds a compilation unit, which the source object belongs to.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.Collection</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#getCompilationUnits()">getCompilationUnits</A></B>()</CODE>
<BR>
Returns CompilationUnits that are defined for this project.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html">JavaProject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#getJavaProject(org.netbeans.api.projects.Project)">getJavaProject</A></B>(org.netbeans.api.projects.Project p)</CODE>
<BR>
Returns the JavaProject instance for the specified project.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> org.netbeans.api.projects.Project</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#getProject()">getProject</A></B>()</CODE>
<BR>
Gets the <code>Project</code> which Java-specific context the <code>JavaProject</code>
carries on.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#getSourceDescriptor(org.netbeans.api.projects.ProjectMember)">getSourceDescriptor</A></B>(org.netbeans.api.projects.ProjectMember pm)</CODE>
<BR>
A convenience method, which obtains a JavaDescriptor describing java sources from a ProjectMember.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.Set</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#getSourceDescriptors()">getSourceDescriptors</A></B>()</CODE>
<BR>
Returns a set of JavaDescriptors for the java sources present in the Project.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.Collection</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#getSources()">getSources</A></B>()</CODE>
<BR>
Returns a collection of source containers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#removeCompilationUnit(org.netbeans.api.java.project.CompilationUnit, boolean)">removeCompilationUnit</A></B>(<A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A> cu,
boolean removeSources)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#removeJavaSources(org.netbeans.api.java.project.JavaDescriptor)">removeJavaSources</A></B>(<A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> sources)</CODE>
<BR>
Unmarks some sources as being "java soruces".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#removeProjectListener(org.netbeans.api.java.project.ProjectListener)">removeProjectListener</A></B>(<A HREF="../../../../../../org/netbeans/api/java/project/ProjectListener.html">ProjectListener</A> l)</CODE>
<BR>
Unregisters a listener added by a previous call to <A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#addProjectListener(org.netbeans.api.java.project.ProjectListener)"><CODE>addProjectListener(org.netbeans.api.java.project.ProjectListener)</CODE></A></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="MIME_JAVAC_TARGET"><!-- --></A><H3>
MIME_JAVAC_TARGET</H3>
<PRE>
public static final java.lang.String <B>MIME_JAVAC_TARGET</B></PRE>
<DL>
<DD>MIMEtype for Javac compilation targets. Use with <CODE>ContainersList</CODE>
to search for Javac compilation targets (Compiled Classes) in the project
and to get notified when some is added/removed.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.netbeans.api.java.project.JavaProject.MIME_JAVAC_TARGET">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="MIME_JAVA_SOURCES"><!-- --></A><H3>
MIME_JAVA_SOURCES</H3>
<PRE>
public static final java.lang.String <B>MIME_JAVA_SOURCES</B></PRE>
<DL>
<DD>Content type for java source containers. Use with <CODE>ContainersList</CODE> to
search for java application sources. The <CODE>ContentDescriptor</CODE> instance supporting this
content type <b>must</b> be of type <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html"><CODE>JavaDescriptor</CODE></A>.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.netbeans.api.java.project.JavaProject.MIME_JAVA_SOURCES">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="MIME_JAVA_CLASSES"><!-- --></A><H3>
MIME_JAVA_CLASSES</H3>
<PRE>
public static final java.lang.String <B>MIME_JAVA_CLASSES</B></PRE>
<DL>
<DD>Content type for java class containers. Use with <CODE>ContainersList</CODE> to
search for java classes in the project. The <CODE>ContentDescriptor</CODE> instance, which supports
this content type <b>must</b> be of type <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html"><CODE>JavaDescriptor</CODE></A>.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.netbeans.api.java.project.JavaProject.MIME_JAVA_CLASSES">Constant Field Values</A></DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getJavaProject(org.netbeans.api.projects.Project)"><!-- --></A><H3>
getJavaProject</H3>
<PRE>
public static <A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html">JavaProject</A> <B>getJavaProject</B>(org.netbeans.api.projects.Project p)</PRE>
<DL>
<DD>Returns the JavaProject instance for the specified project. It will
return return <code>null</code>, if the project does not contain Java
nature.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>JavaProject instance, or <code>null</code> if the project does not
contain java nature.</DL>
</DD>
</DL>
<HR>
<A NAME="addProjectListener(org.netbeans.api.java.project.ProjectListener)"><!-- --></A><H3>
addProjectListener</H3>
<PRE>
public final void <B>addProjectListener</B>(<A HREF="../../../../../../org/netbeans/api/java/project/ProjectListener.html">ProjectListener</A> l)</PRE>
<DL>
<DD>Registers a listener, which will be notified about changes in Java project
definition.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - listener instance to register</DL>
</DD>
</DL>
<HR>
<A NAME="removeProjectListener(org.netbeans.api.java.project.ProjectListener)"><!-- --></A><H3>
removeProjectListener</H3>
<PRE>
public final void <B>removeProjectListener</B>(<A HREF="../../../../../../org/netbeans/api/java/project/ProjectListener.html">ProjectListener</A> l)</PRE>
<DL>
<DD>Unregisters a listener added by a previous call to <A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#addProjectListener(org.netbeans.api.java.project.ProjectListener)"><CODE>addProjectListener(org.netbeans.api.java.project.ProjectListener)</CODE></A>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - listener instance to unregister</DL>
</DD>
</DL>
<HR>
<A NAME="getSources()"><!-- --></A><H3>
getSources</H3>
<PRE>
public final java.util.Collection <B>getSources</B>()</PRE>
<DL>
<DD>Returns a collection of source containers. The sources may or may not
be compiled, depending on whether they are part of a <A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html"><CODE>CompilationUnit</CODE></A>.
The returned Collection contains ProjectMembers for the source roots'
representants/containers in the project. Call <CODE>DataObject.getCookie(Class)</CODE>
on the project member's original object to get the ContentDescriptor. You may also consider to use
<A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#getSourceDescriptors()"><CODE>getSourceDescriptors()</CODE></A>, which provides access to <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html"><CODE>JavaDescriptor</CODE></A>s for java source folders.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>(unordered) Collection of <CODE>ProjectMember</CODE>s representing roots of source subtrees.
PENDING -- shouldn't this method return SourceDescriptors, rather than raw ProjectMembers anyway ??<DT><B>See Also:</B><DD><A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html"><CODE>CompilationUnit</CODE></A>,
<A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#getSourceDescriptors()"><CODE>getSourceDescriptors()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getProject()"><!-- --></A><H3>
getProject</H3>
<PRE>
public final org.netbeans.api.projects.Project <B>getProject</B>()</PRE>
<DL>
<DD>Gets the <code>Project</code> which Java-specific context the <code>JavaProject</code>
carries on.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the <code>Project</code></DL>
</DD>
</DL>
<HR>
<A NAME="getCompilationUnit(org.netbeans.api.projects.ProjectMember)"><!-- --></A><H3>
getCompilationUnit</H3>
<PRE>
public final <A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A> <B>getCompilationUnit</B>(org.netbeans.api.projects.ProjectMember member)</PRE>
<DL>
<DD>Finds a compilation unit, which the source object belongs to. A given source
may belong to none or one CompilationUnit at a time. This method returns
<code>null</code> if the passed object does not belong to any CompilationUnit.
If the `source' object is on the project's Filesystem, then the method assumes
it is either a build target and tries to find a compilation unit, which owns it.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>member</CODE> - the member for which the CompilationUnit should be found.
<DT><B>Returns:</B><DD>CompilationUnit instance that "owns" the object or <code>null</code></DL>
</DD>
</DL>
<HR>
<A NAME="getCompilationUnit(org.netbeans.api.java.project.JavaDescriptor)"><!-- --></A><H3>
getCompilationUnit</H3>
<PRE>
public final <A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A> <B>getCompilationUnit</B>(<A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> jd)</PRE>
<DL>
<DD>Finds a CompilationUnit, which "owns" the passed JavaDescriptor, that is when the Descriptor
describes a source for that CompilationUnit, or its output.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>jd</CODE> - the JavaDescriptor for which a CompilationUnit should be found
<DT><B>Returns:</B><DD>the owning CompilationUnit instance, or <code>null</code> if not owned by any CompilationUnit</DL>
</DD>
</DL>
<HR>
<A NAME="findSource(org.openide.filesystems.FileObject, org.netbeans.api.projects.settings.Configuration)"><!-- --></A><H3>
findSource</H3>
<PRE>
public final org.netbeans.api.projects.ProjectMember <B>findSource</B>(org.openide.filesystems.FileObject compiledClass,
org.netbeans.api.projects.settings.Configuration cfg)</PRE>
<DL>
<DD>This method tries to find a source for the given output <code>.class</code> file. It works
only for <code>.class</code> files produced by the java build target;
APIs/SPIs for tracing .class files through additional build targets does not exist (yet
-- if unhappy, file an issue). If the search fails, the method returns <code>null</code>.
The method takes into account the current build targets' output directory
settings.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cfg</CODE> - configuration from which the settings of output location will be read
and will be used for finding of source. The null value can be passed in which case
the active configuration will be used.
<DT><B>Returns:</B><DD>ProjectMember for the source file, which produced the given <code>.class</code>
file.</DL>
</DD>
</DL>
<HR>
<A NAME="createJavaSources(org.openide.filesystems.FileObject, java.lang.String, java.lang.String)"><!-- --></A><H3>
createJavaSources</H3>
<PRE>
public <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> <B>createJavaSources</B>(org.openide.filesystems.FileObject rootFolder,
java.lang.String proposedID,
java.lang.String displayName)
throws java.lang.IllegalArgumentException,
java.io.IOException</PRE>
<DL>
<DD>Declares that the given subtree contains java sources for the project. The method will
establish a <i>Container</i> with content type MIME_PROJECT_SOURCES and MIME_JAVA_SOURCES, which
contains all files in the given subtree. You can not establish a java source subtree, if there's
already one rooted:<ul>
<li>at the same place (at folder `rootFolder')
<li>at some of rootFolder's parents
<li>at some of rootFolder's children
</ul>
In such case, the implementation must throw IllegalArgumentException.
<p>
In the case that the change to project's definition could not be recorded, the implementation should
throw IOException (e.g. the project file is read-only or otherwise protected, disk full, ...).
<p>
The new ContentDescriptor (its ProjectMember) will be created with the `proposedID' name (filename on the project
filesystem). In the case that `proposedID' is null, or it clashes with some existing name, the implementation
will generate an unique one; the `proposedID' is only a hint.
<p>
You may assign the sources a specific `displayName', so that it can be easily distinguished in presentations
(this is rather useful if most source directories are named "src" or the like). Again, if the displayName
parameter is null, a default displayName will be derived.
<br>
PENDING -- shouldn't there be a dedicated, checked exception to report overlaps (the conflicting
Descriptor could be sent as the exception's property) ?
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>rootFolder</CODE> - the root folder of the subtree that contain sht esource files.<DD><CODE>proposedID</CODE> - proposed ID of the source descriptor; if <code>null</code>, the ID is automagically
generated.
<DT><B>Returns:</B><DD>the descriptor for java sources container that was created.
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - when the new descriptor would overlap some pre-existing JavaDescriptor
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="removeJavaSources(org.netbeans.api.java.project.JavaDescriptor)"><!-- --></A><H3>
removeJavaSources</H3>
<PRE>
public void <B>removeJavaSources</B>(<A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> sources)
throws java.io.IOException</PRE>
<DL>
<DD>Unmarks some sources as being "java soruces". If the sources are part of some <A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html"><CODE>CompilationUnit</CODE></A>, they will
be removed from that CompilationUnit before they are removed from the project. The call will effectively attempt
to <CODE>delete()</CODE> the <CODE>ProjectMember</CODE> returned by <CODE>ContentDescriptor.getProjectMember()</CODE>.
This operation does not destroy the CompilationUnit, even if the source container was the last one in the CompilationUnit,
nor it erases the source files themselves. In addition, if the files contained by the <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html"><CODE>JavaDescriptor</CODE></A> are
included into project in some other way (e.g. as a generic project sources through some <CODE>SourceDescriptor</CODE>,
they will still remain as a part of the project, although they will not be treated as java.
<p>
<i>A note to implementors of JavaDescriptor containers</i>: Please make a dedicated <CODE>ProjectMember</CODE> to hold
the JavaDescriptor, so that it can be erased without affecting other of your information. Put only information whose
lifecycle is the same as the java source container into that ProjectMember.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sources</CODE> - descriptor of java sources, which should be no longer treated as java sources
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if the project state could not be changed.</DL>
</DD>
</DL>
<HR>
<A NAME="findSourceDescriptor(org.openide.filesystems.FileObject)"><!-- --></A><H3>
findSourceDescriptor</H3>
<PRE>
public final <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> <B>findSourceDescriptor</B>(org.openide.filesystems.FileObject src)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="assignSources(org.netbeans.api.java.project.JavaDescriptor, org.netbeans.api.java.project.CompilationUnit)"><!-- --></A><H3>
assignSources</H3>
<PRE>
public final void <B>assignSources</B>(<A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> desc,
<A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A> unit)
throws java.io.IOException</PRE>
<DL>
<DD><DL>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="assignSources(org.netbeans.api.java.project.JavaDescriptor, org.netbeans.api.java.project.CompilationUnit, org.netbeans.api.java.project.JavaDescriptor)"><!-- --></A><H3>
assignSources</H3>
<PRE>
public void <B>assignSources</B>(<A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> desc,
<A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A> unit,
<A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> insertBefore)
throws java.io.IOException,
java.lang.IllegalArgumentException</PRE>
<DL>
<DD><DL>
<DD><CODE>java.io.IOException</CODE>
<DD><CODE>java.lang.IllegalArgumentException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="createCompilationUnit(java.lang.String)"><!-- --></A><H3>
createCompilationUnit</H3>
<PRE>
public <A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A> <B>createCompilationUnit</B>(java.lang.String name)
throws java.io.IOException</PRE>
<DL>
<DD><DL>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="createCompilationUnit(java.lang.String, java.lang.String, java.util.List)"><!-- --></A><H3>
createCompilationUnit</H3>
<PRE>
public <A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A> <B>createCompilationUnit</B>(java.lang.String name,
java.lang.String displayName,
java.util.List initialRoots)
throws java.io.IOException,
java.lang.IllegalArgumentException</PRE>
<DL>
<DD><DL>
<DD><CODE>java.io.IOException</CODE>
<DD><CODE>java.lang.IllegalArgumentException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="removeCompilationUnit(org.netbeans.api.java.project.CompilationUnit, boolean)"><!-- --></A><H3>
removeCompilationUnit</H3>
<PRE>
public void <B>removeCompilationUnit</B>(<A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A> cu,
boolean removeSources)
throws java.io.IOException,
java.lang.IllegalArgumentException</PRE>
<DL>
<DD><DL>
<DD><CODE>java.io.IOException</CODE>
<DD><CODE>java.lang.IllegalArgumentException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="findMatchingDescriptor(org.openide.filesystems.FileObject)"><!-- --></A><H3>
findMatchingDescriptor</H3>
<PRE>
public final <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> <B>findMatchingDescriptor</B>(org.openide.filesystems.FileObject folder)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getClassesDescriptor(org.netbeans.api.projects.ProjectMember)"><!-- --></A><H3>
getClassesDescriptor</H3>
<PRE>
public static <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> <B>getClassesDescriptor</B>(org.netbeans.api.projects.ProjectMember pm)</PRE>
<DL>
<DD>A convenience method, which obtains a JavaDescriptor describing (produced) java classes from a ProjectMember.
If the ProjectMember does not support the content <A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#MIME_JAVA_CLASSES"><CODE>MIME_JAVA_CLASSES</CODE></A>, the method returns <code>null</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pm</CODE> - the ProjectMember to query
<DT><B>Returns:</B><DD><A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html"><CODE>JavaDescriptor</CODE></A> which describes the ProjectMember's content as Java classes, or <code>null</code></DL>
</DD>
</DL>
<HR>
<A NAME="getCompilationUnits()"><!-- --></A><H3>
getCompilationUnits</H3>
<PRE>
public java.util.Collection <B>getCompilationUnits</B>()</PRE>
<DL>
<DD>Returns CompilationUnits that are defined for this project. If no units are
defined, it returns an empty collection.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>(unordered) collection of CompilationUnits. The returned collection
contains also NullCompilationUnit which is assigned to Java sources which
should not be compiled. The NullCompilationUnit differs from regular compilation
units in the way that it's getBuildTarget method returns null.</DL>
</DD>
</DL>
<HR>
<A NAME="getSourceDescriptors()"><!-- --></A><H3>
getSourceDescriptors</H3>
<PRE>
public java.util.Set <B>getSourceDescriptors</B>()</PRE>
<DL>
<DD>Returns a set of JavaDescriptors for the java sources present in the Project.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>set of <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html"><CODE>JavaDescriptor</CODE></A>s</DL>
</DD>
</DL>
<HR>
<A NAME="getSourceDescriptor(org.netbeans.api.projects.ProjectMember)"><!-- --></A><H3>
getSourceDescriptor</H3>
<PRE>
public static <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> <B>getSourceDescriptor</B>(org.netbeans.api.projects.ProjectMember pm)</PRE>
<DL>
<DD>A convenience method, which obtains a JavaDescriptor describing java sources from a ProjectMember.
If the ProjectMember does not support the content <A HREF="../../../../../../org/netbeans/api/java/project/JavaProject.html#MIME_JAVA_SOURCES"><CODE>MIME_JAVA_SOURCES</CODE></A>, the method returns <code>null</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pm</CODE> - the ProjectMember to query
<DT><B>Returns:</B><DD><A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html"><CODE>JavaDescriptor</CODE></A> which describes the ProjectMember's content as Java sources, or <code>null</code></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="JavaProject.html" TARGET="_top"><B>NO FRAMES</B></A>
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>
BasicJavaProject.html
(text/html, 27.2 KB)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Tue Jul 22 15:01:18 CEST 2003 -->
<TITLE>
BasicJavaProject
</TITLE>
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="BasicJavaProject";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="BasicJavaProject.html" TARGET="_top"><B>NO FRAMES</B></A>
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.netbeans.api.java.project.spi</FONT>
<BR>
Class BasicJavaProject</H2>
<PRE>
java.lang.Object
|
+--<B>org.netbeans.spi.java.project.BasicJavaProject</B>
</PRE>
<HR>
<DL>
<DT>public abstract class <B>BasicJavaProject</B><DT>extends java.lang.Object</DL>
<P>
This class is intended to be sublassed by providers of JavaProject logic.
<P>
<P>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/spi/java/project/BasicJavaProject.html#BasicJavaProject(org.netbeans.api.projects.Project)">BasicJavaProject</A></B>(org.netbeans.api.projects.Project owner)</CODE>
<BR>
Initializes a new instance of JavaProject.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/spi/java/project/BasicJavaProject.html#addProjectListener(org.netbeans.api.java.project.ProjectListener)">addProjectListener</A></B>(<A HREF="../../../../../../org/netbeans/api/java/project/ProjectListener.html">ProjectListener</A> l)</CODE>
<BR>
Registers a listener, which will be notified about changes in Java project
definition.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/spi/java/project/BasicJavaProject.html#assignSources(org.netbeans.api.java.project.JavaDescriptor, org.netbeans.api.java.project.CompilationUnit, org.netbeans.api.java.project.JavaDescriptor)">assignSources</A></B>(<A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> desc,
<A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A> unit,
<A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> insertBefore)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract <A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/spi/java/project/BasicJavaProject.html#createCompilationUnit(java.lang.String, java.lang.String, java.util.List)">createCompilationUnit</A></B>(java.lang.String name,
java.lang.String displayName,
java.util.List initialRoots)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/spi/java/project/BasicJavaProject.html#createJavaSources(org.openide.filesystems.FileObject, java.lang.String, java.lang.String)">createJavaSources</A></B>(org.openide.filesystems.FileObject rootFolder,
java.lang.String proposedID,
java.lang.String displayName)</CODE>
<BR>
Declares that the given subtree contains java sources for the project.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/spi/java/project/BasicJavaProject.html#fireAssignmentChange(org.netbeans.api.java.project.ProjectEvent)">fireAssignmentChange</A></B>(<A HREF="../../../../../../org/netbeans/api/java/project/ProjectEvent.html">ProjectEvent</A> e)</CODE>
<BR>
Notifies registered listeners about change in sources' assignment
to a CompilationUnit.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/spi/java/project/BasicJavaProject.html#fireSourcesChange(boolean, org.netbeans.api.java.project.ProjectEvent)">fireSourcesChange</A></B>(boolean add,
<A HREF="../../../../../../org/netbeans/api/java/project/ProjectEvent.html">ProjectEvent</A> e)</CODE>
<BR>
Notifies registered listeners about either adding or removing a
source subtree in the project.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/spi/java/project/BasicJavaProject.html#fireUnitChange(boolean, org.netbeans.api.java.project.ProjectEvent)">fireUnitChange</A></B>(boolean add,
<A HREF="../../../../../../org/netbeans/api/java/project/ProjectEvent.html">ProjectEvent</A> e)</CODE>
<BR>
Notifies registered listeners about either adding or removing a
CompilationUnit in the project.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract java.util.Collection</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/spi/java/project/BasicJavaProject.html#getCompilationUnits()">getCompilationUnits</A></B>()</CODE>
<BR>
Returns CompilationUnits that are defined for this project.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> org.netbeans.api.projects.Project</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/spi/java/project/BasicJavaProject.html#getProject()">getProject</A></B>()</CODE>
<BR>
Gets the <code>Project</code> which Java-specific context the <code>JavaProject</code>
carries on.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract java.util.Set</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/spi/java/project/BasicJavaProject.html#getSourceDescriptors()">getSourceDescriptors</A></B>()</CODE>
<BR>
Returns a set of JavaDescriptors for the java sources present in the Project.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/spi/java/project/BasicJavaProject.html#listenerAttached()">listenerAttached</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/spi/java/project/BasicJavaProject.html#removeCompilationUnit(org.netbeans.api.java.project.CompilationUnit, boolean)">removeCompilationUnit</A></B>(<A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A> cu,
boolean removeSources)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/spi/java/project/BasicJavaProject.html#removeJavaSources(org.netbeans.api.java.project.JavaDescriptor)">removeJavaSources</A></B>(<A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> sources)</CODE>
<BR>
Unmarks some sources as being "java soruces".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/netbeans/spi/java/project/BasicJavaProject.html#removeProjectListener(org.netbeans.api.java.project.ProjectListener)">removeProjectListener</A></B>(<A HREF="../../../../../../org/netbeans/api/java/project/ProjectListener.html">ProjectListener</A> l)</CODE>
<BR>
Unregisters a listener added by a previous call to <A HREF="../../../../../../org/netbeans/spi/java/project/BasicJavaProject.html#addProjectListener(org.netbeans.api.java.project.ProjectListener)"><CODE>addProjectListener(org.netbeans.api.java.project.ProjectListener)</CODE></A></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="BasicJavaProject(org.netbeans.api.projects.Project)"><!-- --></A><H3>
BasicJavaProject</H3>
<PRE>
protected <B>BasicJavaProject</B>(org.netbeans.api.projects.Project owner)</PRE>
<DL>
<DD>Initializes a new instance of JavaProject.
<P>
<DT><B>Parameters:</B><DD><CODE>owner</CODE> - the generic Project surrounding the JavaProject.</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="addProjectListener(org.netbeans.api.java.project.ProjectListener)"><!-- --></A><H3>
addProjectListener</H3>
<PRE>
public final void <B>addProjectListener</B>(<A HREF="../../../../../../org/netbeans/api/java/project/ProjectListener.html">ProjectListener</A> l)</PRE>
<DL>
<DD>Registers a listener, which will be notified about changes in Java project
definition.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - listener instance to register</DL>
</DD>
</DL>
<HR>
<A NAME="listenerAttached()"><!-- --></A><H3>
listenerAttached</H3>
<PRE>
protected void <B>listenerAttached</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeProjectListener(org.netbeans.api.java.project.ProjectListener)"><!-- --></A><H3>
removeProjectListener</H3>
<PRE>
public final void <B>removeProjectListener</B>(<A HREF="../../../../../../org/netbeans/api/java/project/ProjectListener.html">ProjectListener</A> l)</PRE>
<DL>
<DD>Unregisters a listener added by a previous call to <A HREF="../../../../../../org/netbeans/spi/java/project/BasicJavaProject.html#addProjectListener(org.netbeans.api.java.project.ProjectListener)"><CODE>addProjectListener(org.netbeans.api.java.project.ProjectListener)</CODE></A>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - listener instance to unregister</DL>
</DD>
</DL>
<HR>
<A NAME="fireUnitChange(boolean, org.netbeans.api.java.project.ProjectEvent)"><!-- --></A><H3>
fireUnitChange</H3>
<PRE>
protected final void <B>fireUnitChange</B>(boolean add,
<A HREF="../../../../../../org/netbeans/api/java/project/ProjectEvent.html">ProjectEvent</A> e)</PRE>
<DL>
<DD>Notifies registered listeners about either adding or removing a
CompilationUnit in the project.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>add</CODE> - true if a CompilationUnit has been added, false if removed.<DD><CODE>e</CODE> - event instance to be sent out</DL>
</DD>
</DL>
<HR>
<A NAME="fireSourcesChange(boolean, org.netbeans.api.java.project.ProjectEvent)"><!-- --></A><H3>
fireSourcesChange</H3>
<PRE>
protected final void <B>fireSourcesChange</B>(boolean add,
<A HREF="../../../../../../org/netbeans/api/java/project/ProjectEvent.html">ProjectEvent</A> e)</PRE>
<DL>
<DD>Notifies registered listeners about either adding or removing a
source subtree in the project.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>add</CODE> - true if a subtree has been added, false if removed.<DD><CODE>e</CODE> - event instance to be sent out</DL>
</DD>
</DL>
<HR>
<A NAME="fireAssignmentChange(org.netbeans.api.java.project.ProjectEvent)"><!-- --></A><H3>
fireAssignmentChange</H3>
<PRE>
protected final void <B>fireAssignmentChange</B>(<A HREF="../../../../../../org/netbeans/api/java/project/ProjectEvent.html">ProjectEvent</A> e)</PRE>
<DL>
<DD>Notifies registered listeners about change in sources' assignment
to a CompilationUnit.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>e</CODE> - event instance to be sent out</DL>
</DD>
</DL>
<HR>
<A NAME="getCompilationUnits()"><!-- --></A><H3>
getCompilationUnits</H3>
<PRE>
public abstract java.util.Collection <B>getCompilationUnits</B>()</PRE>
<DL>
<DD>Returns CompilationUnits that are defined for this project. If no units are
defined, it returns an empty collection.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>(unordered) collection of CompilationUnits. The returned collection
contains also NullCompilationUnit which is assigned to Java sources which
should not be compiled. The NullCompilationUnit differs from regular compilation
units in the way that it's getBuildTarget method returns null.</DL>
</DD>
</DL>
<HR>
<A NAME="getSourceDescriptors()"><!-- --></A><H3>
getSourceDescriptors</H3>
<PRE>
public abstract java.util.Set <B>getSourceDescriptors</B>()</PRE>
<DL>
<DD>Returns a set of JavaDescriptors for the java sources present in the Project.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>set of <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html"><CODE>JavaDescriptor</CODE></A>s</DL>
</DD>
</DL>
<HR>
<A NAME="getProject()"><!-- --></A><H3>
getProject</H3>
<PRE>
public final org.netbeans.api.projects.Project <B>getProject</B>()</PRE>
<DL>
<DD>Gets the <code>Project</code> which Java-specific context the <code>JavaProject</code>
carries on.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the <code>Project</code></DL>
</DD>
</DL>
<HR>
<A NAME="createJavaSources(org.openide.filesystems.FileObject, java.lang.String, java.lang.String)"><!-- --></A><H3>
createJavaSources</H3>
<PRE>
public abstract <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> <B>createJavaSources</B>(org.openide.filesystems.FileObject rootFolder,
java.lang.String proposedID,
java.lang.String displayName)
throws java.lang.IllegalArgumentException,
java.io.IOException</PRE>
<DL>
<DD>Declares that the given subtree contains java sources for the project. The method will
establish a <i>Container</i> with content type MIME_PROJECT_SOURCES and MIME_JAVA_SOURCES, which
contains all files in the given subtree. You can not establish a java source subtree, if there's
already one rooted:<ul>
<li>at the same place (at folder `rootFolder')
<li>at some of rootFolder's parents
<li>at some of rootFolder's children
</ul>
In such case, the implementation must throw IllegalArgumentException.
<p>
In the case that the change to project's definition could not be recorded, the implementation should
throw IOException (e.g. the project file is read-only or otherwise protected, disk full, ...).
<p>
The new ContentDescriptor (its ProjectMember) will be created with the `proposedID' name (filename on the project
filesystem). In the case that `proposedID' is null, or it clashes with some existing name, the implementation
will generate an unique one; the `proposedID' is only a hint.
<p>
You may assign the sources a specific `displayName', so that it can be easily distinguished in presentations
(this is rather useful if most source directories are named "src" or the like). Again, if the displayName
parameter is null, a default displayName will be derived.
<br>
PENDING -- shouldn't there be a dedicated, checked exception to report overlaps (the conflicting
Descriptor could be sent as the exception's property) ?
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>rootFolder</CODE> - the root folder of the subtree that contain sht esource files.<DD><CODE>proposedID</CODE> - proposed ID of the source descriptor; if <code>null</code>, the ID is automagically
generated.
<DT><B>Returns:</B><DD>the descriptor for java sources container that was created.
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - when the new descriptor would overlap some pre-existing JavaDescriptor
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="removeJavaSources(org.netbeans.api.java.project.JavaDescriptor)"><!-- --></A><H3>
removeJavaSources</H3>
<PRE>
public abstract void <B>removeJavaSources</B>(<A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> sources)
throws java.io.IOException</PRE>
<DL>
<DD>Unmarks some sources as being "java soruces". If the sources are part of some <A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html"><CODE>CompilationUnit</CODE></A>, they will
be removed from that CompilationUnit before they are removed from the project. The call will effectively attempt
to <CODE>delete()</CODE> the <CODE>ProjectMember</CODE> returned by <CODE>ContentDescriptor.getProjectMember()</CODE>.
This operation does not destroy the CompilationUnit, even if the source container was the last one in the CompilationUnit,
nor it erases the source files themselves. In addition, if the files contained by the <A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html"><CODE>JavaDescriptor</CODE></A> are
included into project in some other way (e.g. as a generic project sources through some <CODE>SourceDescriptor</CODE>,
they will still remain as a part of the project, although they will not be treated as java.
<p>
<i>A note to implementors of JavaDescriptor containers</i>: Please make a dedicated <CODE>ProjectMember</CODE> to hold
the JavaDescriptor, so that it can be erased without affecting other of your information. Put only information whose
lifecycle is the same as the java source container into that ProjectMember.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sources</CODE> - descriptor of java sources, which should be no longer treated as java sources
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if the project state could not be changed.</DL>
</DD>
</DL>
<HR>
<A NAME="assignSources(org.netbeans.api.java.project.JavaDescriptor, org.netbeans.api.java.project.CompilationUnit, org.netbeans.api.java.project.JavaDescriptor)"><!-- --></A><H3>
assignSources</H3>
<PRE>
public abstract void <B>assignSources</B>(<A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> desc,
<A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A> unit,
<A HREF="../../../../../../org/netbeans/api/java/project/JavaDescriptor.html">JavaDescriptor</A> insertBefore)
throws java.io.IOException,
java.lang.IllegalArgumentException</PRE>
<DL>
<DD><DL>
<DD><CODE>java.io.IOException</CODE>
<DD><CODE>java.lang.IllegalArgumentException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="createCompilationUnit(java.lang.String, java.lang.String, java.util.List)"><!-- --></A><H3>
createCompilationUnit</H3>
<PRE>
public abstract <A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A> <B>createCompilationUnit</B>(java.lang.String name,
java.lang.String displayName,
java.util.List initialRoots)
throws java.io.IOException,
java.lang.IllegalArgumentException</PRE>
<DL>
<DD><DL>
<DD><CODE>java.io.IOException</CODE>
<DD><CODE>java.lang.IllegalArgumentException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="removeCompilationUnit(org.netbeans.api.java.project.CompilationUnit, boolean)"><!-- --></A><H3>
removeCompilationUnit</H3>
<PRE>
public abstract void <B>removeCompilationUnit</B>(<A HREF="../../../../../../org/netbeans/api/java/project/CompilationUnit.html">CompilationUnit</A> cu,
boolean removeSources)
throws java.io.IOException,
java.lang.IllegalArgumentException</PRE>
<DL>
<DD><DL>
<DD><CODE>java.io.IOException</CODE>
<DD><CODE>java.lang.IllegalArgumentException</CODE></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="BasicJavaProject.html" TARGET="_top"><B>NO FRAMES</B></A>
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>