This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 60852 - Ambiguity in ProjectClassPathExtender.addArchiveFile
Summary: Ambiguity in ProjectClassPathExtender.addArchiveFile
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords: API
Depends on: 75471
Blocks: 49653
  Show dependency tree
 
Reported: 2005-07-11 20:09 UTC by Jesse Glick
Modified: 2006-10-23 16:40 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2005-07-11 20:09:08 UTC
The class Javadoc says that you can add a folder to the classpath with this
interface. Should you then use addArchiveFile, whose name (and current Javadoc)
implies that only archives are accepted? j2seproject's impl does not seem to
actually support that scenario at all. Either

1. Change the class Javadoc to not advertise the ability to add a folder.

2. Or, change addArchiveFile's Javadoc, and j2seproject's impl, to make it clear
that the parameter may be a folder. (fast-track review)

3. Or, make a new extension interface that has a separate method for adding a
folder to the classpath, and preferably impl the new interface in j2seproject
too. If doing this, you should probably introduce a .api uninstantiable class
with static methods to call ProjectClassPathExtender, so as to separate API from
SPI - something we should have done to begin with. (fast-track review)

Another confusing thing about this interface is that addArchiveFile apparently
expects the isData FileObject for the ZIP/JAR file itself. This is inconsistent
with usage everywhere else in the project system APIs, where a ZIP/JAR classpath
entry is represented by the JarFileSystem FileObject for the archive root.
Comment 1 Tomas Zezula 2005-12-09 13:57:38 UTC
Require san an API change, not an stopper issue.
Comment 2 Tomas Zezula 2006-05-22 16:10:15 UTC
Checking in j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProject.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProject.java,v
 <--  J2SEProject.java
new revision: 1.61; previous revision: 1.60
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/classpath/ClassPathProviderImpl.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/classpath/ClassPathProviderImpl.java,v
 <--  ClassPathProviderImpl.java
new revision: 1.18; previous revision: 1.17
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/classpath/J2SEProjectClassPathExtender.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/classpath/J2SEProjectClassPathExtender.java,v
 <--  J2SEProjectClassPathExtender.java
new revision: 1.13; previous revision: 1.12
done
RCS file:
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/classpath/J2SEProjectClassPathModifier.java,v
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/classpath/J2SEProjectClassPathModifier.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/classpath/J2SEProjectClassPathModifier.java,v
 <--  J2SEProjectClassPathModifier.java
initial revision: 1.1
done
RCS file:
/cvs/java/j2seproject/test/unit/src/org/netbeans/modules/java/j2seproject/classpath/J2SEProjectClassPathModifierTest.java,v
done
Checking in
j2seproject/test/unit/src/org/netbeans/modules/java/j2seproject/classpath/J2SEProjectClassPathModifierTest.java;
/cvs/java/j2seproject/test/unit/src/org/netbeans/modules/java/j2seproject/classpath/J2SEProjectClassPathModifierTest.java,v
 <--  J2SEProjectClassPathModifierTest.java
initial revision: 1.1
done
Checking in project/apichanges.xml;
/cvs/java/project/apichanges.xml,v  <--  apichanges.xml
new revision: 1.14; previous revision: 1.13
done
Checking in project/manifest.mf;
/cvs/java/project/manifest.mf,v  <--  manifest.mf
new revision: 1.19; previous revision: 1.18
done
Checking in project/nbproject/project.properties;
/cvs/java/project/nbproject/project.properties,v  <--  project.properties
new revision: 1.21; previous revision: 1.20
done
RCS file:
/cvs/java/project/src/org/netbeans/api/java/project/classpath/ProjectClassPathModifier.java,v
done
Checking in
project/src/org/netbeans/api/java/project/classpath/ProjectClassPathModifier.java;
/cvs/java/project/src/org/netbeans/api/java/project/classpath/ProjectClassPathModifier.java,v
 <--  ProjectClassPathModifier.java
initial revision: 1.1
done
RCS file:
/cvs/java/project/src/org/netbeans/modules/java/project/classpath/ProjectClassPathModifierAccessor.java,v
done
Checking in
project/src/org/netbeans/modules/java/project/classpath/ProjectClassPathModifierAccessor.java;
/cvs/java/project/src/org/netbeans/modules/java/project/classpath/ProjectClassPathModifierAccessor.java,v
 <--  ProjectClassPathModifierAccessor.java
initial revision: 1.1
done
Checking in
project/src/org/netbeans/spi/java/project/classpath/ProjectClassPathExtender.java;
/cvs/java/project/src/org/netbeans/spi/java/project/classpath/ProjectClassPathExtender.java,v
 <--  ProjectClassPathExtender.java
new revision: 1.4; previous revision: 1.3
done
RCS file:
/cvs/java/project/src/org/netbeans/spi/java/project/classpath/ProjectClassPathModifierImplementation.java,v
done
Checking in
project/src/org/netbeans/spi/java/project/classpath/ProjectClassPathModifierImplementation.java;
/cvs/java/project/src/org/netbeans/spi/java/project/classpath/ProjectClassPathModifierImplementation.java,v
 <--  ProjectClassPathModifierImplementation.java
initial revision: 1.1
done