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.

View | Details | Raw Unified | Return to bug 207717
Collapse All | Expand All

(-)a/web.project/src/org/netbeans/modules/web/project/classpath/ClassPathProviderImpl.java (-18 lines)
Lines 98-104 Link Here
98
     */
98
     */
99
    private static enum ClassPathCache {
99
    private static enum ClassPathCache {
100
        WEB_SOURCE,
100
        WEB_SOURCE,
101
        PACKAGED, // #131785
102
        WEB_COMPILATION,
101
        WEB_COMPILATION,
103
        WEB_RUNTIME,
102
        WEB_RUNTIME,
104
    }
103
    }
Lines 194-214 Link Here
194
        return null;
193
        return null;
195
    }
194
    }
196
    
195
    
197
    // packaged classpath = compilation time classpath - J2EE platform classpath
198
    private synchronized ClassPath getPackagedClasspath(FileType type) {        
199
        if (type == FileType.SOURCE || type == FileType.CLASS || type == FileType.WEB_SOURCE) {
200
            // treat all these types as source:
201
            ClassPath cp = cache.get(ClassPathCache.PACKAGED);
202
            if (cp == null) {
203
                cp = ClassPathFactory.createClassPath(ProjectClassPathSupport.createPropertyBasedClassPathImplementation(
204
                    projectDirectory, evaluator, new String[] {"javac.classpath"})); // NOI18N
205
                cache.put(ClassPathCache.PACKAGED, cp);
206
            }
207
            return cp;
208
        }
209
        return null;
210
    }
211
    
212
    private synchronized ClassPath getRunTimeClasspath(FileType type) {
196
    private synchronized ClassPath getRunTimeClasspath(FileType type) {
213
        if (type == FileType.WEB_SOURCE) {
197
        if (type == FileType.WEB_SOURCE) {
214
            if (sourceRoots.getRoots().length > 0) {
198
            if (sourceRoots.getRoots().length > 0) {
Lines 255-262 Link Here
255
            cp = getRunTimeClasspath(fileType);
239
            cp = getRunTimeClasspath(fileType);
256
        } else if (type.equals(ClassPath.SOURCE)) {
240
        } else if (type.equals(ClassPath.SOURCE)) {
257
            cp = getSourcepath(fileType);
241
            cp = getSourcepath(fileType);
258
        } else if (type.equals("classpath/packaged")) { // NOI18N
259
            cp = getPackagedClasspath(fileType);
260
        } else if (type.equals("js/library")) { // NOI18N
242
        } else if (type.equals("js/library")) { // NOI18N
261
            cp = getSourcepath(FileType.WEB_SOURCE);
243
            cp = getSourcepath(FileType.WEB_SOURCE);
262
        }
244
        }
(-)a/web.project/test/unit/src/org/netbeans/modules/web/project/classpath/ClassPathProviderImplTest.java (-5 lines)
Lines 226-236 Link Here
226
        cp = cpp.findClassPath(jspPage, ClassPath.SOURCE);
226
        cp = cpp.findClassPath(jspPage, ClassPath.SOURCE);
227
        checkJSPSourceClassPath(cp);
227
        checkJSPSourceClassPath(cp);
228
        
228
        
229
        // test packaged classpath - just basic test it does something
230
        // TODO: test that J2EE jars are excluded
231
        cp = cpp.findClassPath(sourceClass, "classpath/packaged");
232
        checkCompileClassPath(cp);
233
        
234
        //===========================================================
229
        //===========================================================
235
        //test special source structure described in issue #59055
230
        //test special source structure described in issue #59055
236
        //===========================================================
231
        //===========================================================

Return to bug 207717