Author: akazakov
Date: 2009-05-15 11:14:03 -0400 (Fri, 15 May 2009)
New Revision: 15297
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/messages.properties
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4321 fixed
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 2009-05-15
15:07:03 UTC (rev 15296)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2009-05-15
15:14:03 UTC (rev 15297)
@@ -312,7 +312,7 @@
boolean unknownVariable = true;
boolean firstDuplicateVariableWasMarked = false;
for (ISeamContextVariable variable : variables) {
- if(variable instanceof ISeamFactory || variable instanceof ISeamComponent || variable
instanceof IRole) {
+ if(variable instanceof ISeamFactory) {
if(variable!=factory && !markedDuplicateFactoryNames.contains(factoryName)
&&
(factoryScope == variable.getScope() ||
factoryScope.getPriority()>variable.getScope().getPriority())) {
// Duplicate factory name. Mark it.
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties 2009-05-15
15:07:03 UTC (rev 15296)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties 2009-05-15
15:14:03 UTC (rev 15297)
@@ -31,13 +31,13 @@
#Factories
UNKNOWN_FACTORY_NAME=Factory method "{0}" with a void return type must have an
associated @Out/Databinder
+DUPLICATE_VARIABLE_NAME=Duplicate factory name: "{0}"
#Bijections
MULTIPLE_DATA_BINDER=@DataModelSelection and @DataModelSelectionIndex without name of the
DataModel requires the only one @DataModel in the component
UNKNOWN_DATA_MODEL=Unknown @DataModel/@Out name: "{0}"
#Context variables
-DUPLICATE_VARIABLE_NAME=Duplicate variable name: "{0}"
UNKNOWN_VARIABLE_NAME=Unknown context variable name: "{0}"
#Seam Expression language
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java 2009-05-15
15:07:03 UTC (rev 15296)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.java 2009-05-15
15:14:03 UTC (rev 15297)
@@ -124,6 +124,7 @@
//Section Factories
public static String SeamValidatorConfigurationBlock_section_factory;
+ public static String SeamValidatorConfigurationBlock_pb_duplicateVariableName_label;
public static String SeamValidatorConfigurationBlock_pb_unknownFactoryName_label;
//Section Bijections
@@ -133,7 +134,6 @@
//Section Context variables
public static String SeamValidatorConfigurationBlock_section_variable;
- public static String SeamValidatorConfigurationBlock_pb_duplicateVariableName_label;
public static String SeamValidatorConfigurationBlock_pb_unknownVariableName_label;
//Seam Expression language
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties 2009-05-15
15:07:03 UTC (rev 15296)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencesMessages.properties 2009-05-15
15:14:03 UTC (rev 15297)
@@ -43,6 +43,7 @@
##Section Factories
SeamValidatorConfigurationBlock_section_factory=Factories
SeamValidatorConfigurationBlock_pb_unknownFactoryName_label=Unknown factory name:
+SeamValidatorConfigurationBlock_pb_duplicateVariableName_label=Duplicate factory name:
##Section Bijections
SeamValidatorConfigurationBlock_section_bijection=Bijections
@@ -51,7 +52,6 @@
##Section Context variables
SeamValidatorConfigurationBlock_section_variable=Context variables
-SeamValidatorConfigurationBlock_pb_duplicateVariableName_label=Duplicate variable name:
SeamValidatorConfigurationBlock_pb_unknownVariableName_label=Unknown variable name:
##Seam Expression language
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java 2009-05-15
15:07:03 UTC (rev 15296)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java 2009-05-15
15:14:03 UTC (rev 15297)
@@ -103,6 +103,7 @@
private static SectionDescription SECTION_FACTORY = new SectionDescription(
SeamPreferencesMessages.SeamValidatorConfigurationBlock_section_factory,
new String[][]{
+ {SeamPreferences.DUPLICATE_VARIABLE_NAME,
SeamPreferencesMessages.SeamValidatorConfigurationBlock_pb_duplicateVariableName_label},
{SeamPreferences.UNKNOWN_FACTORY_NAME,
SeamPreferencesMessages.SeamValidatorConfigurationBlock_pb_unknownFactoryName_label},
}
);
@@ -118,7 +119,6 @@
private static SectionDescription SECTION_VARIABLE = new SectionDescription(
SeamPreferencesMessages.SeamValidatorConfigurationBlock_section_variable,
new String[][]{
- {SeamPreferences.DUPLICATE_VARIABLE_NAME,
SeamPreferencesMessages.SeamValidatorConfigurationBlock_pb_duplicateVariableName_label},
{SeamPreferences.UNKNOWN_VARIABLE_NAME,
SeamPreferencesMessages.SeamValidatorConfigurationBlock_pb_unknownVariableName_label},
}
);
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.xml
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.xml 2009-05-15
15:07:03 UTC (rev 15296)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.xml 2009-05-15
15:14:03 UTC (rev 15297)
@@ -59,5 +59,6 @@
<security:identity authenticate-method="#{test.operate}"
security-rules="#{securityRules}"
remember-me="true"/>
-
+
+ <factory name="authenticator"/>
</components>
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-05-15
15:07:03 UTC (rev 15296)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-05-15
15:14:03 UTC (rev 15297)
@@ -636,15 +636,15 @@
String[] messages = getMarkersMessage(contextVariableTestFile);
- assertEquals("Not all problem markers 'Duplicate variable name' was
found", 4, messages.length);
+ assertEquals("Not all problem markers 'Duplicate variable name' was
found", 2, messages.length);
for(int i=0;i<4;i++)
assertEquals("Problem marker 'Duplicate variable name' not found",
"Duplicate variable name: \"messageList\"", messages[i]);
int[] lineNumbers = getMarkersNumbersOfLine(contextVariableTestFile);
- for(int i=0;i<4;i++)
- assertTrue("Problem marker has wrong line number", (lineNumbers[i] ==
16)||(lineNumbers[i] == 17)||(lineNumbers[i] == 36)||(lineNumbers[i] == 41));
+ for(int i=0;i<2;i++)
+ assertTrue("Problem marker has wrong line number", (lineNumbers[i] ==
36)||(lineNumbers[i] == 41));
// Unknown variable name
System.out.println("Test - Unknown variable name");