Author: scabanovich
Date: 2009-06-15 10:58:05 -0400 (Mon, 15 Jun 2009)
New Revision: 15953
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4393
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2009-06-15
13:44:49 UTC (rev 15952)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2009-06-15
14:58:05 UTC (rev 15953)
@@ -1005,6 +1005,9 @@
if(!(ds1[i1] instanceof ISeamJavaComponentDeclaration)) continue;
ISeamJavaComponentDeclaration jcd = (ISeamJavaComponentDeclaration)ds1[i1];
if(jcd.getClassName().equals(className)) continue;
+ // We cannot remove declaration if it declares the same component.
+ // This is an error to be reported by Seam Validator.
+ if(c.getName().equals(jcd.getName())) continue;
c.removeDeclaration(jcd);
changes = Change.addChange(changes, new Change(c, null, jcd, null));
}