diff options
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ConverterValidationVisitor.java')
-rw-r--r-- | jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ConverterValidationVisitor.java | 98 |
1 files changed, 0 insertions, 98 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ConverterValidationVisitor.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ConverterValidationVisitor.java deleted file mode 100644 index d46999c5e..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/validation/internal/appconfig/ConverterValidationVisitor.java +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2006 Oracle 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: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.jsf.validation.internal.appconfig; - -import java.util.List; - -import org.eclipse.core.resources.IFile; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.jst.jsf.facesconfig.emf.ConverterClassType; -import org.eclipse.jst.jsf.facesconfig.emf.ConverterForClassType; -import org.eclipse.jst.jsf.facesconfig.emf.FacesConfigPackage; - -/** - * Validates the converter - */ -public class ConverterValidationVisitor extends EObjectValidationVisitor -{ - - /** - * @param version - */ - public ConverterValidationVisitor(final String version) - { - super(FacesConfigPackage.eINSTANCE.getFacesConfigType_Converter(), - version); - } - - protected void doValidate(EObject object, List messages, IFile file) { - // nothing in the tag to validate - } - - protected EObjectValidationVisitor[] getChildNodeValidators() { - return new EObjectValidationVisitor[] - { - new ConverterClassValidationVisitor(getVersion()) - , new AttributeValidationVisitor(FacesConfigPackage.eINSTANCE.getConverterType_Attribute(), getVersion()) - , new PropertyValidationVisitor - (FacesConfigPackage.eINSTANCE.getConverterType_Property() - ,FacesConfigPackage.eINSTANCE.getConverterType_ConverterClass() - ,getVersion()) - , new ConverterForClassValidationVisitor(getVersion()) - }; - } - - private static class ConverterClassValidationVisitor extends ClassNameEObjectValidationVisitor - { - ConverterClassValidationVisitor(final String version) - { - super(FacesConfigPackage.eINSTANCE.getConverterType_ConverterClass(), - version); - } - - protected String getFullyQualifiedName(EObject eobj) - { - return ((ConverterClassType)eobj).getTextContent(); - } - - protected String getInstanceOf() { - return "javax.faces.convert.Converter"; - } - - protected EObjectValidationVisitor[] getChildNodeValidators() { - return NO_CHILDREN; - } - } - - private static class ConverterForClassValidationVisitor extends ClassNameEObjectValidationVisitor - { - ConverterForClassValidationVisitor(final String version) - { - super(FacesConfigPackage.eINSTANCE.getConverterType_ConverterForClass(), - version); - } - - protected String getFullyQualifiedName(EObject eobj) - { - return ((ConverterForClassType)eobj).getTextContent(); - } - - protected String getInstanceOf() { - // no instanceof enforcement - return null; - } - - protected EObjectValidationVisitor[] getChildNodeValidators() { - return NO_CHILDREN; - } - } - -} |