[181057] Custom tags not found in build path after project entries
[178443] JSP does not respect TEI VariableInfo when using linked resources
[174042] "unresolved variable" validation error for variable declared in included file via custom tag
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/DeploymentDescriptorPropertyGroupCache.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/DeploymentDescriptorPropertyGroupCache.java
index d1815a6..da4ab99 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/DeploymentDescriptorPropertyGroupCache.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/DeploymentDescriptorPropertyGroupCache.java
@@ -17,7 +17,6 @@
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
-import java.util.Vector;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
@@ -26,15 +25,11 @@
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.resources.WorkspaceJob;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jst.jsp.core.internal.Logger;
import org.eclipse.jst.jsp.core.taglib.TaglibIndex;
import org.eclipse.wst.sse.core.StructuredModelManager;
@@ -50,38 +45,6 @@
* is not persisted.
*/
public class DeploymentDescriptorPropertyGroupCache {
- private class DescriptorReader extends WorkspaceJob {
- private List queue = new Vector();
-
- public DescriptorReader() {
- super("Updating Deployment Descriptor Cache");
- setSystem(true);
- setPriority(Job.SHORT);
- }
-
- void read(IPath path) {
- queue.add(path);
- }
-
- public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
-
- while (!queue.isEmpty()) {
- IPath path = (IPath) queue.remove(0);
-
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- if (file.isAccessible()) {
- fetchPropertyGroupContainer(path, monitor);
- }
- else {
- fPropertyGroupContainerReferences.remove(path);
- }
- }
- return Status.OK_STATUS;
- }
- }
-
private static class PropertyGroupContainer {
long modificationStamp;
PropertyGroup[] groups;
@@ -559,8 +522,6 @@
private Map fPropertyGroupContainerReferences = new Hashtable();
- private DescriptorReader fReaderJob = new DescriptorReader();
-
private IResourceChangeListener fResourceChangeListener = new ResourceChangeListener();
private DeploymentDescriptorPropertyGroupCache() {
@@ -659,8 +620,7 @@
return propertyGroupContainer;
}
- private void updateCacheEntry(final IPath fullPath) {
- fReaderJob.read(fullPath);
- fReaderJob.schedule();
+ private void updateCacheEntry(IPath fullPath) {
+ fPropertyGroupContainerReferences.remove(fullPath);
}
}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java
index f596843..d7a3485 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java
@@ -1276,7 +1276,7 @@
case IClasspathEntry.CPE_VARIABLE : {
IPath libPath = JavaCore.getResolvedVariablePath(entry.getPath());
if (libPath != null) {
- File file = new File(libPath.toOSString());
+ File file = libPath.toFile();
// file in filesystem
if (file.exists() && !file.isDirectory()) {
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndex.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndex.java
index 25fbc28..4b10fb1 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndex.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndex.java
@@ -594,7 +594,7 @@
private TaglibIndexDelta fCurrentTopLevelDelta = null;
- Map fProjectDescriptions = new Hashtable();
+ Map fProjectDescriptions = null;
private ResourceChangeListener fResourceChangeListener;
@@ -731,7 +731,9 @@
ProjectDescription getDescription(IProject project) {
ProjectDescription description = null;
- description = (ProjectDescription) fProjectDescriptions.get(project);
+ if (isInitialized()) {
+ description = (ProjectDescription) fProjectDescriptions.get(project);
+ }
return description;
}
@@ -761,10 +763,10 @@
ITaglibRecord[] records = new ITaglibRecord[0];
if (path.segmentCount() > 0) {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0));
- if(project.isAccessible()) {
+ if (project.isAccessible()) {
ProjectDescription description = createDescription(project);
List availableRecords = description.getAvailableTaglibRecords(path);
-
+
// ICatalog catalog =
// XMLCorePlugin.getDefault().getDefaultXMLCatalog();
// while (catalog != null) {
@@ -781,7 +783,7 @@
// }
// }
// }
-
+
records = (ITaglibRecord[]) availableRecords.toArray(records);
}
}