JBoss Tools SVN: r36561 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-11-23 02:10:31 -0500 (Wed, 23 Nov 2011)
New Revision: 36561
Modified:
trunk/build/target-platform/jbds.target
trunk/build/target-platform/multiple.target
trunk/build/target-platform/unified.target
Log:
update TPs to include latest eclipse bpel
Modified: trunk/build/target-platform/jbds.target
===================================================================
--- trunk/build/target-platform/jbds.target 2011-11-23 07:10:23 UTC (rev 36560)
+++ trunk/build/target-platform/jbds.target 2011-11-23 07:10:31 UTC (rev 36561)
@@ -54,7 +54,7 @@
<!-- Eclipse BPEL -->
<unit id="org.eclipse.bpel.jboss.riftsaw.runtime.feature.feature.group" version="0.8.0.v20111120-0746-H98-CI"/>
- <unit id="org.eclipse.bpel.apache.ode.runtime.feature.feature.group" version="0.5.0.v20110915-1141-H87-CI"/>
+ <unit id="org.eclipse.bpel.apache.ode.runtime.feature.feature.group" version="0.8.0.v20111120-0746-H98-CI"/>
<unit id="org.eclipse.bpel.feature.feature.group" version="0.8.0.v20111120-0746-H98-CI"/>
<!-- EMF, XSD -->
@@ -269,4 +269,4 @@
<unit id="javax.el" version="2.2.0.v201105051105"/>
</location>
</locations>
-</target>
\ No newline at end of file
+</target>
Modified: trunk/build/target-platform/multiple.target
===================================================================
--- trunk/build/target-platform/multiple.target 2011-11-23 07:10:23 UTC (rev 36560)
+++ trunk/build/target-platform/multiple.target 2011-11-23 07:10:31 UTC (rev 36561)
@@ -55,9 +55,9 @@
<unit id="org.apache.lucene.spellchecker" version="2.9.1.v20100421-0704"/>
<!-- Eclipse BPEL -->
- <unit id="org.eclipse.bpel.jboss.riftsaw.runtime.feature.feature.group" version="0.5.0.v20110915-1141-H87-CI"/>
- <unit id="org.eclipse.bpel.apache.ode.runtime.feature.feature.group" version="0.5.0.v20110915-1141-H87-CI"/>
- <unit id="org.eclipse.bpel.feature.feature.group" version="0.8.0.v20111101-1551-H90-CI"/>
+ <unit id="org.eclipse.bpel.jboss.riftsaw.runtime.feature.feature.group" version="0.8.0.v20111120-0746-H98-CI"/>
+ <unit id="org.eclipse.bpel.apache.ode.runtime.feature.feature.group" version="0.8.0.v20111120-0746-H98-CI"/>
+ <unit id="org.eclipse.bpel.feature.feature.group" version="0.8.0.v20111120-0746-H98-CI"/>
<!-- EMF, XSD -->
<unit id="org.eclipse.emf.workspace.feature.group" version="1.5.0.v20110502-1600-36-8s734C367E3CBC7"/>
Modified: trunk/build/target-platform/unified.target
===================================================================
--- trunk/build/target-platform/unified.target 2011-11-23 07:10:23 UTC (rev 36560)
+++ trunk/build/target-platform/unified.target 2011-11-23 07:10:31 UTC (rev 36561)
@@ -55,9 +55,9 @@
<unit id="org.apache.lucene.spellchecker" version="2.9.1.v20100421-0704"/>
<!-- Eclipse BPEL -->
- <unit id="org.eclipse.bpel.jboss.riftsaw.runtime.feature.feature.group" version="0.5.0.v20110915-1141-H87-CI"/>
- <unit id="org.eclipse.bpel.apache.ode.runtime.feature.feature.group" version="0.5.0.v20110915-1141-H87-CI"/>
- <unit id="org.eclipse.bpel.feature.feature.group" version="0.8.0.v20111101-1551-H90-CI"/>
+ <unit id="org.eclipse.bpel.jboss.riftsaw.runtime.feature.feature.group" version="0.8.0.v20111120-0746-H98-CI"/>
+ <unit id="org.eclipse.bpel.apache.ode.runtime.feature.feature.group" version="0.8.0.v20111120-0746-H98-CI"/>
+ <unit id="org.eclipse.bpel.feature.feature.group" version="0.8.0.v20111120-0746-H98-CI"/>
<!-- EMF, XSD -->
<unit id="org.eclipse.emf.workspace.feature.group" version="1.5.0.v20110502-1600-36-8s734C367E3CBC7"/>
14 years, 4 months
JBoss Tools SVN: r36560 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-11-23 02:10:23 -0500 (Wed, 23 Nov 2011)
New Revision: 36560
Modified:
trunk/build/target-platform/jbds.target
Log:
update jbds tp to include latest eclipse bpel
Modified: trunk/build/target-platform/jbds.target
===================================================================
--- trunk/build/target-platform/jbds.target 2011-11-23 06:56:05 UTC (rev 36559)
+++ trunk/build/target-platform/jbds.target 2011-11-23 07:10:23 UTC (rev 36560)
@@ -53,9 +53,9 @@
<unit id="org.apache.lucene.spellchecker" version="2.9.1.v20100421-0704"/>
<!-- Eclipse BPEL -->
- <unit id="org.eclipse.bpel.jboss.riftsaw.runtime.feature.feature.group" version="0.5.0.v20110915-1141-H87-CI"/>
+ <unit id="org.eclipse.bpel.jboss.riftsaw.runtime.feature.feature.group" version="0.8.0.v20111120-0746-H98-CI"/>
<unit id="org.eclipse.bpel.apache.ode.runtime.feature.feature.group" version="0.5.0.v20110915-1141-H87-CI"/>
- <unit id="org.eclipse.bpel.feature.feature.group" version="0.5.0.v20110915-1141-H87-CI"/>
+ <unit id="org.eclipse.bpel.feature.feature.group" version="0.8.0.v20111120-0746-H98-CI"/>
<!-- EMF, XSD -->
<unit id="org.eclipse.emf.feature.group" version="2.7.1.v20111003-1135"/>
14 years, 4 months
JBoss Tools SVN: r36558 - trunk/download.jboss.org/jbosstools/updates/requirements/bpel.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-11-23 01:50:21 -0500 (Wed, 23 Nov 2011)
New Revision: 36558
Modified:
trunk/download.jboss.org/jbosstools/updates/requirements/bpel/build.xml
Log:
update from H94 to H98 build
Modified: trunk/download.jboss.org/jbosstools/updates/requirements/bpel/build.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/bpel/build.xml 2011-11-23 06:50:12 UTC (rev 36557)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/bpel/build.xml 2011-11-23 06:50:21 UTC (rev 36558)
@@ -29,7 +29,7 @@
<property name="compress" value="true" />
<p2.mirror>
- <repository location="file:${destination}/0.8.0.v20111109-1901-H94-CI/" name="Eclipse BPEL for Eclipse 3.7 (Not in Indigo)" />
+ <repository location="file:${destination}/0.8.0.v20111120-0746-H98-CI/" name="Eclipse BPEL for Eclipse 3.7 (Not in Indigo)" />
<source>
<repository location="${URL1}" />
<repository location="${URL2}" />
@@ -39,9 +39,9 @@
</p2.mirror>
<delete>
- <fileset dir="${destination}/0.8.0.v20111109-1901-H94-CI/" includes="**/artifacts.jar, **/contents.jar"/>
+ <fileset dir="${destination}/0.8.0.v20111120-0746-H98-CI/" includes="**/artifacts.jar, **/contents.jar"/>
</delete>
- <p2.publish.featuresAndBundles metadataRepository="file:${destination}/0.8.0.v20111109-1901-H94-CI/" artifactRepository="file:${destination}/0.8.0.v20111109-1901-H94-CI/" publishartifacts="true" source="${destination}/0.8.0.v20111109-1901-H94-CI/" compress="${compress}" />
+ <p2.publish.featuresAndBundles metadataRepository="file:${destination}/0.8.0.v20111120-0746-H98-CI/" artifactRepository="file:${destination}/0.8.0.v20111120-0746-H98-CI/" publishartifacts="true" source="${destination}/0.8.0.v20111120-0746-H98-CI/" compress="${compress}" />
</target>
</project>
14 years, 4 months
JBoss Tools SVN: r36557 - trunk/build/aggregate/soa-site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-11-23 01:50:12 -0500 (Wed, 23 Nov 2011)
New Revision: 36557
Modified:
trunk/build/aggregate/soa-site/associate.properties
Log:
remove link to old bpel 0.5 site
Modified: trunk/build/aggregate/soa-site/associate.properties
===================================================================
--- trunk/build/aggregate/soa-site/associate.properties 2011-11-23 06:50:05 UTC (rev 36556)
+++ trunk/build/aggregate/soa-site/associate.properties 2011-11-23 06:50:12 UTC (rev 36557)
@@ -4,4 +4,4 @@
#update.site.version=3.2.0.M2.2010-07-16_13-26-18-H21
# associate sites to add to the resulting repo
-associate.sites=http://download.jboss.org/jbosstools/updates/indigo/SR1/,http://download.jboss.org/jbosstools/updates/development/indigo/,http://download.eclipse.org/bpel/update-site/
+associate.sites=http://download.jboss.org/jbosstools/updates/indigo/SR1/,http://download.jboss.org/jbosstools/updates/development/indigo/
14 years, 4 months
JBoss Tools SVN: r36556 - trunk/bpel/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-11-23 01:50:05 -0500 (Wed, 23 Nov 2011)
New Revision: 36556
Modified:
trunk/bpel/site/pom.xml
Log:
use bpel 0.8.0 site instead of bpel 0.5.0 site
Modified: trunk/bpel/site/pom.xml
===================================================================
--- trunk/bpel/site/pom.xml 2011-11-23 00:57:25 UTC (rev 36555)
+++ trunk/bpel/site/pom.xml 2011-11-23 06:50:05 UTC (rev 36556)
@@ -14,7 +14,7 @@
<repositories>
<repository>
<id>eclipse-bpel-milestone</id>
- <url>http://download.eclipse.org/bpel/update-site/</url>
+ <url>http://download.eclipse.org/bpel/site/</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
14 years, 4 months
JBoss Tools SVN: r36555 - in branches/hibernatetools-multiversion2/plugins: org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5 and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-11-22 19:57:25 -0500 (Tue, 22 Nov 2011)
New Revision: 36555
Modified:
branches/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ext/ConsoleExtension.java
branches/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java
branches/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/console/ConsoleExtension3_5.java
branches/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java
branches/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/console/ConsoleExtension4_0.java
Log:
Move database reading to console extension
Modified: branches/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ext/ConsoleExtension.java
===================================================================
--- branches/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ext/ConsoleExtension.java 2011-11-23 00:56:44 UTC (rev 36554)
+++ branches/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ext/ConsoleExtension.java 2011-11-23 00:57:25 UTC (rev 36555)
@@ -14,7 +14,6 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
-import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.ext.HibernateExtension;
import org.hibernate.console.ext.api.ConsoleDatabaseCollector;
@@ -31,7 +30,6 @@
public void launchExporters(ILaunchConfiguration configuration, String mode,
ILaunch launch, IProgressMonitor monitor) throws CoreException;
- public ConsoleDatabaseCollector readDatabaseSchema(IProgressMonitor monitor,
- ConsoleConfiguration consoleConfiguration);
+ public ConsoleDatabaseCollector readDatabaseSchema(IProgressMonitor monitor);
}
Modified: branches/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java
===================================================================
--- branches/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java 2011-11-23 00:56:44 UTC (rev 36554)
+++ branches/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java 2011-11-23 00:57:25 UTC (rev 36555)
@@ -19,6 +19,7 @@
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
+import org.hibernate.cfg.Settings;
import org.hibernate.console.ConfigurationFactory;
import org.hibernate.console.ConsoleConfigClassLoader;
import org.hibernate.console.ConsoleMessages;
@@ -32,10 +33,7 @@
import org.hibernate.console.ext.QueryResultImpl;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
import org.hibernate.console.preferences.PreferencesClassPathUtils;
-import org.hibernate.eclipse.console.ext.CompletionProposalsResult;
import org.hibernate.eclipse.libs.FakeDelegatingDriver;
-import org.hibernate.tool.ide.completion.HQLCodeAssist;
-import org.hibernate.tool.ide.completion.IHQLCodeAssist;
/**
*
@@ -265,4 +263,12 @@
public Configuration getConfiguration() {
return configuration;
}
+
+ public Settings getSettings(final Configuration cfg) {
+ return (Settings) execute(new Command() {
+ public Object execute() {
+ return cfg.buildSettings();
+ }
+ });
+ }
}
Modified: branches/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/console/ConsoleExtension3_5.java
===================================================================
--- branches/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/console/ConsoleExtension3_5.java 2011-11-23 00:56:44 UTC (rev 36554)
+++ branches/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/console/ConsoleExtension3_5.java 2011-11-23 00:57:25 UTC (rev 36555)
@@ -307,17 +307,17 @@
}
@Override
- public ConsoleDatabaseCollector readDatabaseSchema(final IProgressMonitor monitor, final ConsoleConfiguration cc) {
- return new ConsoleDatabaseCollectorImpl(readDatabaseSchemaInternal(monitor, cc, new DefaultReverseEngineeringStrategy()));
+ public ConsoleDatabaseCollector readDatabaseSchema(final IProgressMonitor monitor) {
+ return new ConsoleDatabaseCollectorImpl(readDatabaseSchemaInternal(monitor, new DefaultReverseEngineeringStrategy()));
}
- protected DefaultDatabaseCollector readDatabaseSchemaInternal(final IProgressMonitor monitor, final ConsoleConfiguration consoleConfiguration, final ReverseEngineeringStrategy strategy) {
- final Configuration configuration = consoleConfiguration.buildWith(null, false);
- return (DefaultDatabaseCollector) consoleConfiguration.execute(new ExecutionContext.Command() {
+ protected DefaultDatabaseCollector readDatabaseSchemaInternal(final IProgressMonitor monitor, final ReverseEngineeringStrategy strategy) {
+ final Configuration configuration = hibernateExtension.buildWith(null, false);
+ return (DefaultDatabaseCollector) hibernateExtension.execute(new ExecutionContext.Command() {
public Object execute() {
DefaultDatabaseCollector db = null;
- Settings settings = consoleConfiguration.getSettings(configuration);
+ Settings settings = hibernateExtension.getSettings(configuration);
ConnectionProvider connectionProvider = null;
try {
connectionProvider = settings.getConnectionProvider();
Modified: branches/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java
===================================================================
--- branches/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java 2011-11-23 00:56:44 UTC (rev 36554)
+++ branches/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java 2011-11-23 00:57:25 UTC (rev 36555)
@@ -23,6 +23,7 @@
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
+import org.hibernate.cfg.Settings;
import org.hibernate.console.ConsoleConfigClassLoader;
import org.hibernate.console.ConsoleMessages;
import org.hibernate.console.QueryInputModel;
@@ -314,5 +315,13 @@
public Configuration getConfiguration() {
return configuration;
}
+
+ public Settings getSettings(final Configuration cfg, final ServiceRegistry serviceRegisrty) {
+ return (Settings) execute(new Command() {
+ public Object execute() {
+ return cfg.buildSettings(serviceRegisrty);
+ }
+ });
+ }
}
\ No newline at end of file
Modified: branches/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/console/ConsoleExtension4_0.java
===================================================================
--- branches/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/console/ConsoleExtension4_0.java 2011-11-23 00:56:44 UTC (rev 36554)
+++ branches/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/console/ConsoleExtension4_0.java 2011-11-23 00:57:25 UTC (rev 36555)
@@ -310,20 +310,20 @@
}
@Override
- public ConsoleDatabaseCollector readDatabaseSchema(final IProgressMonitor monitor, final ConsoleConfiguration cc) {
- return new ConsoleDatabaseCollectorImpl(readDatabaseSchemaInternal(monitor, cc, new DefaultReverseEngineeringStrategy()));
+ public ConsoleDatabaseCollector readDatabaseSchema(final IProgressMonitor monitor) {
+ return new ConsoleDatabaseCollectorImpl(readDatabaseSchemaInternal(monitor, new DefaultReverseEngineeringStrategy()));
}
- protected DefaultDatabaseCollector readDatabaseSchemaInternal(final IProgressMonitor monitor, final ConsoleConfiguration consoleConfiguration, final ReverseEngineeringStrategy strategy) {
- final Configuration configuration = consoleConfiguration.buildWith(null, false);
- return (DefaultDatabaseCollector) consoleConfiguration.execute(new ExecutionContext.Command() {
+ protected DefaultDatabaseCollector readDatabaseSchemaInternal(final IProgressMonitor monitor, final ReverseEngineeringStrategy strategy) {
+ final Configuration configuration = hibernateExtension.buildWith(null, false);
+ return (DefaultDatabaseCollector) hibernateExtension.execute(new ExecutionContext.Command() {
public Object execute() {
ServiceRegistry serviceRegistry = new ServiceRegistryBuilder()
.applySettings(configuration.getProperties())
.buildServiceRegistry();
DefaultDatabaseCollector db = null;
- Settings settings = consoleConfiguration.getSettings(configuration);
+ Settings settings = hibernateExtension.getSettings(configuration, serviceRegistry);
try {
JDBCReader reader = JDBCReaderFactory.newJDBCReader(configuration.getProperties(), settings, strategy, serviceRegistry);
db = new DefaultDatabaseCollector(reader.getMetaDataDialect());
14 years, 4 months
JBoss Tools SVN: r36554 - in trunk/jsf/plugins/org.jboss.tools.jsf: src/org/jboss/tools/jsf/web/validation and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-22 19:56:44 -0500 (Tue, 22 Nov 2011)
New Revision: 36554
Added:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/FacesConfigValidator.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/plugin.properties
trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/JSFSeverityPreferenceInitializer.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/JSFSeverityPreferences.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/plugin.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/plugin.properties 2011-11-23 00:52:58 UTC (rev 36553)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/plugin.properties 2011-11-23 00:56:44 UTC (rev 36554)
@@ -22,4 +22,7 @@
ComponentCompositeProblemName=JSF Composite Component Problem
ComponentCompositeValidator=JSF Composite Component Validator
+FacesConfigProblemName=JSF Faces Config Problem
+FacesConfigValidator=JSF Confin Validator
+
XHTMLSyntaxProblemName=XHTML Problem
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2011-11-23 00:52:58 UTC (rev 36553)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2011-11-23 00:56:44 UTC (rev 36554)
@@ -497,6 +497,13 @@
</persistent>
</extension>
+ <extension id="facesconfigproblem" name="%FacesConfigProblemName" point="org.eclipse.core.resources.markers">
+ <super type="org.jboss.tools.common.validation.JBTValidationProblem">
+ </super>
+ <persistent value="true">
+ </persistent>
+ </extension>
+
<extension id="xhtmlsyntaxproblem" name="%XHTMLSyntaxProblemName" point="org.eclipse.core.resources.markers">
<super type="org.eclipse.wst.xml.core.validationMarker">
</super>
@@ -514,6 +521,15 @@
</validator>
</extension>
+ <extension
+ point="org.jboss.tools.common.validation.validator">
+ <validator
+ class="org.jboss.tools.jsf.web.validation.FacesConfigValidator"
+ name="%FacesConfigValidator"
+ id="org.jboss.tools.jsf.web.validation.FacesConfigValidator">
+ </validator>
+ </extension>
+
<extension point="org.eclipse.core.runtime.preferences">
<initializer class="org.jboss.tools.jsf.web.validation.JSFSeverityPreferenceInitializer"/>
</extension>
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/FacesConfigValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/FacesConfigValidator.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/FacesConfigValidator.java 2011-11-23 00:56:44 UTC (rev 36554)
@@ -0,0 +1,265 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.web.validation;
+
+import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.validation.internal.core.ValidationException;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.validation.ContextValidationHelper;
+import org.jboss.tools.common.validation.IProjectValidationContext;
+import org.jboss.tools.common.validation.IValidatingProjectSet;
+import org.jboss.tools.common.validation.IValidatingProjectTree;
+import org.jboss.tools.common.validation.IValidator;
+import org.jboss.tools.common.validation.ValidationErrorManager;
+import org.jboss.tools.common.validation.ValidatorManager;
+import org.jboss.tools.common.validation.internal.ProjectValidationContext;
+import org.jboss.tools.common.validation.internal.SimpleValidatingProjectTree;
+import org.jboss.tools.common.validation.internal.ValidatingProjectSet;
+import org.jboss.tools.common.web.WebUtils;
+import org.jboss.tools.jsf.model.JSFConstants;
+import org.jboss.tools.jst.web.WebModelPlugin;
+import org.jboss.tools.jst.web.validation.Check;
+import org.jboss.tools.jst.web.validation.CheckClass;
+import org.jboss.tools.jst.web.validation.WebXMLPreferences;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class FacesConfigValidator extends ValidationErrorManager implements IValidator, JSFConstants {
+ public static final String ID = "org.jboss.tools.esb.validator.ESBCoreValidator"; //$NON-NLS-1$
+ public static final String PROBLEM_TYPE = "org.jboss.tools.jsf.facesconfigproblem"; //$NON-NLS-1$
+ public static final String PREFERENCE_PAGE_ID = "org.jboss.tools.jsf.ui.FacesConfigValidatorPreferencePage"; //$NON-NLS-1$
+
+ public static String SHORT_ID = "verification"; //$NON-NLS-1$
+
+ static String XML_EXT = ".xml"; //$NON-NLS-1$
+
+ String projectName;
+ Map<IProject, IProjectValidationContext> contexts = new HashMap<IProject, IProjectValidationContext>();
+
+ Map<String, Set<Check>> checks = new HashMap<String, Set<Check>>();
+
+ public FacesConfigValidator() {
+ createChecks();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getPreference(org.eclipse.core.resources.IProject, java.lang.String)
+ */
+ @Override
+ protected String getPreference(IProject project, String preferenceKey) {
+ return WebXMLPreferences.getInstance().getProjectPreference(project, preferenceKey);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMaxNumberOfMarkersPerFile(org.eclipse.core.resources.IProject)
+ */
+ @Override
+ public int getMaxNumberOfMarkersPerFile(IProject project) {
+ return WebXMLPreferences.getMaxNumberOfProblemMarkersPerFile(project);
+ }
+
+ private void addCheck(Check check, String... entities) {
+ for (String entity: entities) {
+ Set<Check> cs = checks.get(entity);
+ if(cs == null) {
+ cs = new HashSet<Check>();
+ checks.put(entity, cs);
+ }
+ cs.add(check);
+ }
+ }
+
+ void createChecks() {
+ String ENT_APP = "JSFApplication", ENT_APP_12 = ENT_APP + SUFF_12, ENT_APP_20 = ENT_APP + SUFF_20;
+ addCheck(new CheckClass(this, JSFSeverityPreferences.INVALID_ACTION_LISTENER, "action-listener", false, "javax.faces.event.ActionListener", null), ENT_APP, ENT_APP_12, ENT_APP_20);
+ addCheck(new CheckClass(this, JSFSeverityPreferences.INVALID_NAVIGATION_HANDLER, "navigation-handler", false, "javax.faces.application.NavigationHandler", null), ENT_APP, ENT_APP_12, ENT_APP_20);
+ addCheck(new CheckClass(this, JSFSeverityPreferences.INVALID_PROPERTY_RESOLVER, "property-resolver", false, "javax.faces.el.PropertyResolver", null), ENT_APP, ENT_APP_12, ENT_APP_20);
+ addCheck(new CheckClass(this, JSFSeverityPreferences.INVALID_STATE_MANAGER, "state-manager", false, "javax.faces.application.StateManager", null), ENT_APP, ENT_APP_12, ENT_APP_20);
+ addCheck(new CheckClass(this, JSFSeverityPreferences.INVALID_VARIABLE_RESOLVER, "variable-resolver", false, "javax.faces.el.VariableResolver", null), ENT_APP, ENT_APP_12, ENT_APP_20);
+ addCheck(new CheckClass(this, JSFSeverityPreferences.INVALID_VIEW_HANDLER, "view-handler", false, "javax.faces.application.ViewHandler", null), ENT_APP, ENT_APP_12, ENT_APP_20);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMarkerType()
+ */
+ @Override
+ public String getMarkerType() {
+ return PROBLEM_TYPE;
+ }
+
+ public String getId() {
+ return ID;
+ }
+
+ public String getBuilderId() {
+ return null;
+ }
+
+ public IValidatingProjectTree getValidatingProjects(IProject project) {
+ IProjectValidationContext rootContext = contexts.get(project);
+ if(rootContext == null) {
+ rootContext = new ProjectValidationContext();
+ contexts.put(project, rootContext);
+ }
+
+ Set<IProject> projects = new HashSet<IProject>();
+ projects.add(project);
+
+ IValidatingProjectSet projectSet = new ValidatingProjectSet(project, projects, rootContext);
+ return new SimpleValidatingProjectTree(projectSet);
+ }
+
+ public boolean shouldValidate(IProject project) {
+ if(!project.isAccessible()) {
+ return false;
+ }
+
+ try {
+ IFacetedProject fp = ProjectFacetsManager.create(project);
+ IProjectFacet f = ProjectFacetsManager.getProjectFacet("jst.web");
+ if(fp != null && f != null && fp.getInstalledVersion(f) != null) {
+ return true;
+ }
+ } catch (CoreException e) {
+ WebModelPlugin.getDefault().logError(e);
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#init(org.eclipse.core.resources.IProject, org.jboss.tools.jst.web.kb.internal.validation.ContextValidationHelper, org.jboss.tools.jst.web.kb.validation.IProjectValidationContext, org.eclipse.wst.validation.internal.provisional.core.IValidator, org.eclipse.wst.validation.internal.provisional.core.IReporter)
+ */
+ @Override
+ public void init(IProject project, ContextValidationHelper validationHelper, IProjectValidationContext context, org.eclipse.wst.validation.internal.provisional.core.IValidator manager, IReporter reporter) {
+ super.init(project, validationHelper, context, manager, reporter);
+ projectName = project.getName();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.validation.IValidator#validate(java.util.Set, org.eclipse.core.resources.IProject, org.jboss.tools.jst.web.kb.internal.validation.ContextValidationHelper, org.jboss.tools.jst.web.kb.validation.IProjectValidationContext, org.jboss.tools.jst.web.kb.internal.validation.ValidatorManager, org.eclipse.wst.validation.internal.provisional.core.IReporter)
+ */
+ public IStatus validate(Set<IFile> changedFiles, IProject project,
+ ContextValidationHelper validationHelper, IProjectValidationContext context, ValidatorManager manager,
+ IReporter reporter) throws ValidationException {
+ init(project, validationHelper, context, manager, reporter);
+
+ for (IFile file: changedFiles) {
+ if(file.getName().endsWith(XML_EXT)) {
+ XModelObject o = EclipseResourceUtil.createObjectForResource(file);
+ if(o != null && o.getModelEntity().getName().startsWith("FacesConfig")) {
+ validateFile(o, file);
+ }
+ }
+ }
+ return OK_STATUS;
+ }
+
+ private void validateFile(XModelObject object, IFile file) {
+ validateObject(object);
+ }
+
+ private void validateObject(XModelObject object) {
+ String entity = object.getModelEntity().getName();
+ Set<Check> ch = checks.get(entity);
+ if(ch != null) {
+ for (Check c: ch) {
+ c.check(object);
+ }
+ }
+ XModelObject[] cs = object.getChildren();
+ for (XModelObject c: cs) {
+ validateObject(c);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.validation.IValidator#validateAll(org.eclipse.core.resources.IProject, org.jboss.tools.jst.web.kb.internal.validation.ContextValidationHelper, org.jboss.tools.jst.web.kb.validation.IProjectValidationContext, org.jboss.tools.jst.web.kb.internal.validation.ValidatorManager, org.eclipse.wst.validation.internal.provisional.core.IReporter)
+ */
+ public IStatus validateAll(IProject project,
+ ContextValidationHelper validationHelper, IProjectValidationContext context, ValidatorManager manager,
+ IReporter reporter) throws ValidationException {
+ init(project, validationHelper, context, manager, reporter);
+ displaySubtask(JSFValidationMessage.VALIDATING_PROJECT, new String[]{projectName});
+
+ IPath webContentPath = WebUtils.getFirstWebContentPath(project);
+ IFolder webInf = null;
+ try {
+
+ // This code line never return null
+ webInf = project.getFolder(webContentPath.append("WEB-INF")); //$NON-NLS-1$
+ // so never check it for null
+ if(webInf.isAccessible()) {
+ IResource[] rs = webInf.members();
+ // exception is not required here because if esbContent is not exist control
+ // never gets here
+ for (IResource r: rs) {
+ if(r instanceof IFile) {
+ IFile file = (IFile)r;
+ String name = file.getName();
+ if(name.endsWith(XML_EXT)) {
+ XModelObject o = EclipseResourceUtil.createObjectForResource(file);
+ if(o != null) {
+ String entity = o.getModelEntity().getName();
+ if(entity.startsWith("FacesConfig")) {
+ validateFile(o, file);
+ } else if(entity.startsWith("FileWebApp")) {
+ //TODO
+ }
+ }
+ }
+ }
+ }
+ }
+ } catch (CoreException e) {
+ // hiding exceptions is the evil so lets return EROOR Status with exception
+ return new Status(IStatus.ERROR,WebModelPlugin.PLUGIN_ID,MessageFormat.format("Validation error for project {0}",project.getLocation().toString()),e);
+ }
+
+ return OK_STATUS;
+ }
+
+
+
+ public boolean isEnabled(IProject project) {
+ return JSFSeverityPreferences.isValidationEnabled(project);
+ }
+
+ @Override
+ protected String getPreferencePageId() {
+ return PREFERENCE_PAGE_ID;
+ }
+
+}
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/FacesConfigValidator.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/JSFSeverityPreferenceInitializer.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/JSFSeverityPreferenceInitializer.java 2011-11-23 00:52:58 UTC (rev 36553)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/JSFSeverityPreferenceInitializer.java 2011-11-23 00:56:44 UTC (rev 36554)
@@ -31,10 +31,8 @@
defaultPreferences.putBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, true);
defaultPreferences.put(SeverityPreferences.WRONG_BUILDER_ORDER_PREFERENCE_NAME, JSFSeverityPreferences.ERROR);
for (String name : JSFSeverityPreferences.SEVERITY_OPTION_NAMES) {
- defaultPreferences.put(name, SeverityPreferences.ERROR);
+ defaultPreferences.put(name, SeverityPreferences.WARNING);
}
- defaultPreferences.put(JSFSeverityPreferences.UNKNOWN_COMPOSITE_COMPONENT_ATTRIBUTE, JSFSeverityPreferences.WARNING);
- defaultPreferences.put(JSFSeverityPreferences.UNKNOWN_COMPOSITE_COMPONENT_NAME, JSFSeverityPreferences.WARNING);
defaultPreferences.putInt(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, SeverityPreferences.DEFAULT_MAX_NUMBER_OF_MARKERS_PER_FILE);
}
}
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/JSFSeverityPreferences.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/JSFSeverityPreferences.java 2011-11-23 00:52:58 UTC (rev 36553)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/JSFSeverityPreferences.java 2011-11-23 00:56:44 UTC (rev 36554)
@@ -32,6 +32,16 @@
// Mark attribute which can't be found.
public static final String UNKNOWN_COMPOSITE_COMPONENT_ATTRIBUTE = INSTANCE.createSeverityOption("unknownAttribute"); //$NON-NLS-1$
+ //Faces Config
+ //Application
+ public static final String INVALID_ACTION_LISTENER = INSTANCE.createSeverityOption("invalidActionListener"); //$NON-NLS-1$
+ public static final String INVALID_NAVIGATION_HANDLER = INSTANCE.createSeverityOption("invalidNavigationHandler"); //$NON-NLS-1$
+ public static final String INVALID_PROPERTY_RESOLVER = INSTANCE.createSeverityOption("invalidPropertyResolver"); //$NON-NLS-1$
+ public static final String INVALID_STATE_MANAGER = INSTANCE.createSeverityOption("invalidStateManager"); //$NON-NLS-1$
+ public static final String INVALID_VARIABLE_RESOLVER = INSTANCE.createSeverityOption("invalidVariableResolver"); //$NON-NLS-1$
+ public static final String INVALID_VIEW_HANDLER = INSTANCE.createSeverityOption("invalidViewHandler"); //$NON-NLS-1$
+
+
/**
* @return the only instance of JSFSeverityPreferences
*/
14 years, 4 months
JBoss Tools SVN: r36553 - in trunk/jst/plugins/org.jboss.tools.jst.web.ui: src/org/jboss/tools/jst/web/ui/internal/preferences and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-22 19:52:58 -0500 (Tue, 22 Nov 2011)
New Revision: 36553
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLConfigurationBlock.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLPreferencesMessages.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLPreferencesMessages.properties
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLValidatorPreferencePage.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.properties
trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
Log:
JBIDE-10190
https://issues.jboss.org/browse/JBIDE-10190
Migrated validation for web.xml.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.properties 2011-11-23 00:51:59 UTC (rev 36552)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.properties 2011-11-23 00:52:58 UTC (rev 36553)
@@ -56,4 +56,5 @@
NavigatorContent_ProjectContentProvider=JBoss Tools Project Content Provider
PreferencePage_Validator = Validation
-PropertiesPage_Validator = Expression Language Validation
\ No newline at end of file
+PropertiesPage_Validator = Expression Language Validation
+PreferencePage_WebXML_Validator = Web XML Validation
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2011-11-23 00:51:59 UTC (rev 36552)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2011-11-23 00:52:58 UTC (rev 36553)
@@ -707,4 +707,31 @@
</contentType>
</proposalComputer>
</extension>
+
+ <extension point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.jboss.tools.common.model.ui"
+ class="org.jboss.tools.jst.web.ui.internal.preferences.WebXMLValidatorPreferencePage"
+ id="org.jboss.tools.jst.web.ui.WebXMLValidatorPreferencePage"
+ name="%PreferencePage_WebXML_Validator">
+ </page>
+ </extension>
+
+ <extension point="org.eclipse.ui.propertyPages">
+ <page
+ name="%PreferencePage_WebXML_Validator"
+ class="org.jboss.tools.jst.web.ui.internal.preferences.WebXMLValidatorPreferencePage"
+ id="org.jboss.tools.jst.web.ui.propertyPages.WebXMLValidatorPreferencePage">
+ <enabledWhen>
+ <and>
+ <adapt type="org.eclipse.core.resources.IProject">
+ <or>
+ <test property="org.eclipse.core.resources.projectNature" value="org.jboss.tools.jsf.jsfnature"/>
+ </or>
+ </adapt>
+ </and>
+ </enabledWhen>
+ <keywordReference id="org.eclipse.wst.html.ui.webcontent"/>
+ </page>
+ </extension>
</plugin>
Added: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLConfigurationBlock.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLConfigurationBlock.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLConfigurationBlock.java 2011-11-23 00:52:58 UTC (rev 36553)
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.ui.internal.preferences;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
+import org.jboss.tools.common.preferences.SeverityPreferences;
+import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock;
+import org.jboss.tools.jst.web.WebModelPlugin;
+import org.jboss.tools.jst.web.ui.WebUiPlugin;
+import org.jboss.tools.jst.web.validation.WebXMLPreferences;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class WebXMLConfigurationBlock extends SeverityConfigurationBlock {
+
+ private static final String SETTINGS_SECTION_NAME = "WebXMLConfigurationBlock"; //$NON-NLS-1$
+
+ private static SectionDescription SECTION_CLASS_REFERENCES = new SectionDescription(
+ WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_section_classreferences,
+ new String[][]{
+ {WebXMLPreferences.INVALID_EXCEPTION_TYPE, WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_pb_invalidExceptionType_label},
+ {WebXMLPreferences.INVALID_SERVLET_CLASS, WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_pb_invalidServletClass_label},
+ {WebXMLPreferences.INVALID_FILTER_CLASS, WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_pb_invalidFilterClass_label},
+ {WebXMLPreferences.INVALID_LISTENER_CLASS, WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_pb_invalidListenerClass_label},
+ {WebXMLPreferences.INVALID_MESSAGE_DESTINATION_TYPE, WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_pb_invalidMessageDestinationType_label},
+ {WebXMLPreferences.INVALID_RES_TYPE, WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_pb_invalidResType_label},
+ },
+ WebModelPlugin.PLUGIN_ID
+ );
+
+ private static SectionDescription SECTION_RESOURCE_REFERENCES = new SectionDescription(
+ WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_section_resourcereferences,
+ new String[][]{
+ {WebXMLPreferences.INVALID_ERROR_PAGE_REF, WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_pb_invalidErrorPageRef_label},
+ {WebXMLPreferences.INVALID_FORM_ERROR_PAGE_REF, WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_pb_invalidFormErrorPageRef_label},
+ {WebXMLPreferences.INVALID_FORM_LOGIN_PAGE_REF, WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_pb_invalidFormLoginPageRef_label},
+ {WebXMLPreferences.INVALID_JSP_FILE_REF, WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_pb_invalidJspFileRef_label},
+ {WebXMLPreferences.INVALID_ICON_REF, WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_pb_invalidIconRef_label},
+ {WebXMLPreferences.INVALID_TAGLIB_REF, WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_pb_invalidTaglibRef_label},
+ {WebXMLPreferences.INVALID_WELCOME_FILE_REF, WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_pb_invalidWelcomeFileRef_label},
+ },
+ WebModelPlugin.PLUGIN_ID
+ );
+
+ private static SectionDescription SECTION_OBJECT_REFERENCES = new SectionDescription(
+ WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_section_objectreferences,
+ new String[][]{
+ {WebXMLPreferences.INVALID_SERVLET_REF, WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_pb_invalidServletRef_label},
+ {WebXMLPreferences.INVALID_FILTER_REF, WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_pb_invalidFilterRef_label},
+ {WebXMLPreferences.INVALID_ROLE_REF, WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_pb_invalidRoleRef_label},
+ },
+ WebModelPlugin.PLUGIN_ID
+ );
+
+ private static SectionDescription[] ALL_SECTIONS = new SectionDescription[]{
+ SECTION_CLASS_REFERENCES,
+ SECTION_RESOURCE_REFERENCES,
+ SECTION_OBJECT_REFERENCES,
+ };
+
+ 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);
+ return keys.toArray(new Key[0]);
+ }
+
+ private static final Key MAX_NUMBER_OF_PROBLEMS_KEY = getKey(WebModelPlugin.PLUGIN_ID, SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);
+
+ @Override
+ protected Key getMaxNumberOfProblemsKey() {
+ return MAX_NUMBER_OF_PROBLEMS_KEY;
+ }
+
+ public WebXMLConfigurationBlock(IStatusChangeListener context,
+ IProject project, IWorkbenchPreferenceContainer container) {
+ super(context, project, getKeys(), container);
+ }
+
+ @Override
+ protected SectionDescription[] getAllSections() {
+ return ALL_SECTIONS;
+ }
+
+ @Override
+ protected String getCommonDescription() {
+ return WebXMLPreferencesMessages.WebXMLValidatorConfigurationBlock_common_description;
+ }
+
+ @Override
+ protected IDialogSettings getDialogSettings() {
+ return WebUiPlugin.getDefault().getDialogSettings().getSection(SETTINGS_SECTION_NAME);
+ }
+
+ @Override
+ protected String getQualifier() {
+ return WebModelPlugin.PLUGIN_ID;
+ }
+}
\ No newline at end of file
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLConfigurationBlock.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLPreferencesMessages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLPreferencesMessages.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLPreferencesMessages.java 2011-11-23 00:52:58 UTC (rev 36553)
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.ui.internal.preferences;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class WebXMLPreferencesMessages extends NLS {
+ private static final String BUNDLE_NAME = WebXMLPreferencesMessages.class.getName();
+
+ // Validator Preference page
+ public static String WebXMLValidatorConfigurationBlock_common_description;
+
+ // Section Name
+ public static String WebXMLValidatorConfigurationBlock_section_classreferences;
+ public static String WebXMLValidatorConfigurationBlock_pb_invalidExceptionType_label;
+ public static String WebXMLValidatorConfigurationBlock_pb_invalidFilterClass_label;
+ public static String WebXMLValidatorConfigurationBlock_pb_invalidListenerClass_label;
+ public static String WebXMLValidatorConfigurationBlock_pb_invalidMessageDestinationType_label;
+ public static String WebXMLValidatorConfigurationBlock_pb_invalidResType_label;
+ public static String WebXMLValidatorConfigurationBlock_pb_invalidServletClass_label;
+
+ public static String WebXMLValidatorConfigurationBlock_section_resourcereferences;
+ public static String WebXMLValidatorConfigurationBlock_pb_invalidErrorPageRef_label;
+ public static String WebXMLValidatorConfigurationBlock_pb_invalidFormErrorPageRef_label;
+ public static String WebXMLValidatorConfigurationBlock_pb_invalidFormLoginPageRef_label;
+ public static String WebXMLValidatorConfigurationBlock_pb_invalidJspFileRef_label;
+ public static String WebXMLValidatorConfigurationBlock_pb_invalidIconRef_label;
+ public static String WebXMLValidatorConfigurationBlock_pb_invalidTaglibRef_label;
+ public static String WebXMLValidatorConfigurationBlock_pb_invalidWelcomeFileRef_label;
+
+ public static String WebXMLValidatorConfigurationBlock_section_objectreferences;
+ public static String WebXMLValidatorConfigurationBlock_pb_invalidServletRef_label;
+ public static String WebXMLValidatorConfigurationBlock_pb_invalidFilterRef_label;
+ public static String WebXMLValidatorConfigurationBlock_pb_invalidRoleRef_label;
+
+ public static String PREFERENCE_PAGE_WEB_XML_VALIDATOR;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, WebXMLPreferencesMessages.class);
+ }
+}
\ No newline at end of file
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLPreferencesMessages.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLPreferencesMessages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLPreferencesMessages.properties (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLPreferencesMessages.properties 2011-11-23 00:52:58 UTC (rev 36553)
@@ -0,0 +1,37 @@
+##################################################################################
+### Copyright (c) 2009 Red Hat, Inc.
+### Distributed under license by Red Hat, Inc. All rights reserved.
+### This program is made available under the terms of the
+### Eclipse Public License v1.0 which accompanies this distribution,
+### and is available at http://www.eclipse.org/legal/epl-v10.html
+###
+### Contributors:
+### Red Hat, Inc. - initial API and implementation
+##################################################################################
+
+WebXMLValidatorConfigurationBlock_common_description=Select the severity level for the following optional web.xml Validator problems:
+
+##Section Channel ID Ref
+WebXMLValidatorConfigurationBlock_section_classreferences=Class References
+WebXMLValidatorConfigurationBlock_pb_invalidExceptionType_label=Invalid exception type:
+WebXMLValidatorConfigurationBlock_pb_invalidFilterClass_label=Invalid filter class:
+WebXMLValidatorConfigurationBlock_pb_invalidListenerClass_label=Invalid listener class:
+WebXMLValidatorConfigurationBlock_pb_invalidMessageDestinationType_label=Invalid message destination type:
+WebXMLValidatorConfigurationBlock_pb_invalidResType_label=Invalid res-type:
+WebXMLValidatorConfigurationBlock_pb_invalidServletClass_label=Invalid servlet class:
+
+WebXMLValidatorConfigurationBlock_section_resourcereferences=Resource References
+WebXMLValidatorConfigurationBlock_pb_invalidErrorPageRef_label=Invalid error page:
+WebXMLValidatorConfigurationBlock_pb_invalidFormErrorPageRef_label=Invalid form error page:
+WebXMLValidatorConfigurationBlock_pb_invalidFormLoginPageRef_label=Invalid form login page:
+WebXMLValidatorConfigurationBlock_pb_invalidJspFileRef_label=Invalid jsp file:
+WebXMLValidatorConfigurationBlock_pb_invalidIconRef_label=Invalid icon:
+WebXMLValidatorConfigurationBlock_pb_invalidTaglibRef_label=Invalid taglib:
+WebXMLValidatorConfigurationBlock_pb_invalidWelcomeFileRef_label=Invalid welcome file:
+
+WebXMLValidatorConfigurationBlock_section_objectreferences=Object References
+WebXMLValidatorConfigurationBlock_pb_invalidServletRef_label=Invalid servlet reference:
+WebXMLValidatorConfigurationBlock_pb_invalidFilterRef_label=Invalid filter reference:
+WebXMLValidatorConfigurationBlock_pb_invalidRoleRef_label=Invalid role reference:
+
+PREFERENCE_PAGE_WEB_XML_VALIDATOR=Web XML Validator
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLPreferencesMessages.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLValidatorPreferencePage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLValidatorPreferencePage.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLValidatorPreferencePage.java 2011-11-23 00:52:58 UTC (rev 36553)
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.ui.internal.preferences;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
+import org.jboss.tools.common.ui.preferences.SeverityPreferencePage;
+import org.jboss.tools.jst.web.WebModelPlugin;
+import org.jboss.tools.jst.web.validation.WebXMLCoreValidator;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class WebXMLValidatorPreferencePage extends SeverityPreferencePage {
+
+ public static final String PREF_ID = WebXMLCoreValidator.PREFERENCE_PAGE_ID;
+ public static final String PROP_ID = "org.jboss.tools.jst.web.ui.propertyPages.WebXMLValidatorPreferencePage"; //$NON-NLS-1$
+
+ public WebXMLValidatorPreferencePage() {
+ setPreferenceStore(WebModelPlugin.getDefault().getPreferenceStore());
+ setTitle(WebXMLPreferencesMessages.PREFERENCE_PAGE_WEB_XML_VALIDATOR);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPreferencePageID()
+ */
+ @Override
+ protected String getPreferencePageID() {
+ return PREF_ID;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPropertyPageID()
+ */
+ @Override
+ protected String getPropertyPageID() {
+ return PROP_ID;
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ IWorkbenchPreferenceContainer container = (IWorkbenchPreferenceContainer) getContainer();
+ fConfigurationBlock = new WebXMLConfigurationBlock(getNewStatusChangedListener(), getProject(), container);
+
+ super.createControl(parent);
+ }
+}
\ No newline at end of file
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/WebXMLValidatorPreferencePage.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 4 months
JBoss Tools SVN: r36552 - in trunk/jst/plugins/org.jboss.tools.jst.web: META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-22 19:51:59 -0500 (Tue, 22 Nov 2011)
New Revision: 36552
Added:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/Check.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckClass.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckFilterMappingName.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckResource.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckRoleReferenceName.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckServletMappingName.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLPreferenceInitializer.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLPreferences.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLValidatorMessages.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/messages.properties
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF
trunk/jst/plugins/org.jboss.tools.jst.web/plugin.properties
trunk/jst/plugins/org.jboss.tools.jst.web/plugin.xml
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/project/ext/store/XMLValueInfo.java
Log:
JBIDE-10190
https://issues.jboss.org/browse/JBIDE-10190
Migrated validator for web.xml.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF 2011-11-23 00:11:35 UTC (rev 36551)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF 2011-11-23 00:51:59 UTC (rev 36552)
@@ -10,6 +10,7 @@
Bundle-Localization: plugin
Require-Bundle: org.jboss.tools.common.model;visibility:=reexport,
org.jboss.tools.common.projecttemplates;visibility:=reexport,
+ org.jboss.tools.common.validation,
org.eclipse.ui;bundle-version="3.7.0",
org.eclipse.jdt.launching;bundle-version="3.6.0",
org.eclipse.debug.ui;bundle-version="3.7.0",
@@ -54,6 +55,7 @@
org.jboss.tools.jst.web.tld.model,
org.jboss.tools.jst.web.tld.model.handlers,
org.jboss.tools.jst.web.tld.model.helpers,
+ org.jboss.tools.jst.web.validation,
org.jboss.tools.jst.web.webapp.model,
org.jboss.tools.jst.web.webapp.model.handlers
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/plugin.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/plugin.properties 2011-11-23 00:11:35 UTC (rev 36551)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/plugin.properties 2011-11-23 00:51:59 UTC (rev 36552)
@@ -4,3 +4,5 @@
# END NON-TRANSLATABLE
strutsProblemName=Verification Problem
constraintProblemName=Constraint Problem
+WebXMLCoreValidator=Web XML Validator
+WebXMLProblemName=Web XML Problem
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/plugin.xml 2011-11-23 00:11:35 UTC (rev 36551)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/plugin.xml 2011-11-23 00:51:59 UTC (rev 36552)
@@ -315,4 +315,24 @@
</persistent>
</extension>
+ <extension id="webxmlproblem" name="%WebXMLProblemName" point="org.eclipse.core.resources.markers">
+ <super type="org.jboss.tools.common.validation.JBTValidationProblem">
+ </super>
+ <persistent value="true">
+ </persistent>
+ </extension>
+
+ <extension point="org.eclipse.core.runtime.preferences">
+ <initializer class="org.jboss.tools.jst.web.validation.WebXMLPreferenceInitializer"/>
+ </extension>
+
+ <extension
+ point="org.jboss.tools.common.validation.validator">
+ <validator
+ class="org.jboss.tools.jst.web.validation.WebXMLCoreValidator"
+ name="%WebXMLCoreValidator"
+ id="org.jboss.tools.jst.web.validation.WebXMLCoreValidator">
+ </validator>
+ </extension>
+
</plugin>
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/project/ext/store/XMLValueInfo.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/project/ext/store/XMLValueInfo.java 2011-11-23 00:11:35 UTC (rev 36551)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/project/ext/store/XMLValueInfo.java 2011-11-23 00:51:59 UTC (rev 36552)
@@ -82,7 +82,7 @@
}
public IFile getResource() {
- return object == null ? null : (IFile)object.getAdapter(File.class);
+ return object == null ? null : (IFile)object.getAdapter(IFile.class);
}
}
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/Check.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/Check.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/Check.java 2011-11-23 00:51:59 UTC (rev 36552)
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.validation;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.text.ITextSourceReference;
+import org.jboss.tools.common.validation.ValidationErrorManager;
+import org.jboss.tools.jst.web.WebModelPlugin;
+import org.jboss.tools.jst.web.model.project.ext.store.XMLValueInfo;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class Check {
+ static String ATTR_PATH = "path"; //$NON-NLS-1$
+ static String ATTR_ATTRIBUTE = "attribute"; //$NON-NLS-1$
+ protected String preference;
+ protected String attr;
+ ValidationErrorManager manager;
+
+ public Check(ValidationErrorManager manager, String preference, String attr) {
+ this.manager = manager;
+ this.preference = preference;
+ this.attr = attr;
+ }
+
+ public void check(XModelObject object) {
+ }
+
+ protected void fireMessage(XModelObject object, String message) {
+ ITextSourceReference ref = getSourceReference(object, attr);
+ IMarker m = manager.addError(message, preference, ref, ref.getResource());
+ bindMarkerToPathAndAttribute(m, object, attr);
+ }
+
+ ITextSourceReference getSourceReference(XModelObject o, String attr) {
+ return new XMLValueInfo(o, attr);
+ }
+
+ public static void bindMarkerToPathAndAttribute(IMarker marker, XModelObject object, String attr) {
+ if(marker != null) {
+ try {
+ marker.setAttribute(ATTR_PATH, object.getPath());
+ marker.setAttribute(ATTR_ATTRIBUTE, attr);
+ } catch (CoreException e) {
+ WebModelPlugin.getDefault().logError(e);
+ }
+ }
+ }
+
+}
+
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/Check.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckClass.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckClass.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckClass.java 2011-11-23 00:51:59 UTC (rev 36552)
@@ -0,0 +1,186 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.validation;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.osgi.util.NLS;
+import org.jboss.tools.common.log.LogHelper;
+import org.jboss.tools.common.meta.constraint.impl.XAttributeConstraintQClassName;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.util.EclipseJavaUtil;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.validation.IProjectValidationContext;
+import org.jboss.tools.common.validation.ValidationErrorManager;
+import org.jboss.tools.jst.web.WebModelPlugin;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class CheckClass extends Check {
+ XAttributeConstraintQClassName constraint = new XAttributeConstraintQClassName();
+ boolean allowsPrimitive = false;
+ String implementsType = null;
+ String extendsType = null;
+
+ public CheckClass(ValidationErrorManager manager, String preference, String attr) {
+ super(manager, preference, attr);
+ }
+
+ public CheckClass(ValidationErrorManager manager, String preference, String attr, boolean allowsPrimitive, String implementsType, String extendsType) {
+ super(manager, preference, attr);
+ this.allowsPrimitive = allowsPrimitive;
+ this.implementsType = implementsType;
+ this.extendsType = extendsType;
+ }
+
+ public void check(XModelObject object) {
+ if(attr == null) return;
+ String value = object.getAttributeValue(attr);
+ if(value.length() == 0 || isJavaLang(value)) return;
+ if(isPrimitive(value)) {
+ if(!allowsPrimitive) {
+ fireNotExist(object, preference, attr, value);
+ }
+ return;
+ }
+ if(!checkQualifiedName(value)) {
+ fireInvalid(object, attr, attr, value);
+ return;
+ }
+ IType type = getValidType(value, object);
+
+ IFile f = (IFile)object.getAdapter(IFile.class);
+ if(f != null) {
+ IProjectValidationContext context = manager.getValidationContext();
+ if(context != null) {
+ context.addLinkedCoreResource(WebXMLCoreValidator.SHORT_ID, value, f.getFullPath(), true);
+ if(type != null && type.getResource() != null && type.exists()) {
+ context.addLinkedCoreResource(WebXMLCoreValidator.SHORT_ID, type.getResource().getFullPath().toOSString(), f.getFullPath(), true);
+ }
+ }
+ }
+
+ if(type != null) {
+ String mustImpl = null;
+ try { mustImpl = checkImplements(object, type); } catch (Exception e) {
+ LogHelper.logError("org.jboss.tools.jst.web.verification", e); //$NON-NLS-1$
+ }
+ if(mustImpl != null) {
+ fireImplements(object, preference, attr, value, mustImpl);
+ }
+ String mustExtend = null;
+ try { mustExtend = checkExtends(object, type); } catch (Exception e) {
+ LogHelper.logError("org.jboss.tools.jst.web.verification", e); //$NON-NLS-1$
+ }
+ if(mustExtend != null) {
+ fireExtends(object, preference, attr, value, mustExtend);
+ }
+ return;
+ }
+ fireNotExist(object, preference, attr, value);
+ }
+
+ private boolean checkQualifiedName(String value) {
+ return constraint.accepts(value);
+ }
+
+ private String checkImplements(XModelObject object, IType type) throws Exception {
+ if("java.lang.Class".equals(type.getFullyQualifiedName())) return null; //$NON-NLS-1$
+ String impl = implementsType;
+ if(impl == null || impl.length() == 0) return null;
+ String[] is = type.getSuperInterfaceNames();
+ for (int i = 0; i < is.length; i++) {
+ String f = EclipseJavaUtil.resolveType(type, is[i]);
+ if(f != null && f.equals(impl)) return null;
+ }
+ if(type.isInterface()) return impl;
+ String f = type.getSuperclassName();
+ if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return impl; //$NON-NLS-1$
+ f = EclipseJavaUtil.resolveType(type, f);
+ if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return impl; //$NON-NLS-1$
+ type = getValidType(f, object);
+ if(type == null) return impl;
+ return checkImplements(object, type);
+ }
+
+ private String checkExtends(XModelObject object, IType type) throws Exception {
+ if(type.isInterface()) return null;
+ if("java.lang.Class".equals(type.getFullyQualifiedName())) return null; //$NON-NLS-1$
+ String ext = extendsType;
+ if(ext == null || ext.length() == 0 || ext.equals(type.getFullyQualifiedName())) return null;
+ String f = type.getSuperclassName();
+ if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return ext; //$NON-NLS-1$
+ if(f.equals(ext)) return null;
+ f = EclipseJavaUtil.resolveType(type, f);
+ if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return ext; //$NON-NLS-1$
+ if(f.equals(ext)) return null;
+ type = getValidType(f, object);
+ if(type == null) return ext;
+ return checkExtends(object, type);
+ }
+
+ private boolean isPrimitive(String value) {
+ return ".int.boolean.char.byte.double.float.long.short.".indexOf("." + value + ".") >= 0; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ private boolean isJavaLang(String value) {
+ if(value.indexOf('.') < 0) {
+ return ".String.Integer.Boolean.Character.Byte.Double.Float.Long.Short.".indexOf("." + value + ".") >= 0; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ } else if(value.startsWith("java.lang.")) { //$NON-NLS-1$
+ return isJavaLang(value.substring(10));
+ } else {
+ return false;
+ }
+ }
+
+ protected void fireImplements(XModelObject object, String id, String attr, String value, String interfaceName) {
+ fireMessage(object, NLS.bind(WebXMLValidatorMessages.CLASS_NOT_IMPLEMENTS, new Object[] {attr, value, interfaceName}));
+ }
+
+ protected void fireExtends(XModelObject object, String id, String attr, String value, String superName) {
+ fireMessage(object, NLS.bind(WebXMLValidatorMessages.CLASS_NOT_EXTENDS, new Object[] {attr, value, superName}));
+ }
+ protected void fireInvalid(XModelObject object, String id, String attr, String value) {
+ fireMessage(object, NLS.bind(WebXMLValidatorMessages.CLASS_NOT_VALID, attr, value));
+ }
+ protected void fireNotExist(XModelObject object, String id, String attr, String value) {
+ fireMessage(object, NLS.bind(WebXMLValidatorMessages.CLASS_NOT_EXISTS, attr, value));
+ }
+
+ public IType getValidType(String className, XModelObject o) {
+ IProject project = EclipseResourceUtil.getProject(o);
+ if(project == null) return null;
+ IType type = EclipseResourceUtil.getValidType(project, className);
+ if(type != null) return type;
+ IJavaProject javaProject = EclipseResourceUtil.getJavaProject(project);
+ if(javaProject != null) {
+ try {
+ type = EclipseJavaUtil.findType(javaProject, className);
+ } catch (JavaModelException e) {
+ WebModelPlugin.getDefault().logError(e);
+ }
+ if(type != null) return type;
+ }
+ if(EclipseResourceUtil.isContainedInOutput(project, className)) {
+ // Eclipse does not have type in this case,
+ // so we return something instead of null
+ // This is ok while result is only compared to null
+ return EclipseResourceUtil.getValidType(project, "java.lang.Class"); //$NON-NLS-1$
+ }
+ return null;
+ }
+
+}
+
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckClass.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckFilterMappingName.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckFilterMappingName.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckFilterMappingName.java 2011-11-23 00:51:59 UTC (rev 36552)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.validation;
+
+import org.eclipse.osgi.util.NLS;
+import org.jboss.tools.common.model.*;
+import org.jboss.tools.common.validation.ValidationErrorManager;
+import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class CheckFilterMappingName extends Check {
+ static String ATTR = "filter-name"; //$NON-NLS-1$
+
+ public CheckFilterMappingName(ValidationErrorManager manager, String preference) {
+ super(manager, preference, ATTR);
+ }
+
+ public void check(XModelObject object) {
+ String filterName = object.getAttributeValue(ATTR);
+ if(filterName == null) return;
+ if(filterName.length() == 0) {
+ fireMessage(object, NLS.bind(WebXMLValidatorMessages.EMPTY, ATTR));
+ } else if(findFilter(object, filterName) == null) {
+ fireMessage(object, NLS.bind(WebXMLValidatorMessages.FILTER_NOT_EXISTS, ATTR, filterName));
+ }
+ }
+
+ XModelObject findFilter(XModelObject mapping, String name) {
+ XModelObject webxml = WebAppHelper.getParentFile(mapping);
+ XModelObject[] cs = WebAppHelper.getFilters(webxml);
+ if(cs != null) for (int i = 0; i < cs.length; i++) {
+ if(name.equals(cs[i].getAttributeValue(ATTR))) return cs[i];
+ }
+ return null;
+ }
+
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckFilterMappingName.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckResource.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckResource.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckResource.java 2011-11-23 00:51:59 UTC (rev 36552)
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.validation;
+
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.osgi.util.NLS;
+import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
+import org.jboss.tools.common.validation.ValidationErrorManager;
+import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
+import org.jboss.tools.jst.web.project.list.IWebPromptingProvider;
+import org.jboss.tools.jst.web.project.list.WebPromptingProvider;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class CheckResource extends Check {
+ boolean acceptEmpty = true;
+ String extensions = null;
+ String extensionMessage = null;
+
+ public CheckResource(ValidationErrorManager manager, String preference, String attr) {
+ super(manager, preference, attr);
+ }
+
+ public CheckResource(ValidationErrorManager manager, String preference, String attr, boolean acceptEmpty, String extensions, String extensionMessage) {
+ super(manager, preference, attr);
+ this.acceptEmpty = acceptEmpty;
+ this.extensions = extensions;
+ this.extensionMessage = extensionMessage;
+ }
+
+ public void check(XModelObject object) {
+ String value = object.getAttributeValue(attr);
+ XModel model = object.getModel();
+ XModelObject webRoot = model == null ? null : model.getByPath("FileSystems/WEB-ROOT"); //$NON-NLS-1$
+ if(webRoot == null) return;
+
+ if(object.getModelEntity().getName().startsWith("WebAppErrorPage")) { //$NON-NLS-1$
+ if(value != null && value.indexOf("?") > 0) { //$NON-NLS-1$
+ value = value.substring(0, value.indexOf("?")); //$NON-NLS-1$
+ }
+ if(isMappedToServlet(object, value)) {
+ return;
+ }
+ }
+
+ List<Object> list = WebPromptingProvider.getInstance().getList(model, IWebPromptingProvider.JSF_CONVERT_URL_TO_PATH, value, null);
+ if(list != null && list.size() > 0) {
+ value = list.get(0).toString();
+ }
+
+ if(value == null || value.trim().length() == 0) {
+ if(!acceptEmpty) {
+ fireEmpty(object, preference, attr);
+ }
+ return;
+ }
+
+ XModelObject o = null;
+ for (Object v: list) {
+ String valuei = v.toString();
+ String value2 = valuei.startsWith("/") ? valuei.substring(1) : valuei; //$NON-NLS-1$
+ o = webRoot.getChildByPath(value2);
+ if(o != null) break;
+ }
+ if(o == null) {
+ fireExists(object, preference, attr, value);
+ } else if(!checkExtensions(value)) {
+ fireExtension(object, preference, attr, value);
+ }
+ }
+
+ boolean checkExtensions(String value) {
+ value = value.toLowerCase();
+ if(extensions == null || extensions.trim().length() == 0) return true;
+ StringTokenizer st = new StringTokenizer(extensions, " "); //$NON-NLS-1$
+ while(st.hasMoreTokens()) {
+ String ext = st.nextToken();
+ if(value.endsWith(ext)) return true;
+ }
+ return false;
+ }
+
+ boolean isMappedToServlet(XModelObject o, String value) {
+ XModelObject webxml = FileSystemsHelper.getFile(o);
+ if(webxml == null) return false;
+ XModelObject[] ms = WebAppHelper.getServletMappings(webxml);
+ if(ms != null) for (XModelObject m: ms) {
+ String url = m.getAttributeValue("url-pattern"); //$NON-NLS-1$
+ if(value != null && value.equals(url)) return true;
+ }
+ return false;
+ }
+
+ protected void fireEmpty(XModelObject object, String id, String attr) {
+ fireMessage(object, NLS.bind(WebXMLValidatorMessages.PATH_EMPTY, attr));
+ }
+ protected void fireExists(XModelObject object, String id, String attr, String value) {
+ fireMessage(object, NLS.bind(WebXMLValidatorMessages.PATH_NOT_EXISTS, attr, value));
+ }
+ protected void fireExtension(XModelObject object, String id, String attr, String value) {
+ fireMessage(object, NLS.bind(extensionMessage, attr, value));
+ }
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckResource.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckRoleReferenceName.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckRoleReferenceName.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckRoleReferenceName.java 2011-11-23 00:51:59 UTC (rev 36552)
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.validation;
+
+import org.eclipse.osgi.util.NLS;
+import org.jboss.tools.common.model.*;
+import org.jboss.tools.common.validation.ValidationErrorManager;
+import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class CheckRoleReferenceName extends Check {
+ static String ATTR = "role-name"; //$NON-NLS-1$
+
+ public CheckRoleReferenceName(ValidationErrorManager manager, String preference, String attr) {
+ super(manager, preference, attr);
+ }
+
+ public void check(XModelObject object) {
+ String roleName = object.getAttributeValue(attr);
+ if(roleName == null) return;
+ if(roleName.length() == 0) {
+ fireMessage(object, NLS.bind(WebXMLValidatorMessages.EMPTY, attr));
+ } else if(!isRoleNameOk(object, roleName)) {
+ fireMessage(object, NLS.bind(WebXMLValidatorMessages.ROLE_NOT_EXISTS, attr, roleName));
+ }
+ }
+
+ boolean isRoleNameOk(XModelObject mapping, String roleName) {
+ if(roleName.equalsIgnoreCase("NONE")) return true; //$NON-NLS-1$
+ if("*".equals(roleName)) return true; //$NON-NLS-1$
+ if(findRole(mapping, roleName) != null) return true;
+ return false;
+ }
+
+ XModelObject findRole(XModelObject mapping, String name) {
+ XModelObject webxml = WebAppHelper.getParentFile(mapping);
+ if(webxml == null) return null;
+ XModelObject[] cs = WebAppHelper.getRoles(webxml);
+ for (int i = 0; i < cs.length; i++) {
+ if(name.equals(cs[i].getAttributeValue(attr))) return cs[i];
+ }
+ return null;
+ }
+
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckRoleReferenceName.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckServletMappingName.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckServletMappingName.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckServletMappingName.java 2011-11-23 00:51:59 UTC (rev 36552)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.validation;
+
+import org.eclipse.osgi.util.NLS;
+import org.jboss.tools.common.model.*;
+import org.jboss.tools.common.validation.ValidationErrorManager;
+import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class CheckServletMappingName extends Check {
+ static String ATTR = "servlet-name"; //$NON-NLS-1$
+ boolean acceptEmpty = false;
+
+ public CheckServletMappingName(ValidationErrorManager manager, String preference, boolean acceptEmpty) {
+ super(manager, preference, ATTR);
+ this.acceptEmpty = acceptEmpty;
+ }
+
+ public void check(XModelObject object) {
+ String servletName = object.getAttributeValue(ATTR);
+ if(servletName == null) return;
+ if(servletName.length() == 0) {
+ if(acceptEmpty) return;
+ fireMessage(object, NLS.bind(WebXMLValidatorMessages.EMPTY, attr));
+ } else if(findServlet(object, servletName) == null) {
+ fireMessage(object, NLS.bind(WebXMLValidatorMessages.SERVLET_NOT_EXISTS, attr, servletName));
+ }
+ }
+
+ XModelObject findServlet(XModelObject mapping, String name) {
+ XModelObject webxml = WebAppHelper.getParentFile(mapping);
+ XModelObject[] cs = WebAppHelper.getServlets(webxml);
+ for (int i = 0; i < cs.length; i++) {
+ if(name.equals(cs[i].getAttributeValue(ATTR))) return cs[i];
+ }
+ return null;
+ }
+
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckServletMappingName.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java 2011-11-23 00:51:59 UTC (rev 36552)
@@ -0,0 +1,290 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.validation;
+
+import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.validation.internal.core.ValidationException;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.validation.ContextValidationHelper;
+import org.jboss.tools.common.validation.IProjectValidationContext;
+import org.jboss.tools.common.validation.IValidatingProjectSet;
+import org.jboss.tools.common.validation.IValidatingProjectTree;
+import org.jboss.tools.common.validation.IValidator;
+import org.jboss.tools.common.validation.ValidationErrorManager;
+import org.jboss.tools.common.validation.ValidatorManager;
+import org.jboss.tools.common.validation.internal.ProjectValidationContext;
+import org.jboss.tools.common.validation.internal.SimpleValidatingProjectTree;
+import org.jboss.tools.common.validation.internal.ValidatingProjectSet;
+import org.jboss.tools.common.web.WebUtils;
+import org.jboss.tools.jst.web.WebModelPlugin;
+import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class WebXMLCoreValidator extends ValidationErrorManager implements IValidator {
+ public static final String ID = "org.jboss.tools.esb.validator.ESBCoreValidator"; //$NON-NLS-1$
+ public static final String PROBLEM_TYPE = "org.jboss.tools.jst.web.webxmlproblem"; //$NON-NLS-1$
+ public static final String PREFERENCE_PAGE_ID = "org.jboss.tools.jst.web.ui.WebXMLValidatorPreferencePage"; //$NON-NLS-1$
+
+ public static String SHORT_ID = "verification"; //$NON-NLS-1$
+
+ static String XML_EXT = ".xml"; //$NON-NLS-1$
+
+ String projectName;
+ Map<IProject, IProjectValidationContext> contexts = new HashMap<IProject, IProjectValidationContext>();
+
+ Map<String, Set<Check>> checks = new HashMap<String, Set<Check>>();
+
+ public WebXMLCoreValidator() {
+ createChecks();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getPreference(org.eclipse.core.resources.IProject, java.lang.String)
+ */
+ @Override
+ protected String getPreference(IProject project, String preferenceKey) {
+ return WebXMLPreferences.getInstance().getProjectPreference(project, preferenceKey);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMaxNumberOfMarkersPerFile(org.eclipse.core.resources.IProject)
+ */
+ @Override
+ public int getMaxNumberOfMarkersPerFile(IProject project) {
+ return WebXMLPreferences.getMaxNumberOfProblemMarkersPerFile(project);
+ }
+
+ private void addCheck(Check check, String... entities) {
+ for (String entity: entities) {
+ Set<Check> cs = checks.get(entity);
+ if(cs == null) {
+ cs = new HashSet<Check>();
+ checks.put(entity, cs);
+ }
+ cs.add(check);
+ }
+ }
+
+ void createChecks() {
+ addCheck(new CheckClass(this, WebXMLPreferences.INVALID_EXCEPTION_TYPE, "exception-type", false, null, "java.lang.Exception"),
+ "WebAppErrorPage");
+ addCheck(new CheckClass(this, WebXMLPreferences.INVALID_FILTER_CLASS, "filter-class"),
+ WebAppHelper.FILTER_ENTITY, WebAppHelper.FILTER_30_ENTITY);
+ addCheck(new CheckClass(this, WebXMLPreferences.INVALID_SERVLET_CLASS, "servlet-class", false, "javax.servlet.Servlet", null),
+ WebAppHelper.SERVLET_ENTITY, WebAppHelper.SERVLET_30_ENTITY);
+ addCheck(new CheckClass(this, WebXMLPreferences.INVALID_LISTENER_CLASS, "listener-class"),
+ WebAppHelper.LISTENER_ENTITY, WebAppHelper.LISTENER_24_ENTITY);
+ addCheck(new CheckClass(this, WebXMLPreferences.INVALID_EXCEPTION_TYPE, "res-type"),
+ "WebAppResourceRef");
+ addCheck(new CheckClass(this, WebXMLPreferences.INVALID_MESSAGE_DESTINATION_TYPE, "message-destination-type"),
+ "WebAppMessageDestinationRef");
+
+ addCheck(new CheckResource(this, WebXMLPreferences.INVALID_TAGLIB_REF, "taglib-location", false, ".tld", WebXMLValidatorMessages.PATH_NOT_TAGLIB),
+ WebAppHelper.TAGLIB_ENTITY);
+ addCheck(new CheckResource(this, WebXMLPreferences.INVALID_WELCOME_FILE_REF, "file name", false, ".jsp .html .htm .jspx", WebXMLValidatorMessages.PATH_NOT_PAGE),
+ "WebAppWelcomFile");
+ addCheck(new CheckResource(this, WebXMLPreferences.INVALID_ERROR_PAGE_REF, "location", false, null, null),
+ "WebAppErrorPage");
+ addCheck(new CheckResource(this, WebXMLPreferences.INVALID_FORM_ERROR_PAGE_REF, "form-error-page"),
+ "WebAppLoginConfig");
+ addCheck(new CheckResource(this, WebXMLPreferences.INVALID_FORM_LOGIN_PAGE_REF, "form-login-page"),
+ "WebAppLoginConfig");
+ addCheck(new CheckResource(this, WebXMLPreferences.INVALID_JSP_FILE_REF, "jsp-file"),
+ WebAppHelper.SERVLET_ENTITY, WebAppHelper.SERVLET_30_ENTITY);
+ addCheck(new CheckResource(this, WebXMLPreferences.INVALID_ICON_REF, "small-icon", true, ".jpg .gif .png", WebXMLValidatorMessages.PATH_NOT_ICON),
+ WebAppHelper.SERVLET_ENTITY, WebAppHelper.SERVLET_30_ENTITY, WebAppHelper.FILTER_ENTITY, WebAppHelper.FILTER_30_ENTITY, "FileWebApp", "FileWebApp24", "FileWebApp25", "FileWebApp30");
+ addCheck(new CheckResource(this, WebXMLPreferences.INVALID_ICON_REF, "large-icon", true, ".jpg .gif .png", WebXMLValidatorMessages.PATH_NOT_ICON),
+ WebAppHelper.SERVLET_ENTITY, WebAppHelper.SERVLET_30_ENTITY, WebAppHelper.FILTER_ENTITY, WebAppHelper.FILTER_30_ENTITY, "FileWebApp", "FileWebApp24", "FileWebApp25", "FileWebApp30");
+
+ addCheck(new CheckServletMappingName(this, WebXMLPreferences.INVALID_SERVLET_REF, false),
+ WebAppHelper.SERVLET_MAPPING_ENTITY);
+ addCheck(new CheckServletMappingName(this, WebXMLPreferences.INVALID_SERVLET_REF, true),
+ WebAppHelper.FILTER_MAPPING_ENTITY, WebAppHelper.FILTER_MAPPING_24_ENTITY);
+ addCheck(new CheckFilterMappingName(this, WebXMLPreferences.INVALID_FILTER_REF),
+ WebAppHelper.FILTER_MAPPING_ENTITY, WebAppHelper.FILTER_MAPPING_24_ENTITY);
+ addCheck(new CheckRoleReferenceName(this, WebXMLPreferences.INVALID_ROLE_REF, "role-link"),
+ "WebAppSecurityRoleRef");
+ addCheck(new CheckRoleReferenceName(this, WebXMLPreferences.INVALID_ROLE_REF, "role-name"),
+ "WebAppRunAs", "WebAppRoleName");
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMarkerType()
+ */
+ @Override
+ public String getMarkerType() {
+ return PROBLEM_TYPE;
+ }
+
+ public String getId() {
+ return ID;
+ }
+
+ public String getBuilderId() {
+ return null;
+ }
+
+ public IValidatingProjectTree getValidatingProjects(IProject project) {
+ IProjectValidationContext rootContext = contexts.get(project);
+ if(rootContext == null) {
+ rootContext = new ProjectValidationContext();
+ contexts.put(project, rootContext);
+ }
+
+ Set<IProject> projects = new HashSet<IProject>();
+ projects.add(project);
+
+ IValidatingProjectSet projectSet = new ValidatingProjectSet(project, projects, rootContext);
+ return new SimpleValidatingProjectTree(projectSet);
+ }
+
+ public boolean shouldValidate(IProject project) {
+ if(!project.isAccessible()) {
+ return false;
+ }
+
+ try {
+ IFacetedProject fp = ProjectFacetsManager.create(project);
+ IProjectFacet f = ProjectFacetsManager.getProjectFacet("jst.web");
+ if(fp != null && f != null && fp.getInstalledVersion(f) != null) {
+ return true;
+ }
+ } catch (CoreException e) {
+ WebModelPlugin.getDefault().logError(e);
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#init(org.eclipse.core.resources.IProject, org.jboss.tools.jst.web.kb.internal.validation.ContextValidationHelper, org.jboss.tools.jst.web.kb.validation.IProjectValidationContext, org.eclipse.wst.validation.internal.provisional.core.IValidator, org.eclipse.wst.validation.internal.provisional.core.IReporter)
+ */
+ @Override
+ public void init(IProject project, ContextValidationHelper validationHelper, IProjectValidationContext context, org.eclipse.wst.validation.internal.provisional.core.IValidator manager, IReporter reporter) {
+ super.init(project, validationHelper, context, manager, reporter);
+ projectName = project.getName();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.validation.IValidator#validate(java.util.Set, org.eclipse.core.resources.IProject, org.jboss.tools.jst.web.kb.internal.validation.ContextValidationHelper, org.jboss.tools.jst.web.kb.validation.IProjectValidationContext, org.jboss.tools.jst.web.kb.internal.validation.ValidatorManager, org.eclipse.wst.validation.internal.provisional.core.IReporter)
+ */
+ public IStatus validate(Set<IFile> changedFiles, IProject project,
+ ContextValidationHelper validationHelper, IProjectValidationContext context, ValidatorManager manager,
+ IReporter reporter) throws ValidationException {
+ init(project, validationHelper, context, manager, reporter);
+
+ for (IFile file: changedFiles) {
+ if(file.getName().endsWith(XML_EXT)) {
+ XModelObject o = EclipseResourceUtil.createObjectForResource(file);
+ if(o != null && o.getModelEntity().getName().startsWith("FileWebApp")) {
+ validateWebXMLFile(o, file);
+ }
+ }
+ }
+ return OK_STATUS;
+ }
+
+ private void validateWebXMLFile(XModelObject object, IFile file) {
+ validateObject(object);
+ }
+
+ private void validateObject(XModelObject object) {
+ String entity = object.getModelEntity().getName();
+ Set<Check> ch = checks.get(entity);
+ if(ch != null) {
+ for (Check c: ch) {
+ c.check(object);
+ }
+ }
+ XModelObject[] cs = object.getChildren();
+ for (XModelObject c: cs) {
+ validateObject(c);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.validation.IValidator#validateAll(org.eclipse.core.resources.IProject, org.jboss.tools.jst.web.kb.internal.validation.ContextValidationHelper, org.jboss.tools.jst.web.kb.validation.IProjectValidationContext, org.jboss.tools.jst.web.kb.internal.validation.ValidatorManager, org.eclipse.wst.validation.internal.provisional.core.IReporter)
+ */
+ public IStatus validateAll(IProject project,
+ ContextValidationHelper validationHelper, IProjectValidationContext context, ValidatorManager manager,
+ IReporter reporter) throws ValidationException {
+ init(project, validationHelper, context, manager, reporter);
+ displaySubtask(WebXMLValidatorMessages.VALIDATING_PROJECT, new String[]{projectName});
+
+ IPath webContentPath = WebUtils.getFirstWebContentPath(project);
+ IFolder webInf = null;
+ try {
+
+ // This code line never return null
+ webInf = project.getFolder(webContentPath.append("WEB-INF")); //$NON-NLS-1$
+ // so never check it for null
+ if(webInf.isAccessible()) {
+ IResource[] rs = webInf.members();
+ // exception is not required here because if esbContent is not exist control
+ // never gets here
+ for (IResource r: rs) {
+ if(r instanceof IFile) {
+ IFile file = (IFile)r;
+ String name = file.getName();
+ if(name.endsWith(XML_EXT)) {
+ XModelObject o = EclipseResourceUtil.createObjectForResource(file);
+ if(o != null && o.getModelEntity().getName().startsWith("FileWebApp")) {
+ validateWebXMLFile(o, file);
+ }
+ }
+ }
+ }
+ }
+ } catch (CoreException e) {
+ // hiding exceptions is the evil so lets return EROOR Status with exception
+ return new Status(IStatus.ERROR,WebModelPlugin.PLUGIN_ID,MessageFormat.format("Validation error for project {0}",project.getLocation().toString()),e);
+ }
+
+ return OK_STATUS;
+ }
+
+
+
+ public boolean isEnabled(IProject project) {
+ return WebXMLPreferences.isValidationEnabled(project);
+ }
+
+ @Override
+ protected String getPreferencePageId() {
+ return PREFERENCE_PAGE_ID;
+ }
+
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLPreferenceInitializer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLPreferenceInitializer.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLPreferenceInitializer.java 2011-11-23 00:51:59 UTC (rev 36552)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.validation;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.jboss.tools.common.preferences.SeverityPreferences;
+import org.jboss.tools.jst.web.WebModelPlugin;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class WebXMLPreferenceInitializer extends AbstractPreferenceInitializer {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+ */
+ @Override
+ public void initializeDefaultPreferences() {
+ IEclipsePreferences defaultPreferences = ((IScopeContext) new DefaultScope()).getNode(WebModelPlugin.PLUGIN_ID);
+ defaultPreferences.putBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, true);
+ for (String name : WebXMLPreferences.SEVERITY_OPTION_NAMES) {
+ defaultPreferences.put(name, SeverityPreferences.WARNING);
+ }
+ defaultPreferences.putInt(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, SeverityPreferences.DEFAULT_MAX_NUMBER_OF_MARKERS_PER_FILE);
+ }
+}
\ No newline at end of file
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLPreferenceInitializer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLPreferences.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLPreferences.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLPreferences.java 2011-11-23 00:51:59 UTC (rev 36552)
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.validation;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.resources.IProject;
+import org.jboss.tools.common.preferences.SeverityPreferences;
+import org.jboss.tools.jst.web.WebModelPlugin;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class WebXMLPreferences extends SeverityPreferences {
+
+ public static final Set<String> SEVERITY_OPTION_NAMES = new HashSet<String>();
+
+ private static WebXMLPreferences INSTANCE = new WebXMLPreferences();
+
+ //Class References group
+ public static final String INVALID_EXCEPTION_TYPE = INSTANCE.createSeverityOption("invalidExceptionType"); //$NON-NLS-1$
+ public static final String INVALID_FILTER_CLASS = INSTANCE.createSeverityOption("invalidFilterClass"); //$NON-NLS-1$
+ public static final String INVALID_LISTENER_CLASS = INSTANCE.createSeverityOption("invalidListenerClass"); //$NON-NLS-1$
+ public static final String INVALID_MESSAGE_DESTINATION_TYPE = INSTANCE.createSeverityOption("invalidMessageDestinationType"); //$NON-NLS-1$
+ public static final String INVALID_RES_TYPE = INSTANCE.createSeverityOption("invalidResType"); //$NON-NLS-1$
+ public static final String INVALID_SERVLET_CLASS = INSTANCE.createSeverityOption("invalidServletClass"); //$NON-NLS-1$
+
+ //Resource References group
+ public static final String INVALID_ERROR_PAGE_REF = INSTANCE.createSeverityOption("invalidErrorPageRef"); //$NON-NLS-1$
+ public static final String INVALID_FORM_ERROR_PAGE_REF = INSTANCE.createSeverityOption("invalidFormErrorPageRef"); //$NON-NLS-1$
+ public static final String INVALID_FORM_LOGIN_PAGE_REF = INSTANCE.createSeverityOption("invalidFormLoginPageRef"); //$NON-NLS-1$
+ public static final String INVALID_JSP_FILE_REF = INSTANCE.createSeverityOption("invalidJspFileRef"); //$NON-NLS-1$
+ public static final String INVALID_ICON_REF = INSTANCE.createSeverityOption("invalidIconRef"); //$NON-NLS-1$
+ public static final String INVALID_TAGLIB_REF = INSTANCE.createSeverityOption("invalidTaglibRef"); //$NON-NLS-1$
+ public static final String INVALID_WELCOME_FILE_REF = INSTANCE.createSeverityOption("invalidWelcomeFileRef"); //$NON-NLS-1$
+
+ //Object References group
+ public static final String INVALID_SERVLET_REF = INSTANCE.createSeverityOption("invalidServletRef"); //$NON-NLS-1$
+ public static final String INVALID_FILTER_REF = INSTANCE.createSeverityOption("invalidFilterRef"); //$NON-NLS-1$
+ public static final String INVALID_ROLE_REF = INSTANCE.createSeverityOption("invalidRoleRef"); //$NON-NLS-1$
+
+ /**
+ * @return the only instance of CDIPreferences
+ */
+ public static WebXMLPreferences getInstance() {
+ return INSTANCE;
+ }
+
+ private WebXMLPreferences() {
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.common.preferences.SeverityPreferences#createSeverityOption(java.lang.String)
+ */
+ @Override
+ protected String createSeverityOption(String shortName) {
+ String name = getPluginId() + ".validator.problem." + shortName; //$NON-NLS-1$
+ SEVERITY_OPTION_NAMES.add(name);
+ return name;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.common.preferences.SeverityPreferences#getPluginId()
+ */
+ @Override
+ protected String getPluginId() {
+ return WebModelPlugin.PLUGIN_ID;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.common.preferences.SeverityPreferences#getSeverityOptionNames()
+ */
+ @Override
+ protected Set<String> getSeverityOptionNames() {
+ return SEVERITY_OPTION_NAMES;
+ }
+
+ public static boolean shouldValidateCore(IProject project) {
+ return true;
+ }
+
+ public static boolean isValidationEnabled(IProject project) {
+ return INSTANCE.isEnabled(project);
+ }
+
+ public static int getMaxNumberOfProblemMarkersPerFile(IProject project) {
+ return INSTANCE.getMaxNumberOfProblemMarkersPerResource(project);
+ }
+}
\ No newline at end of file
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLPreferences.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLValidatorMessages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLValidatorMessages.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLValidatorMessages.java 2011-11-23 00:51:59 UTC (rev 36552)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.validation;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class WebXMLValidatorMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.jst.web.validation.messages"; //$NON-NLS-1$
+
+ public static String WEB_XML_PLUGIN_NO_MESSAGE;
+
+ public static String VALIDATING_RESOURCE;
+ public static String VALIDATING_PROJECT;
+
+ public static String PATH_EMPTY;
+ public static String PATH_NOT_EXISTS;
+ public static String PATH_NOT_TAGLIB;
+ public static String PATH_NOT_ICON;
+ public static String PATH_NOT_PAGE;
+
+ public static String CLASS_NOT_EXISTS;
+ public static String CLASS_NOT_IMPLEMENTS;
+ public static String CLASS_NOT_EXTENDS;
+ public static String CLASS_NOT_VALID;
+
+ public static String EMPTY;
+ public static String SERVLET_NOT_EXISTS;
+ public static String FILTER_NOT_EXISTS;
+ public static String ROLE_NOT_EXISTS;
+
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, WebXMLValidatorMessages.class);
+ }
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLValidatorMessages.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/messages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/messages.properties (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/messages.properties 2011-11-23 00:51:59 UTC (rev 36552)
@@ -0,0 +1,17 @@
+WEB_XML_PLUGIN_NO_MESSAGE=No message
+VALIDATING_RESOURCE=project "{0}"; resource "{1}"
+VALIDATING_PROJECT=project "{0}"
+
+PATH_EMPTY=Attribute {0} is empty
+PATH_NOT_EXISTS=Attribute {0} references to {1} that does not exist in web content
+PATH_NOT_TAGLIB=Attribute {0} references to {1} that is not tag library
+PATH_NOT_ICON=Attribute {0} references to {1} that is not an icon file
+PATH_NOT_PAGE=Attribute {0} references to {1} that is not a page file
+CLASS_NOT_EXISTS=Attribute {0} references to non-existent class {1}
+CLASS_NOT_IMPLEMENTS=Attribute {0} references to {1} that does not implement interface {2}
+CLASS_NOT_EXTENDS=Attribute {0} references to {1} that does not extend {2}
+CLASS_NOT_VALID=Attribute {0} must be valid fully qualified class name
+EMPTY=Attribute {0} is empty
+SERVLET_NOT_EXISTS=Attribute {0} references to {1} that is not a servlet
+FILTER_NOT_EXISTS=Attribute {0} references to {1} that is not a filter
+ROLE_NOT_EXISTS=Attribute {0} references to {1} that is not a role
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/messages.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 4 months