Author: akazakov
Date: 2008-01-18 09:17:03 -0500 (Fri, 18 Jan 2008)
New Revision: 5805
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1652
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2008-01-18
14:16:08 UTC (rev 5804)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2008-01-18
14:17:03 UTC (rev 5805)
@@ -111,7 +111,11 @@
Set<IFile> files = validationContext.getRegisteredFiles();
for (IFile file : files) {
if(!reporter.isCancelled()) {
- validateFile(file);
+ if(file.exists()) {
+ validateFile(file);
+ } else {
+ validationContext.removeUnnamedElResource(file.getFullPath());
+ }
}
}
return OK_STATUS;
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 2008-01-18
14:16:08 UTC (rev 5804)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java 2008-01-18
14:17:03 UTC (rev 5805)
@@ -64,6 +64,14 @@
coreLinks.removeLinkedResources(resources);
}
+ /**
+ * Removes link between core resource and variable names.
+ * @param linkedResource
+ */
+ public void removeLinkedCoreResource(IPath resource) {
+ coreLinks.removeLinkedResource(resource);
+ }
+
public Set<IPath> getCoreResourcesByVariableName(String variableName) {
return coreLinks.getResourcesByVariableName(variableName);
}
@@ -145,6 +153,14 @@
}
/**
+ * Removes link between resource and variable names.
+ * @param linkedResource
+ */
+ public void removeLinkedElResource(IPath resource) {
+ elLinks.removeLinkedResource(resource);
+ }
+
+ /**
* @param changedFiles - files which were changed.
* @return Set of resources which we should validate during incremental EL validation.
*/
@@ -307,20 +323,28 @@
*/
public void removeLinkedResources(Set<IPath> resources) {
for (IPath resource : resources) {
- Set<String> resourceNames = variableNamesByResource.get(resource);
- if(resourceNames!=null) {
- for (String name : resourceNames) {
- Set<IPath> linkedResources = resourcesByVariableName.get(name);
- if(linkedResources!=null) {
- linkedResources.remove(resource);
- if(linkedResources.isEmpty()) {
- resourcesByVariableName.remove(name);
- }
+ removeLinkedResource(resource);
+ }
+ }
+
+ /**
+ * Removes link between resource and variable names.
+ * @param linkedResources
+ */
+ public void removeLinkedResource(IPath resource) {
+ Set<String> resourceNames = variableNamesByResource.get(resource);
+ if(resourceNames!=null) {
+ for (String name : resourceNames) {
+ Set<IPath> linkedResources = resourcesByVariableName.get(name);
+ if(linkedResources!=null) {
+ linkedResources.remove(resource);
+ if(linkedResources.isEmpty()) {
+ resourcesByVariableName.remove(name);
}
}
}
- variableNamesByResource.remove(resource);
}
+ variableNamesByResource.remove(resource);
}
public Set<IPath> getResourcesByVariableName(String variableName) {