Author: dazarov
Date: 2009-10-06 12:29:47 -0400 (Tue, 06 Oct 2009)
New Revision: 17940
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1077
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java 2009-10-06
16:21:08 UTC (rev 17939)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java 2009-10-06
16:29:47 UTC (rev 17940)
@@ -304,21 +304,15 @@
protected void checkDeclarations(ISeamComponent component) throws CoreException{
if(component.getJavaDeclaration() != null){
- if(coreHelper.isJar(component.getJavaDeclaration())){
- ITextSourceReference location =
((SeamComponentDeclaration)component.getJavaDeclaration()).getLocationFor(ISeamXmlComponentDeclaration.NAME);
- if(location == null || location.getStartPosition() != 0 || location.getLength() !=
0)
- status.addInfo(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR,
new String[]{component.getName(),
component.getJavaDeclaration().getResource().getFullPath().toString()}));
- }
+ if(coreHelper.isJar(component.getJavaDeclaration()) &&
component.getJavaDeclaration().getName() != null)
+ status.addInfo(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR,
new String[]{component.getName(),
component.getJavaDeclaration().getResource().getFullPath().toString()}));
}
Set<ISeamXmlComponentDeclaration> xmlDecls = component.getXmlDeclarations();
for(ISeamXmlComponentDeclaration xmlDecl : xmlDecls){
- if(coreHelper.isJar(xmlDecl)){
- ITextSourceReference location =
((SeamComponentDeclaration)xmlDecl).getLocationFor(ISeamXmlComponentDeclaration.NAME);
- if(location == null || location.getStartPosition() != 0 || location.getLength() !=
0)
- status.addInfo(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR,
new String[]{component.getName(), xmlDecl.getResource().getFullPath().toString()}));
- }
+ if(coreHelper.isJar(xmlDecl) && xmlDecl.getName() != null)
+ status.addInfo(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_DECLARATION_FROM_JAR,
new String[]{component.getName(), xmlDecl.getResource().getFullPath().toString()}));
}
}