Implemented by java/j2seproject
and asked for by
form
. Permits the Form Editor to add JavaBeans archives to the
Index: java/project/build.xml
===================================================================
RCS file: /cvs/java/project/build.xml,v
retrieving revision 1.5
diff -u -r1.5 build.xml
--- java/project/build.xml 14 Sep 2004 21:07:57 -0000 1.5
+++ java/project/build.xml 5 Jan 2005 15:15:21 -0000
@@ -12,22 +12,7 @@
Microsystems, Inc. All Rights Reserved.
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
Index: java/project/nbproject/project.xml
===================================================================
RCS file: /cvs/java/project/nbproject/project.xml,v
retrieving revision 1.16
diff -u -r1.16 project.xml
--- java/project/nbproject/project.xml 23 Dec 2004 22:01:30 -0000 1.16
+++ java/project/nbproject/project.xml 5 Jan 2005 15:15:21 -0000
@@ -134,6 +134,7 @@
org.netbeans.api.java.project
org.netbeans.spi.java.project.support.ui
org.netbeans.spi.java.project.support.ui.templates
+ org.netbeans.spi.java.project.classpath
Index: java/project/src/org/netbeans/modules/java/project/ProjectClassPathExtender.java
===================================================================
RCS file: java/project/src/org/netbeans/modules/java/project/ProjectClassPathExtender.java
diff -N java/project/src/org/netbeans/modules/java/project/ProjectClassPathExtender.java
--- java/project/src/org/netbeans/modules/java/project/ProjectClassPathExtender.java 12 May 2004 16:05:20 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,57 +0,0 @@
-/*
- * Sun Public License Notice
- *
- * The contents of this file are subject to the Sun Public License
- * Version 1.0 (the "License"). You may not use this file except in
- * compliance with the License. A copy of the License is available at
- * http://www.sun.com/
- *
- * The Original Code is NetBeans. The Initial Developer of the Original
- * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun
- * Microsystems, Inc. All Rights Reserved.
- */
-package org.netbeans.modules.java.project;
-
-import java.io.IOException;
-import org.openide.filesystems.FileObject;
-import org.netbeans.api.project.libraries.Library;
-import org.netbeans.api.project.ant.AntArtifact;
-
-
-
-
-
-/**
- * Interface for project's compile classpath extension
- */
-public interface ProjectClassPathExtender {
-
- /**
- * Adds Library into project's compile classpath if the
- * library is not already included.
- * @param library to be added, not null
- * @return true in the case when the classpath was changed
- * @exception IOException
- */
- public boolean addLibrary (Library library) throws IOException;
-
- /**
- * Adds archive file into project's compile classpath if the
- * file is not already on it.
- * @param archiveFile to be added, not null
- * @return true in the case when the classpath was changed
- * @exception IOException
- */
- public boolean addArchiveFile (FileObject archiveFile) throws IOException;
-
-
- /**
- * Adds AntArtifact into project's compile classpath if the
- * artifact is not already on it.
- * @param artifact the ant artifact to be added, not null
- * @return true in the case when the classpath was changed
- * @exception IOException
- */
- public boolean addAntArtifact (AntArtifact artifact) throws IOException;
-
-}
Index: java/project/src/org/netbeans/spi/java/project/classpath/ProjectClassPathExtender.java
===================================================================
RCS file: java/project/src/org/netbeans/spi/java/project/classpath/ProjectClassPathExtender.java
diff -N java/project/src/org/netbeans/spi/java/project/classpath/ProjectClassPathExtender.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ java/project/src/org/netbeans/spi/java/project/classpath/ProjectClassPathExtender.java 5 Jan 2005 15:15:21 -0000
@@ -0,0 +1,65 @@
+/*
+ * Sun Public License Notice
+ *
+ * The contents of this file are subject to the Sun Public License
+ * Version 1.0 (the "License"). You may not use this file except in
+ * compliance with the License. A copy of the License is available at
+ * http://www.sun.com/
+ *
+ * The Original Code is NetBeans. The Initial Developer of the Original
+ * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun
+ * Microsystems, Inc. All Rights Reserved.
+ */
+package org.netbeans.spi.java.project.classpath;
+
+import java.io.IOException;
+import org.openide.filesystems.FileObject;
+import org.netbeans.api.project.libraries.Library;
+import org.netbeans.api.project.ant.AntArtifact;
+
+
+
+
+
+/**
+ * Interface for project's compile classpath extension
+ */
+public interface ProjectClassPathExtender {
+
+ /**
+ * Adds Libraries into project's compile classpath if the
+ * libraries are not already included.
+ * @param libraries an array of libraries to be added, can't be or contain null.
+ * If the array contains libraries already contained on the project's compile
+ * classpath, they are not added. If the array contains duplicates
+ * the duplicates are added just once.
+ * @return true in the case when the classpath was changed
+ * @exception IOException in the case when the project metadata can not be stored.
+ */
+ public boolean addLibrary (Library[] libraries) throws IOException;
+
+ /**
+ * Adds archive files into project's compile classpath if the
+ * files are not already on it.
+ * @param archiveFiles to be added, can't be or contain null.
+ * If the array contains archive files or folders already contained on the project's compile
+ * classpath, they are not added. If the array contains duplicates
+ * the duplicates are added just once.
+ * @return true in the case when the classpath was changed
+ * @exception IOException in the case when the project metadata can not be stored.
+ */
+ public boolean addArchiveFile (FileObject[] archiveFiles) throws IOException;
+
+
+ /**
+ * Adds AntArtifacts into project's compile classpath if the
+ * artifacts are not already on it.
+ * @param artifacts the ant artifacts to be added, can't be or contain null.
+ * If the array contains already contained artifacts, they are not added.
+ * If the array contains duplicates the duplicates are added just once.
+ * @return true in the case when the classpath was changed
+ * @exception IOException in the case when the project metadata can not be stored.
+ */
+ public boolean addAntArtifact (AntArtifact[] artifacts) throws IOException;
+
+}
Index: form/build.xml
===================================================================
RCS file: /cvs/form/build.xml,v
retrieving revision 1.58
diff -u -r1.58 build.xml
--- form/build.xml 23 Dec 2004 22:01:38 -0000 1.58
+++ form/build.xml 5 Jan 2005 15:15:22 -0000
@@ -24,20 +24,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
Index: form/src/org/netbeans/modules/form/project/ClassPathUtils.java
===================================================================
RCS file: /cvs/form/src/org/netbeans/modules/form/project/ClassPathUtils.java,v
retrieving revision 1.6
diff -u -r1.6 ClassPathUtils.java
--- form/src/org/netbeans/modules/form/project/ClassPathUtils.java 26 Aug 2004 15:07:21 -0000 1.6
+++ form/src/org/netbeans/modules/form/project/ClassPathUtils.java 5 Jan 2005 15:15:22 -0000
@@ -30,7 +30,7 @@
import org.netbeans.api.java.classpath.ClassPath;
import org.netbeans.spi.java.classpath.support.ClassPathSupport;
import org.netbeans.api.java.queries.SourceForBinaryQuery;
-import org.netbeans.modules.java.project.ProjectClassPathExtender;
+import org.netbeans.spi.java.project.classpath.ProjectClassPathExtender;
/**
* Utility methods related to classpath in projects.
@@ -248,18 +248,18 @@
if (ClassSource.JAR_SOURCE.equals(type)) {
FileObject jarFile = FileUtil.toFileObject(new File(name));
- projectClassPath.addArchiveFile(jarFile);
+ projectClassPath.addArchiveFile(new FileObject[] {jarFile});
}
else if (ClassSource.LIBRARY_SOURCE.equals(type)) {
Library lib = LibraryManager.getDefault().getLibrary(name);
- projectClassPath.addLibrary(lib);
+ projectClassPath.addLibrary(new Library[] {lib});
}
else if (ClassSource.PROJECT_SOURCE.equals(type)) {
File jarFile = new File(name);
AntArtifact artifact =
AntArtifactQuery.findArtifactFromFile(jarFile);
if (artifact.getProject() != project)
- projectClassPath.addAntArtifact(artifact);
+ projectClassPath.addAntArtifact(new AntArtifact[] {artifact});
}
}
Index: ide/golden/impl-deps.txt
===================================================================
RCS file: /cvs/ide/golden/impl-deps.txt,v
retrieving revision 1.6
diff -u -r1.6 impl-deps.txt
--- ide/golden/impl-deps.txt 4 Jan 2005 19:15:32 -0000 1.6
+++ ide/golden/impl-deps.txt 5 Jan 2005 15:15:23 -0000
@@ -2,8 +2,6 @@
REQUIRES org.netbeans.modules.xml.core/2 (ide)
MODULE org.netbeans.modules.dbschema/1 (ide)
REQUIRES org.netbeans.modules.db/1 (ide)
-MODULE org.netbeans.modules.form/2 (ide)
- REQUIRES org.netbeans.modules.java.project/1 (ide)
MODULE org.netbeans.modules.j2ee.ddloaders/1 (j2ee)
REQUIRES org.netbeans.modules.j2ee.dd/1 (j2ee)
REQUIRES org.netbeans.modules.j2ee.ejbjarproject (j2ee)
@@ -27,8 +25,6 @@
MODULE org.netbeans.modules.java/1 (ide)
REQUIRES org.netbeans.modules.jmiutils/1 (ide)
REQUIRES org.netbeans.modules.mdr/1 (ide)
-MODULE org.netbeans.modules.java.j2seproject (ide)
- REQUIRES org.netbeans.modules.java.project/1 (ide)
MODULE org.netbeans.modules.javacore/1 (ide)
REQUIRES org.netbeans.modules.jmiutils/1 (ide)
REQUIRES org.netbeans.modules.mdr/1 (ide)
Index: ide/golden/public-packages.txt
===================================================================
RCS file: /cvs/ide/golden/public-packages.txt,v
retrieving revision 1.5
diff -u -r1.5 public-packages.txt
--- ide/golden/public-packages.txt 3 Jan 2005 12:51:11 -0000 1.5
+++ ide/golden/public-packages.txt 5 Jan 2005 15:15:23 -0000
@@ -227,6 +227,7 @@
org.netbeans.spi.java.classpath
org.netbeans.spi.java.classpath.support
org.netbeans.spi.java.platform
+org.netbeans.spi.java.project.classpath
org.netbeans.spi.java.project.support.ui
org.netbeans.spi.java.project.support.ui.templates
org.netbeans.spi.java.queries