Author: dazarov
Date: 2009-12-08 09:22:03 -0500 (Tue, 08 Dec 2009)
New Revision: 19104
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties
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-5401
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java 2009-12-08
13:58:17 UTC (rev 19103)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java 2009-12-08
14:22:03 UTC (rev 19104)
@@ -60,6 +60,7 @@
public static String SEAM_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE;
public static String SEAM_RENAME_PROCESSOR_LOCATION_NOT_FOUND;
public static String SEAM_RENAME_PROCESSOR_DECLARATION_NOT_FOUND;
+ public static String SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION;
public static String SEAM_RENAME_METHOD_PARTICIPANT_SETTER_WARNING;
public static String SEAM_RENAME_METHOD_PARTICIPANT_GETTER_WARNING;
}
\ No newline at end of file
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties 2009-12-08
13:58:17 UTC (rev 19103)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties 2009-12-08
14:22:03 UTC (rev 19104)
@@ -39,5 +39,6 @@
SEAM_RENAME_PROCESSOR_DECLARATION_NOT_FOUND=Component: ''{0}'' does not
have any declarations
SEAM_RENAME_PROCESSOR_ERROR_PHANTOM_FILE=Cannot change phantom file:
''{0}''.
SEAM_RENAME_PROCESSOR_ERROR_READ_ONLY_FILE=Cannot change read-only file:
''{0}''.
+SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION=Declaration of component
''{0}'' is broken.
SEAM_RENAME_METHOD_PARTICIPANT_SETTER_WARNING=Be sure, may be you also should rename
getter method to avoid compilation problems.
SEAM_RENAME_METHOD_PARTICIPANT_GETTER_WARNING=Be sure, may be you also should rename
setter method to avoid compilation problems.
\ No newline at end of file
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-12-08
13:58:17 UTC (rev 19103)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRenameProcessor.java 2009-12-08
14:22:03 UTC (rev 19104)
@@ -306,6 +306,8 @@
if(component.getJavaDeclaration() != null){
if(SeamUtil.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()}));
+ else if(component.getJavaDeclaration().getResource() == null)
+ status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION,
new String[]{component.getName()}));
}
Set<ISeamXmlComponentDeclaration> xmlDecls = component.getXmlDeclarations();
@@ -313,6 +315,8 @@
for(ISeamXmlComponentDeclaration xmlDecl : xmlDecls){
if(SeamUtil.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()}));
+ else if(xmlDecl.getResource() == null)
+ status.addFatalError(Messages.format(SeamCoreMessages.SEAM_RENAME_PROCESSOR_COMPONENT_HAS_BROKEN_DECLARATION,
new String[]{component.getName()}));
}
}