blob: 985e3dd627cf6f46ace25729b411244abf4d4fa5 [file] [log] [blame]
csalterddac3492005-02-11 03:56:53 +00001/*******************************************************************************
2 * Copyright (c) 2001, 2004 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11
david_williamsf3680f02005-04-13 22:43:54 +000012package org.eclipse.wst.xml.ui.internal.validation;
csalterddac3492005-02-11 03:56:53 +000013
david_williams49d24fb2005-04-08 21:16:59 +000014import org.eclipse.wst.validation.internal.provisional.ValidationFactory;
15import org.eclipse.wst.validation.internal.provisional.core.IValidator;
david_williams52efb562005-10-17 02:55:00 +000016import org.eclipse.wst.xml.ui.internal.Logger;
csalterddac3492005-02-11 03:56:53 +000017
18/**
19 * @author Mark Hutchinson
david_williams43271672005-04-01 05:19:26 +000020 *
csalterddac3492005-02-11 03:56:53 +000021 */
david_williams43271672005-04-01 05:19:26 +000022public class DelegatingSourceValidatorForXML extends DelegatingSourceValidator {
csalter3a7dd142005-06-29 21:33:48 +000023 private final static String VALIDATOR_CLASS = "org.eclipse.wst.xml.ui.internal.validation.Validator"; //$NON-NLS-1$
david_williams43271672005-04-01 05:19:26 +000024
25 public DelegatingSourceValidatorForXML() {
26 super();
27 }
28
29 protected IValidator getDelegateValidator() {
david_williams52efb562005-10-17 02:55:00 +000030 IValidator result = null;
david_williams43271672005-04-01 05:19:26 +000031 try {
david_williams52efb562005-10-17 02:55:00 +000032 result = ValidationFactory.instance.getValidator(VALIDATOR_CLASS);
david_williams43271672005-04-01 05:19:26 +000033 }
david_williams52efb562005-10-17 02:55:00 +000034 catch (InstantiationException e) {
35 Logger.logException(e);
david_williams43271672005-04-01 05:19:26 +000036 }
david_williams52efb562005-10-17 02:55:00 +000037 return result;
david_williams43271672005-04-01 05:19:26 +000038 }
csalterddac3492005-02-11 03:56:53 +000039}