Author: scabanovich
Date: 2008-10-27 11:53:14 -0400 (Mon, 27 Oct 2008)
New Revision: 11208
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties
Log:
JBIDE-2946
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java 2008-10-27
15:17:48 UTC (rev 11207)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java 2008-10-27
15:53:14 UTC (rev 11208)
@@ -121,6 +121,8 @@
// If Expression use property of component and this property has only setter(getter)
without getter(setter) then mark it.
public static final String UNPAIRED_GETTER_OR_SETTER =
createSeverityOption("unpairedGetterOrSetter"); //$NON-NLS-1$
+ public static final String EL_SYNTAX_ERROR =
createSeverityOption("elSyntaxError"); //$NON-NLS-1$
+
// Seam project settings
// Mark seam project if it has any invalid seam setting.
@@ -195,6 +197,7 @@
public static boolean shouldValidateEL(ISeamProject project) {
return !(SeamPreferences.IGNORE.equals(getProjectPreference(project,
UNKNOWN_EL_VARIABLE_NAME)) &&
SeamPreferences.IGNORE.equals(getProjectPreference(project,
UNKNOWN_EL_VARIABLE_PROPERTY_NAME)) &&
+ SeamPreferences.IGNORE.equals(getProjectPreference(project, EL_SYNTAX_ERROR))
&&
SeamPreferences.IGNORE.equals(getProjectPreference(project,
UNPAIRED_GETTER_OR_SETTER)));
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java 2008-10-27
15:17:48 UTC (rev 11207)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java 2008-10-27
15:53:14 UTC (rev 11208)
@@ -35,6 +35,7 @@
defaultPreferences.put(SeamPreferences.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
SeamPreferences.WARNING);
defaultPreferences.put(SeamPreferences.UNKNOWN_VARIABLE_NAME,
SeamPreferences.WARNING);
defaultPreferences.put(SeamPreferences.UNPAIRED_GETTER_OR_SETTER,
SeamPreferences.IGNORE);
+ defaultPreferences.put(SeamPreferences.EL_SYNTAX_ERROR, SeamPreferences.WARNING);
defaultPreferences.put(SeamPreferences.CHECK_VARS, SeamPreferences.ENABLE);
//JBIDE-2958 temporary until JBIDE-2957 solved //TODO solve JBIDE-2957
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2008-10-27
15:17:48 UTC (rev 11207)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2008-10-27
15:53:14 UTC (rev 11208)
@@ -73,7 +73,7 @@
protected static final String UNKNOWN_EL_VARIABLE_NAME_MESSAGE_ID =
"UNKNOWN_EL_VARIABLE_NAME"; //$NON-NLS-1$
protected static final String UNKNOWN_EL_VARIABLE_PROPERTY_NAME_MESSAGE_ID =
"UNKNOWN_EL_VARIABLE_PROPERTY_NAME"; //$NON-NLS-1$
protected static final String UNPAIRED_GETTER_OR_SETTER_MESSAGE_ID =
"UNPAIRED_GETTER_OR_SETTER"; //$NON-NLS-1$
- protected static final String SYNTAX_ERROR_MESSAGE_ID = "SYNTAX_ERROR";
//$NON-NLS-1$
+ protected static final String SYNTAX_ERROR_MESSAGE_ID = "EL_SYNTAX_ERROR";
//$NON-NLS-1$
protected static final String VALIDATING_EL_FILE_MESSAGE_ID =
"VALIDATING_EL_FILE";
@@ -264,7 +264,7 @@
for (SyntaxError error: errors) {
//TODO 1) make message more informative
// 2) create other preference
- addError(SYNTAX_ERROR_MESSAGE_ID, SeamPreferences.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
new String[]{"" + error.getProblem()}, 1, offset + error.getPosition(), file);
+ addError(SYNTAX_ERROR_MESSAGE_ID, SeamPreferences.EL_SYNTAX_ERROR, new
String[]{"" + error.getProblem()}, 1, offset + error.getPosition(), file);
}
}
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 2008-10-27
15:17:48 UTC (rev 11207)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties 2008-10-27
15:53:14 UTC (rev 11208)
@@ -44,7 +44,7 @@
UNKNOWN_EL_VARIABLE_NAME="{0}" cannot be resolved
UNKNOWN_EL_VARIABLE_PROPERTY_NAME="{0}" cannot be resolved
UNPAIRED_GETTER_OR_SETTER=Property "{0}" has only {1}. {2} is missing.
-SYNTAX_ERROR=EL syntax error: {0}.
+EL_SYNTAX_ERROR=EL syntax error: {0}.
#Invalid seam project settings
INVALID_PARENT_PROJECT=Main Seam project "{0}" specified for Seam project
"{1}" does not exist.
Show replies by date