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 53056 - Review of ProjectClassPathSupport
Summary: Review of ProjectClassPathSupport
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks: 42309
  Show dependency tree
 
Reported: 2005-01-06 13:07 UTC by Tomas Zezula
Modified: 2006-03-24 13:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Diff (26.85 KB, patch)
2005-01-06 13:09 UTC, Tomas Zezula
Details | Diff
New diff of java module, the signature createPropertyBasedClassPathImplementation changed to take array of property names (27.89 KB, patch)
2005-01-07 10:04 UTC, Tomas Zezula
Details | Diff
Final diff with resolved issues (30.43 KB, patch)
2005-01-11 14:40 UTC, Tomas Zezula
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Zezula 2005-01-06 13:07:50 UTC
ProjectCLassPathSupport is a support class
providing a static helper method
createPropertyBasedClassPathImplementation
(AntProjectHelper, PropertyEvaluator, String) for
creating ClassPathImplementation based on the Ant
property. 
Use Case: The original
ProjectClassPathImplementation has a copy in each
project type. It is better to provide support
factory method.

Stability: Should become stable in NetBeans 4.1
Comment 1 Tomas Zezula 2005-01-06 13:09:50 UTC
Created attachment 19519 [details]
Diff
Comment 2 Tomas Zezula 2005-01-07 10:00:32 UTC
I've changed the signature of the
ProjectClassPathSupport.createPropertyBasedClassPathImplementation
(AntProjectHelper, PropertyEvaluator, Sring)
to
ProjectClassPathSupport.createPropertyBasedClassPathImplementation
(AntProjectHelper, PropertyEvaluator, Sring[])

to remove another one implementation of the ClassPathImplementation in
the j2ee project.
Comment 3 Tomas Zezula 2005-01-07 10:04:17 UTC
Created attachment 19545 [details]
New diff of java module, the signature createPropertyBasedClassPathImplementation changed to take array of property names
Comment 4 Jesse Glick 2005-01-10 19:00:41 UTC
apichanges.xml should use <class> and <issue> elements, and <api
name="classpath"/> lowercase.


I don't think the change to arch.xml is required. People wishing to
see all API classes defined by the module can look at the Javadoc.
There is nothing of special interest here.


Copyright 2005.


Rather than requiring an AntProjectHelper to be passed into the API,
which is a pretty heavyweight object that also probably makes unit
testing needlessly difficult, why not just pass in a File basedir?


org.netbeans.modules.java.project should include the maj rel vers, /1.


Javadoc is unclear on why propertyNames is an array. Are the values of
all the named properties obtained and concatenated using
File.pathSeparator? If so, say so.


Missing @return tag on the factory method.
Comment 5 Tomas Zezula 2005-01-11 14:40:08 UTC
Created attachment 19616 [details]
Final diff with resolved issues
Comment 6 Jesse Glick 2005-01-11 20:17:52 UTC
Looks fine.

Note that it would be possible to simplify the unit test to not create
any project nor in fact write anything to disk at all - just pick some
random dir as the basedir (like getWorkDirPath()) and use methods in
PropertyUtils to make a simple in-memory evaluator. Then you can check
the resultant ClassPath's entries (rather than roots), since you just
care about URLs (the files need not really exist).

Note also that the current unit test does not attempt to use archive
files, only directories, as CP entries.
Comment 7 Tomas Pavek 2005-01-12 13:26:38 UTC
Looks fine to me.
Comment 8 Jaroslav Tulach 2005-01-12 15:47:29 UTC
Looks ok.
Comment 9 Tomas Zezula 2005-01-13 09:39:05 UTC
Checking in
java/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.15; previous revision: 1.14
done
Removing
java/j2seproject/src/org/netbeans/modules/java/j2seproject/classpath/ProjectClassPathImplementation.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/classpath/ProjectClassPathImplementation.java,v
 <--  ProjectClassPathImplementation.java
new revision: delete; previous revision: 1.6
done
Processing log script arguments...
More commits to come...
Checking in java/project/apichanges.xml;
/cvs/java/project/apichanges.xml,v  <--  apichanges.xml
new revision: 1.4; previous revision: 1.3
done
Checking in java/project/arch.xml;
/cvs/java/project/arch.xml,v  <--  arch.xml
new revision: 1.11; previous revision: 1.10
done
Processing log script arguments...
More commits to come...
Checking in java/project/nbproject/project.properties;
/cvs/java/project/nbproject/project.properties,v  <--  project.properties
new revision: 1.11; previous revision: 1.10
done
Checking in java/project/nbproject/project.xml;
/cvs/java/project/nbproject/project.xml,v  <--  project.xml
new revision: 1.18; previous revision: 1.17
done
Processing log script arguments...
More commits to come...
RCS file:
/cvs/java/project/src/org/netbeans/spi/java/project/classpath/support/ProjectClassPathImplementation.java,v
done
Checking in
java/project/src/org/netbeans/spi/java/project/classpath/support/ProjectClassPathImplementation.java;
/cvs/java/project/src/org/netbeans/spi/java/project/classpath/support/ProjectClassPathImplementation.java,v
 <--  ProjectClassPathImplementation.java
initial revision: 1.1
done
RCS file:
/cvs/java/project/src/org/netbeans/spi/java/project/classpath/support/ProjectClassPathSupport.java,v
done
Checking in
java/project/src/org/netbeans/spi/java/project/classpath/support/ProjectClassPathSupport.java;
/cvs/java/project/src/org/netbeans/spi/java/project/classpath/support/ProjectClassPathSupport.java,v
 <--  ProjectClassPathSupport.java
initial revision: 1.1
Comment 10 Jaromir Uhrik 2006-01-18 10:47:05 UTC
Marking this issue as VERIFIED since the issue reporter == issue owner.