[512742] ResourceException below FileContentCache$CacheEntry.readContents (thrown in FileSystemResourceManager.read)
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentFactoryTLD.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentFactoryTLD.java
index a6ed917..24b1d1d 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentFactoryTLD.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentFactoryTLD.java
@@ -396,7 +396,7 @@
IProject project = file.getProject();
try {
// http://bugs.eclipse.org/433619
- if (!project.hasNature(JavaCore.NATURE_ID)) {
+ if (!project.isAccessible() || !project.hasNature(JavaCore.NATURE_ID)) {
return null;
}
final IJavaProject javaProject = JavaCore.create(project);
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FileContentCache.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FileContentCache.java
index 6a29258..67463b9 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FileContentCache.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FileContentCache.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2012 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -109,7 +109,7 @@
try {
IFile f = getFile(filePath);
if (f != null && f.isAccessible()) {
- is = f.getContents();
+ is = f.getContents(true);
}
else {
is = new FileInputStream(filePath.toFile());
diff --git a/bundles/org.eclipse.jst.jsp.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.jsp.ui/META-INF/MANIFEST.MF
index 3b5e435..2067d17 100644
--- a/bundles/org.eclipse.jst.jsp.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jst.jsp.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jst.jsp.ui; singleton:=true
-Bundle-Version: 1.1.1100.qualifier
+Bundle-Version: 1.1.1200.qualifier
Bundle-Activator: org.eclipse.jst.jsp.ui.internal.JSPUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.jst.jsp.ui/pom.xml b/bundles/org.eclipse.jst.jsp.ui/pom.xml
index 264bc7c..3ad765e 100644
--- a/bundles/org.eclipse.jst.jsp.ui/pom.xml
+++ b/bundles/org.eclipse.jst.jsp.ui/pom.xml
@@ -21,6 +21,6 @@
<groupId>org.eclipse.webtools.sourceediting</groupId>
<artifactId>org.eclipse.jst.jsp.ui</artifactId>
- <version>1.1.1100-SNAPSHOT</version>
+ <version>1.1.1200-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibHyperlinkDetector.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibHyperlinkDetector.java
index 30ef559..50dc904 100644
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibHyperlinkDetector.java
+++ b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibHyperlinkDetector.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2012 IBM Corporation and others.
+ * Copyright (c) 2006, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -89,23 +89,25 @@
else if (searchType == ATTRIBUTE)
declarations = model.getDocument().getElementsByTagName(JSP11TLDNames.ATTRIBUTE);
}
- for (int i = 0; i < declarations.getLength(); i++) {
- NodeList names = model.getDocument().getElementsByTagName(JSP11TLDNames.NAME);
- for (int j = 0; j < names.getLength(); j++) {
- String name = getContainedText(names.item(j));
- if (searchName.compareTo(name) == 0) {
- int start = -1;
- int end = -1;
- Node caret = names.item(j).getFirstChild();
- if (caret != null) {
- start = ((IDOMNode) caret).getStartOffset();
- }
- while (caret != null) {
- end = ((IDOMNode) caret).getEndOffset();
- caret = caret.getNextSibling();
- }
- if (start > 0) {
- return new Region(start, end - start);
+ if (declarations != null) {
+ for (int i = 0; i < declarations.getLength(); i++) {
+ NodeList names = model.getDocument().getElementsByTagName(JSP11TLDNames.NAME);
+ for (int j = 0; j < names.getLength(); j++) {
+ String name = getContainedText(names.item(j));
+ if (searchName.compareTo(name) == 0) {
+ int start = -1;
+ int end = -1;
+ Node caret = names.item(j).getFirstChild();
+ if (caret != null) {
+ start = ((IDOMNode) caret).getStartOffset();
+ }
+ while (caret != null) {
+ end = ((IDOMNode) caret).getEndOffset();
+ caret = caret.getNextSibling();
+ }
+ if (start > 0) {
+ return new Region(start, end - start);
+ }
}
}
}