Author: akazakov
Date: 2008-01-28 08:59:13 -0500 (Mon, 28 Jan 2008)
New Revision: 5991
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1691
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2008-01-28
12:36:27 UTC (rev 5990)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2008-01-28
13:59:13 UTC (rev 5991)
@@ -525,9 +525,11 @@
Set<ISeamComponentMethod> methods =
javaDeclaration.getMethodsByType(methodType);
if(methods!=null && methods.size()>1) {
for (ISeamComponentMethod method : methods) {
- IMethod javaMethod = (IMethod)method.getSourceMember();
- String methodName = javaMethod.getElementName();
- addError(DUPLICATE_METHOD_PREFIX_MESSAGE_ID + postfixMessageId, preferenceKey, new
String[]{methodName}, method, javaDeclaration.getResource());
+ if(javaDeclaration.getSourcePath().equals(method.getSourcePath())) {
+ IMethod javaMethod = (IMethod)method.getSourceMember();
+ String methodName = javaMethod.getElementName();
+ addError(DUPLICATE_METHOD_PREFIX_MESSAGE_ID + postfixMessageId, preferenceKey, new
String[]{methodName}, method, javaDeclaration.getResource());
+ }
}
}
}
@@ -626,7 +628,7 @@
for (ISeamComponentMethod method : methods) {
IMethod javaMethod = (IMethod)method.getSourceMember();
String methodName = javaMethod.getElementName();
- addError(sufixMessageId + NONCOMPONENTS_METHOD_SUFIX_MESSAGE_ID, preferenceKey, new
String[]{methodName}, method, declaration.getResource());
+ addError(sufixMessageId + NONCOMPONENTS_METHOD_SUFIX_MESSAGE_ID, preferenceKey, new
String[]{methodName}, method, method.getResource());
validationContext.addUnnamedCoreResource(declaration.getSourcePath());
}
} else {