Author: scabanovich
Date: 2011-11-28 19:25:23 -0500 (Mon, 28 Nov 2011)
New Revision: 36714
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFSeverityPreferencesMessages.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFSeverityPreferencesMessages.properties
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidationConfigurationBlock.java
Log:
JBIDE-10190
https://issues.jboss.org/browse/JBIDE-10190
Partially migrated validation for faces-config.xml.
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFSeverityPreferencesMessages.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFSeverityPreferencesMessages.java 2011-11-28
21:28:12 UTC (rev 36713)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFSeverityPreferencesMessages.java 2011-11-29
00:25:23 UTC (rev 36714)
@@ -30,6 +30,54 @@
public static String JSFValidationConfigurationBlock_pb_unknownComponent_label;
public static String JSFValidationConfigurationBlock_pb_unknownAttribute_label;
+ //Faces Config
+ public static String JSFValidationConfigurationBlock_section_faces_config;
+ ////Context Param
+ public static String JSFValidationConfigurationBlock_section_context_param;
+ public static String JSFValidationConfigurationBlock_pb_invalidConfigFiles_label;
+ ////Application
+ public static String JSFValidationConfigurationBlock_section_application;
+ public static String JSFValidationConfigurationBlock_pb_invalidActionListener_label;
+ public static String JSFValidationConfigurationBlock_pb_invalidNavigationHandler_label;
+ public static String JSFValidationConfigurationBlock_pb_invalidPropertyResolver_label;
+ public static String JSFValidationConfigurationBlock_pb_invalidStateManager_label;
+ public static String JSFValidationConfigurationBlock_pb_invalidVariableResolver_label;
+ ////Component
+ public static String JSFValidationConfigurationBlock_section_component;
+ public static String JSFValidationConfigurationBlock_pb_invalidComponentClass_label;
+ ////Converter
+ public static String JSFValidationConfigurationBlock_section_converter;
+ public static String JSFValidationConfigurationBlock_pb_invalidConverterClass_label;
+ public static String JSFValidationConfigurationBlock_pb_invalidConverterForClass_label;
+ ////Factory
+ public static String JSFValidationConfigurationBlock_section_factory;
+ public static String
JSFValidationConfigurationBlock_pb_invalidApplicationFactory_label;
+ public static String
JSFValidationConfigurationBlock_pb_invalidFacesContextFactory_label;
+ public static String JSFValidationConfigurationBlock_pb_invalidLifecycleFactory_label;
+ public static String JSFValidationConfigurationBlock_pb_invalidRenderKitFactory_label;
+ ////List & Map Entries
+ public static String JSFValidationConfigurationBlock_section_entries;
+ public static String JSFValidationConfigurationBlock_pb_invalidKeyClass_label;
+ public static String JSFValidationConfigurationBlock_pb_invalidValueClass_label;
+ ////Managed & Referenced Bean
+ public static String JSFValidationConfigurationBlock_section_bean;
+ public static String JSFValidationConfigurationBlock_pb_invalidBeanClass_label;
+ public static String JSFValidationConfigurationBlock_pb_invalidPropertyClass_label;
+ ////Navigation Rules
+ public static String JSFValidationConfigurationBlock_section_navigation;
+ public static String JSFValidationConfigurationBlock_pb_invalidFromViewId_label;
+ public static String JSFValidationConfigurationBlock_pb_invalidToViewId_label;
+ ////Phase Listener
+ public static String JSFValidationConfigurationBlock_section_phase_listener;
+ public static String JSFValidationConfigurationBlock_pb_invalidPhaseListener_label;
+ ////Renderers
+ public static String JSFValidationConfigurationBlock_section_renderers;
+ public static String JSFValidationConfigurationBlock_pb_invalidRenderKitClass_label;
+ public static String JSFValidationConfigurationBlock_pb_invalidRendererClass_label;
+ ////Validation
+ public static String JSFValidationConfigurationBlock_section_validator;
+ public static String JSFValidationConfigurationBlock_pb_invalidValidatorClass_label;
+
static {
NLS.initializeMessages(BUNDLE_NAME, JSFSeverityPreferencesMessages.class);
}
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFSeverityPreferencesMessages.properties
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFSeverityPreferencesMessages.properties 2011-11-28
21:28:12 UTC (rev 36713)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFSeverityPreferencesMessages.properties 2011-11-29
00:25:23 UTC (rev 36714)
@@ -18,4 +18,52 @@
JSFValidationConfigurationBlock_pb_unknownAttribute_label=Unknown composite component
attribute:
JSF_VALIDATION_CONFIGURATION_BLOCK_JSF_VALIDATION_CONFIGURATION_BLOCK=JSFValidationConfigurationBlock
-JSF_VALIDATION_PREFERENCE_PAGE_JSF_VALIDATOR=JSF Validation
\ No newline at end of file
+JSF_VALIDATION_PREFERENCE_PAGE_JSF_VALIDATOR=JSF Validation
+
+##Faces Config
+JSFValidationConfigurationBlock_section_faces_config=Faces Config
+####Application
+JSFValidationConfigurationBlock_section_context_param=Context Param in web.xml
+JSFValidationConfigurationBlock_pb_invalidConfigFiles_label=Invalid config files in
web.xml:
+
+JSFValidationConfigurationBlock_section_application=Application
+JSFValidationConfigurationBlock_pb_invalidActionListener_label=Invalid action listener:
+JSFValidationConfigurationBlock_pb_invalidNavigationHandler_label=Invalid navigation
handler:
+JSFValidationConfigurationBlock_pb_invalidPropertyResolver_label=Invalid property
resolver:
+JSFValidationConfigurationBlock_pb_invalidStateManager_label=Invalid state manager:
+JSFValidationConfigurationBlock_pb_invalidVariableResolver_label=Invalid variable
resolver:
+###Component
+JSFValidationConfigurationBlock_section_component=Component
+JSFValidationConfigurationBlock_pb_invalidComponentClass_label=Invalid component class:
+####Converter
+JSFValidationConfigurationBlock_section_converter=Converter
+JSFValidationConfigurationBlock_pb_invalidConverterClass_label=Invalid conferter class:
+JSFValidationConfigurationBlock_pb_invalidConverterForClass_label=Invalid converter for
class:
+####Factory
+JSFValidationConfigurationBlock_section_factory=Factory
+JSFValidationConfigurationBlock_pb_invalidApplicationFactory_label=Invalid application
factory:
+JSFValidationConfigurationBlock_pb_invalidFacesContextFactory_label=Invalid faces context
factory:
+JSFValidationConfigurationBlock_pb_invalidLifecycleFactory_label=Invalid lifecycle
factory:
+JSFValidationConfigurationBlock_pb_invalidRenderKitFactory_label=Invalid render kit
factory:
+####List & Map
+JSFValidationConfigurationBlock_section_entries=List and Map entries
+JSFValidationConfigurationBlock_pb_invalidKeyClass_label=Invalid key class:
+JSFValidationConfigurationBlock_pb_invalidValueClass_label=Invalid value class:
+####Managed Bean
+JSFValidationConfigurationBlock_section_bean=Managed Bean
+JSFValidationConfigurationBlock_pb_invalidBeanClass_label=Invalid bean class:
+JSFValidationConfigurationBlock_pb_invalidPropertyClass_label=Invalid property class:
+####Navigation Rules
+JSFValidationConfigurationBlock_section_navigation=Navigation Rules
+JSFValidationConfigurationBlock_pb_invalidFromViewId_label=Invalid from-view-id:
+JSFValidationConfigurationBlock_pb_invalidToViewId_label= Invalid to-view-id:
+####Phase Listener
+JSFValidationConfigurationBlock_section_phase_listener=Phase Listener
+JSFValidationConfigurationBlock_pb_invalidPhaseListener_label=Invalid phase listener:
+####Renderers
+JSFValidationConfigurationBlock_section_renderers=Renderers
+JSFValidationConfigurationBlock_pb_invalidRenderKitClass_label=Invalid render kit class:
+JSFValidationConfigurationBlock_pb_invalidRendererClass_label=Invalid renderer class:
+####Validator
+JSFValidationConfigurationBlock_section_validator=Validator
+JSFValidationConfigurationBlock_pb_invalidValidatorClass_label=Invalid validator class:
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidationConfigurationBlock.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidationConfigurationBlock.java 2011-11-28
21:28:12 UTC (rev 36713)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidationConfigurationBlock.java 2011-11-29
00:25:23 UTC (rev 36714)
@@ -30,27 +30,142 @@
private static final String SETTINGS_SECTION_NAME =
JSFSeverityPreferencesMessages.JSF_VALIDATION_CONFIGURATION_BLOCK_JSF_VALIDATION_CONFIGURATION_BLOCK;
private static SectionDescription SECTION_COMPOSITE_COMPONENTS = new
SectionDescription(
- JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_section_composite_components,
- new String[][]{
- {JSFSeverityPreferences.UNKNOWN_COMPOSITE_COMPONENT_NAME,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_unknownComponent_label},
- {JSFSeverityPreferences.UNKNOWN_COMPOSITE_COMPONENT_ATTRIBUTE,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_unknownAttribute_label},
- },
- JSFModelPlugin.PLUGIN_ID
- );
+ JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_section_composite_components,
+ new String[][]{
+ {JSFSeverityPreferences.UNKNOWN_COMPOSITE_COMPONENT_NAME,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_unknownComponent_label},
+ {JSFSeverityPreferences.UNKNOWN_COMPOSITE_COMPONENT_ATTRIBUTE,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_unknownAttribute_label},
+ },
+ JSFModelPlugin.PLUGIN_ID
+ );
- private static SectionDescription[] ALL_SECTIONS = new SectionDescription[] {
- SECTION_COMPOSITE_COMPONENTS
- };
+ //Faces Config
+
+ private static SectionDescription SECTION_APPLICATION = new SectionDescription(
+ JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_section_application,
+ new String[][]{
+ {JSFSeverityPreferences.INVALID_ACTION_LISTENER,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidActionListener_label},
+ {JSFSeverityPreferences.INVALID_NAVIGATION_HANDLER,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidNavigationHandler_label},
+ {JSFSeverityPreferences.INVALID_PROPERTY_RESOLVER,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidPropertyResolver_label},
+ {JSFSeverityPreferences.INVALID_STATE_MANAGER,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidStateManager_label},
+ {JSFSeverityPreferences.INVALID_VARIABLE_RESOLVER,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidVariableResolver_label},
+ {JSFSeverityPreferences.INVALID_VIEW_HANDLER,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidActionListener_label},
+ },
+ JSFModelPlugin.PLUGIN_ID
+ );
+ private static SectionDescription SECTION_COMPONENT = new SectionDescription(
+ JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_section_component,
+ new String[][]{
+ {JSFSeverityPreferences.INVALID_COMPONENT_CLASS,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidComponentClass_label},
+ },
+ JSFModelPlugin.PLUGIN_ID
+ );
+ private static SectionDescription SECTION_CONVERTER = new SectionDescription(
+ JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_section_converter,
+ new String[][]{
+ {JSFSeverityPreferences.INVALID_CONVERTER_CLASS,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidConverterClass_label},
+ {JSFSeverityPreferences.INVALID_CONVERTER_FOR_CLASS,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidConverterForClass_label},
+ },
+ JSFModelPlugin.PLUGIN_ID
+ );
+ private static SectionDescription SECTION_FACTORY = new SectionDescription(
+ JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_section_factory,
+ new String[][]{
+ {JSFSeverityPreferences.INVALID_APPLICATION_FACTORY,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidApplicationFactory_label},
+ {JSFSeverityPreferences.INVALID_FACES_CONTEXT_FACTORY,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidFacesContextFactory_label},
+ {JSFSeverityPreferences.INVALID_LIFECYCLE_FACTORY,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidLifecycleFactory_label},
+ {JSFSeverityPreferences.INVALID_RENDER_KIT_FACTORY,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidRenderKitFactory_label},
+ },
+ JSFModelPlugin.PLUGIN_ID
+ );
+ private static SectionDescription SECTION_ENTRIES = new SectionDescription(
+ JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_section_entries,
+ new String[][]{
+ {JSFSeverityPreferences.INVALID_KEY_CLASS,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidKeyClass_label},
+ {JSFSeverityPreferences.INVALID_VALUE_CLASS,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidValueClass_label},
+ },
+ JSFModelPlugin.PLUGIN_ID
+ );
+ private static SectionDescription SECTION_BEANS = new SectionDescription(
+ JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_section_bean,
+ new String[][]{
+ {JSFSeverityPreferences.INVALID_BEAN_CLASS,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidBeanClass_label},
+ {JSFSeverityPreferences.INVALID_PROPERTY_CLASS,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidPropertyClass_label},
+ },
+ JSFModelPlugin.PLUGIN_ID
+ );
+ private static SectionDescription SECTION_PHASE_LISTENER = new SectionDescription(
+ JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_section_phase_listener,
+ new String[][]{
+ {JSFSeverityPreferences.INVALID_PHASE_LISTENER,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidPhaseListener_label},
+ },
+ JSFModelPlugin.PLUGIN_ID
+ );
+ private static SectionDescription SECTION_RENDERERS = new SectionDescription(
+ JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_section_renderers,
+ new String[][]{
+ {JSFSeverityPreferences.INVALID_RENDER_KIT_CLASS,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidRenderKitClass_label},
+ {JSFSeverityPreferences.INVALID_RENDERER_CLASS,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidRendererClass_label},
+ },
+ JSFModelPlugin.PLUGIN_ID
+ );
+ private static SectionDescription SECTION_VALIDATOR = new SectionDescription(
+ JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_section_validator,
+ new String[][]{
+ {JSFSeverityPreferences.INVALID_VALIDATOR_CLASS,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidValidatorClass_label},
+ },
+ JSFModelPlugin.PLUGIN_ID
+ );
- private static Key[] getKeys() {
- ArrayList<Key> keys = new ArrayList<Key>();
- for (SectionDescription s: ALL_SECTIONS) {
- s.collectKeys(keys);
- }
- keys.add(MAX_NUMBER_OF_PROBLEMS_KEY);
- keys.add(WRONG_BUILDER_ORDER_KEY);
- return keys.toArray(new Key[0]);
+ private static SectionDescription SECTION_NAVIGATION = new SectionDescription(
+ JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_section_navigation,
+ new String[][]{
+ {JSFSeverityPreferences.INVALID_FROM_VIEW_ID,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidFromViewId_label},
+ {JSFSeverityPreferences.INVALID_TO_VIEW_ID,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidToViewId_label},
+ },
+ JSFModelPlugin.PLUGIN_ID
+ );
+ private static SectionDescription SECTION_WEB_XML = new SectionDescription(
+ JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_section_context_param,
+ new String[][]{
+ {JSFSeverityPreferences.INVALID_CONFIG_FILES,
JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_pb_invalidConfigFiles_label},
+ },
+ JSFModelPlugin.PLUGIN_ID
+ );
+
+
+ private static SectionDescription SECTION_FACES_CONFIG = new SectionDescription(
+ JSFSeverityPreferencesMessages.JSFValidationConfigurationBlock_section_faces_config,
+ new SectionDescription[]{
+ SECTION_WEB_XML,
+ SECTION_APPLICATION,
+ SECTION_COMPONENT,
+ SECTION_CONVERTER,
+ SECTION_FACTORY,
+ SECTION_ENTRIES,
+ SECTION_BEANS,
+ SECTION_PHASE_LISTENER,
+ SECTION_RENDERERS,
+ SECTION_NAVIGATION,
+ SECTION_VALIDATOR,
+ },
+ new String[0][],
+ JSFModelPlugin.PLUGIN_ID
+ );
+
+ private static SectionDescription[] ALL_SECTIONS = new SectionDescription[] {
+ SECTION_COMPOSITE_COMPONENTS,
+ SECTION_FACES_CONFIG
+ };
+
+ private static Key[] getKeys() {
+ ArrayList<Key> keys = new ArrayList<Key>();
+ for (SectionDescription s: ALL_SECTIONS) {
+ s.collectKeys(keys);
}
+ keys.add(MAX_NUMBER_OF_PROBLEMS_KEY);
+ keys.add(WRONG_BUILDER_ORDER_KEY);
+ return keys.toArray(new Key[0]);
+ }
private static final Key MAX_NUMBER_OF_PROBLEMS_KEY = getKey(JSFModelPlugin.PLUGIN_ID,
SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);