[375365] race condition between downloading JARs and JSP validation,
TLDs not found
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCoreMessages.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCoreMessages.java
index 9ba72d4..c01b7a0 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCoreMessages.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCoreMessages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 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
@@ -66,6 +66,8 @@
public static String JSPCorePlugin_Initializing_JSP_Tools;
public static String JSPIndexManager;
+ public static String Processing_BuildPath_Changes;
+
/**
* @deprecated
*/
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePluginResources.properties b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePluginResources.properties
index 4d03291..bed7b8a 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePluginResources.properties
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePluginResources.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2004, 2012 IBM Corporation and others.
+# Copyright (c) 2004, 2013 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
@@ -49,6 +49,6 @@
TLDValidator_MissingListener=The listener class ''{0}'' was not found on the Java Build Path
Initializing=Processing JSP changes since last activation
Persisting_JSP_Translations=Persisting JSP Translations
-
+Processing_BuildPath_Changes=Processing Build Path changes
JSPCorePlugin_Initializing_JSP_Tools=Initializing JSP Tools
JSPIndexManager=JSP Index Manager
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperManager.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperManager.java
index c0b26e0..eb6231e 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperManager.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 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
@@ -14,12 +14,22 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceProxy;
+import org.eclipse.core.resources.IResourceProxyVisitor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.core.ElementChangedEvent;
import org.eclipse.jdt.core.IElementChangedListener;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaElementDelta;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IType;
+import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
+import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
/**
* Manages creation and caching (ordered MRU) of TaglibHelpers.
@@ -97,8 +107,32 @@
*/
private void handleClasspathChange(IJavaElementDelta[] changed, int i, IJavaElement proj) {
if (proj.getElementType() == IJavaElement.JAVA_PROJECT) {
- String projectName = ((IJavaProject) proj).getProject().getName();
+ final IProject project = ((IJavaProject) proj).getProject();
+ String projectName = project.getName();
fCache.removeHelper(projectName);
+ Job toucher = new Job(JSPCoreMessages.Processing_BuildPath_Changes) {
+ protected IStatus run(IProgressMonitor monitor) {
+ //touch JSPs
+ try {
+ project.accept(new IResourceProxyVisitor() {
+ public boolean visit(IResourceProxy proxy) throws CoreException {
+ if (!proxy.isDerived() && ContentTypeIdForJSP.indexOfJSPExtension(proxy.getName()) >= 0) {
+ proxy.requestResource().touch(null);
+ }
+ return !proxy.isDerived();
+ }
+ }, IResource.DEPTH_INFINITE);
+ }
+ catch (CoreException e) {
+ // ignore
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ toucher.setPriority(Job.BUILD);
+ toucher.setUser(false);
+ toucher.setSystem(false);
+ toucher.schedule();
}
}
}