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 |
} |