Author: dazarov
Date: 2009-04-24 07:51:30 -0400 (Fri, 24 Apr 2009)
New Revision: 14885
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1077
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java 2009-04-24
09:47:53 UTC (rev 14884)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java 2009-04-24
11:51:30 UTC (rev 14885)
@@ -255,13 +255,17 @@
return createErrormessage(new Status(IStatus.ERROR, SeamCorePlugin.PLUGIN_ID,
SeamUIMessages.bind(SeamUIMessages.VALIDATOR_FACTORY_COMPONENT_ALREADY_EXISTS, name)));
}
- IStatus status = JavaConventions.validateClassFileName(name
- + ".class", "5.0", "5.0"); //$NON-NLS-1$ //$NON-NLS-2$
//$NON-NLS-3$
- if (status.isOK()) {
- return NO_ERRORS;
- } else {
- return createErrormessage(new Status(IStatus.ERROR, SeamCorePlugin.PLUGIN_ID,
SeamUIMessages.VALIDATOR_FACTORY_NAME_IS_NOT_VALID));
+ String[] segs = name.split("\\.");
+ for(String segm : segs){
+ if(!segm.trim().equals(segm))
+ return createErrormessage(new Status(IStatus.ERROR, SeamCorePlugin.PLUGIN_ID,
SeamUIMessages.VALIDATOR_FACTORY_NAME_IS_NOT_VALID));
+
+ IStatus status = JavaConventions.validateClassFileName(segm
+ + ".class", "5.0", "5.0"); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$
+ if (!status.isOK())
+ return createErrormessage(new Status(IStatus.ERROR, SeamCorePlugin.PLUGIN_ID,
SeamUIMessages.VALIDATOR_FACTORY_NAME_IS_NOT_VALID));
}
+ return NO_ERRORS;
}
};