Author: scabanovich
Date: 2007-09-26 09:41:53 -0400 (Wed, 26 Sep 2007)
New Revision: 3813
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java
Log:
JBIDE-948
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java 2007-09-26
13:34:20 UTC (rev 3812)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java 2007-09-26
13:41:53 UTC (rev 3813)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.seam.internal.core.validation;
+import java.util.Arrays;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
@@ -175,7 +177,9 @@
public void clearAll() {
removedFiles.clear();
- registeredResources.clear();
+ synchronized (registeredResources) {
+ registeredResources.clear();
+ }
oldVariableNamesForELValidation.clear();
coreLinks.clearAll();
elLinks.clearAll();
@@ -189,7 +193,9 @@
public void clearRegisteredFiles() {
removedFiles.clear();
- registeredResources.clear();
+ synchronized (registeredResources) {
+ registeredResources.clear();
+ }
}
public void clearElResourceLinks() {
@@ -231,11 +237,17 @@
}
public Set<IFile> getRegisteredFiles() {
- return registeredResources;
+ Set<IFile> copy = new HashSet<IFile>();
+ synchronized (registeredResources) {
+ copy.addAll(registeredResources);
+ }
+ return copy;
}
public void registerFile(IFile file) {
- registeredResources.add(file);
+ synchronized (registeredResources) {
+ registeredResources.add(file);
+ }
}
public static class LinkCollection {
Show replies by date