|
Lines 250-263
Link Here
|
| 250 |
} |
250 |
} |
| 251 |
if (includedFile != null) { |
251 |
if (includedFile != null) { |
| 252 |
IPath root = TaglibIndex.getContextRoot(getCurrentBaseLocation()); |
252 |
IPath root = TaglibIndex.getContextRoot(getCurrentBaseLocation()); |
| 253 |
IPath fileLocation = new Path(URIHelper.normalize(StringUtils.strip(includedFile).trim(), getCurrentBaseLocation().toString(), root.toString())); |
253 |
// strip any extraneous quotes and white space |
|
|
254 |
includedFile = StringUtils.strip(includedFile).trim(); |
| 255 |
IPath fileLocation = null; |
| 256 |
if (includedFile.startsWith("/")) { |
| 257 |
fileLocation = root.append(includedFile); |
| 258 |
} |
| 259 |
else { |
| 260 |
fileLocation = new Path(URIHelper.normalize(includedFile, getCurrentBaseLocation().toString(), root.toString())); |
| 261 |
} |
| 254 |
// check for "loops" |
262 |
// check for "loops" |
| 255 |
if (!getIncludes().contains(fileLocation) && fileLocation != null && !fileLocation.equals(getCurrentBaseLocation())) { |
263 |
if (!getIncludes().contains(fileLocation) && fileLocation != null && !fileLocation.equals(getCurrentBaseLocation())) { |
| 256 |
/* |
264 |
/* |
| 257 |
* Prevent slow performance when editing scriptlet part of |
265 |
* Prevent slow performance when editing scriptlet part of |
| 258 |
* the JSP only process includes if they've been modified. |
266 |
* the JSP by only processing includes if they've been |
| 259 |
* The IncludeHelper remembers any CMDocuments created |
267 |
* modified. The IncludeHelper remembers any CMDocuments |
| 260 |
* from the files it parses. Caching the URI and |
268 |
* created from the files it parses. Caching the URI and |
| 261 |
* prefix/tagdir allows us to just enable the CMDocument |
269 |
* prefix/tagdir allows us to just enable the CMDocument |
| 262 |
* when the previously parsed files. |
270 |
* when the previously parsed files. |
| 263 |
*/ |
271 |
*/ |