Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/core')
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/core/internal/validation/xmlerrorcustomization/J2EEErrorMessageCustomizer.java58
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/core/internal/validation/xmlerrorcustomization/J2EEXMLCustomValidationMessages.java34
-rw-r--r--plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/core/internal/validation/xmlerrorcustomization/j2eexmlcustomvalidation.properties14
3 files changed, 0 insertions, 106 deletions
diff --git a/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/core/internal/validation/xmlerrorcustomization/J2EEErrorMessageCustomizer.java b/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/core/internal/validation/xmlerrorcustomization/J2EEErrorMessageCustomizer.java
deleted file mode 100644
index a1aeae1b2..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/core/internal/validation/xmlerrorcustomization/J2EEErrorMessageCustomizer.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.core.internal.validation.xmlerrorcustomization;
-
-import java.util.Iterator;
-
-import org.eclipse.wst.xml.core.internal.validation.errorcustomization.ElementInformation;
-import org.eclipse.wst.xml.core.internal.validation.errorcustomization.IErrorMessageCustomizer;
-
-/**
- * A J2EE message customizer for the XML validator. This error customizer will
- * customize errors on application.xml.
- */
-public class J2EEErrorMessageCustomizer implements IErrorMessageCustomizer {
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.xml.core.internal.validation.errorcustomization.IErrorMessageCustomizer#customizeMessage(org.eclipse.wst.xml.core.internal.validation.errorcustomization.ElementInformation, java.lang.String, java.lang.Object[])
- */
- public String customizeMessage(ElementInformation elementInfo, String errorKey, Object[] arguments) {
- if ("cvc-complex-type.2.4.a".equals(errorKey) || "cvc-complex-type.2.4.b".equals(errorKey)) { //$NON-NLS-1$ //$NON-NLS-2$
- if ("application".equals(elementInfo.getLocalname())) { //$NON-NLS-1$
- boolean applicationHasModule = false;
- for (Iterator i = elementInfo.getChildren().iterator(); i.hasNext();) {
- ElementInformation child = (ElementInformation) i.next();
- if ("module".equals(child.getLocalname())) { //$NON-NLS-1$
- applicationHasModule = true;
- break;
- }
- }
- if (!applicationHasModule) {
- return J2EEXMLCustomValidationMessages.J2EE_APPLICATION_ONE_OR_MORE_MODULES;
- }
- }
- if ("ejb-jar".equals(elementInfo.getLocalname())) { //$NON-NLS-1$
- boolean ejbHasBeans = false;
- for (Iterator i = elementInfo.getChildren().iterator(); i.hasNext();) {
- ElementInformation child = (ElementInformation) i.next();
- if ("enterprise-beans".equals(child.getLocalname())) { //$NON-NLS-1$
- ejbHasBeans = true;
- break;
- }
- }
- if (!ejbHasBeans) {
- return J2EEXMLCustomValidationMessages.EJB_ONE_OR_MORE_BEANS;
- }
- }
- }
- return null;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/core/internal/validation/xmlerrorcustomization/J2EEXMLCustomValidationMessages.java b/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/core/internal/validation/xmlerrorcustomization/J2EEXMLCustomValidationMessages.java
deleted file mode 100644
index 95833586c..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/core/internal/validation/xmlerrorcustomization/J2EEXMLCustomValidationMessages.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are 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:
- * IBM - Initial API and implementation
- *
- * /
- *******************************************************************************/
-package org.eclipse.jst.j2ee.core.internal.validation.xmlerrorcustomization;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Strings used by XML Validation
- */
-public class J2EEXMLCustomValidationMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.jst.j2ee.core.internal.validation.xmlerrorcustomization.j2eexmlcustomvalidation";//$NON-NLS-1$
-
- public static String J2EE_APPLICATION_ONE_OR_MORE_MODULES;
- public static String EJB_ONE_OR_MORE_BEANS;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, J2EEXMLCustomValidationMessages.class);
- }
-
- private J2EEXMLCustomValidationMessages() {
- // cannot create new instance
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/core/internal/validation/xmlerrorcustomization/j2eexmlcustomvalidation.properties b/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/core/internal/validation/xmlerrorcustomization/j2eexmlcustomvalidation.properties
deleted file mode 100644
index 094c307b0..000000000
--- a/plugins/org.eclipse.jst.j2ee.core/j2ee-validation/org/eclipse/jst/j2ee/core/internal/validation/xmlerrorcustomization/j2eexmlcustomvalidation.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are 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:
-# IBM Corporation - initial API and implementation
-###############################################################################
-!-- Constants for strings
-
-J2EE_APPLICATION_ONE_OR_MORE_MODULES = A J2EE Enterprise Application must contain one or more modules.
-EJB_ONE_OR_MORE_BEANS=An EJB module must contain one or more enterprise beans.

Back to the top