csalter | ddac349 | 2005-02-11 03:56:53 +0000 | [diff] [blame] | 1 | /******************************************************************************* |
| 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_williams | f3680f0 | 2005-04-13 22:43:54 +0000 | [diff] [blame] | 12 | package org.eclipse.wst.xml.ui.internal.validation; |
csalter | ddac349 | 2005-02-11 03:56:53 +0000 | [diff] [blame] | 13 | |
david_williams | 49d24fb | 2005-04-08 21:16:59 +0000 | [diff] [blame] | 14 | import org.eclipse.wst.validation.internal.provisional.ValidationFactory; |
| 15 | import org.eclipse.wst.validation.internal.provisional.core.IValidator; |
david_williams | 52efb56 | 2005-10-17 02:55:00 +0000 | [diff] [blame] | 16 | import org.eclipse.wst.xml.ui.internal.Logger; |
csalter | ddac349 | 2005-02-11 03:56:53 +0000 | [diff] [blame] | 17 | |
| 18 | /** |
| 19 | * @author Mark Hutchinson |
david_williams | 4327167 | 2005-04-01 05:19:26 +0000 | [diff] [blame] | 20 | * |
csalter | ddac349 | 2005-02-11 03:56:53 +0000 | [diff] [blame] | 21 | */ |
david_williams | 4327167 | 2005-04-01 05:19:26 +0000 | [diff] [blame] | 22 | public class DelegatingSourceValidatorForXML extends DelegatingSourceValidator { |
csalter | 3a7dd14 | 2005-06-29 21:33:48 +0000 | [diff] [blame] | 23 | private final static String VALIDATOR_CLASS = "org.eclipse.wst.xml.ui.internal.validation.Validator"; //$NON-NLS-1$ |
david_williams | 4327167 | 2005-04-01 05:19:26 +0000 | [diff] [blame] | 24 | |
| 25 | public DelegatingSourceValidatorForXML() { |
| 26 | super(); |
| 27 | } |
| 28 | |
| 29 | protected IValidator getDelegateValidator() { |
david_williams | 52efb56 | 2005-10-17 02:55:00 +0000 | [diff] [blame] | 30 | IValidator result = null; |
david_williams | 4327167 | 2005-04-01 05:19:26 +0000 | [diff] [blame] | 31 | try { |
david_williams | 52efb56 | 2005-10-17 02:55:00 +0000 | [diff] [blame] | 32 | result = ValidationFactory.instance.getValidator(VALIDATOR_CLASS); |
david_williams | 4327167 | 2005-04-01 05:19:26 +0000 | [diff] [blame] | 33 | } |
david_williams | 52efb56 | 2005-10-17 02:55:00 +0000 | [diff] [blame] | 34 | catch (InstantiationException e) { |
| 35 | Logger.logException(e); |
david_williams | 4327167 | 2005-04-01 05:19:26 +0000 | [diff] [blame] | 36 | } |
david_williams | 52efb56 | 2005-10-17 02:55:00 +0000 | [diff] [blame] | 37 | return result; |
david_williams | 4327167 | 2005-04-01 05:19:26 +0000 | [diff] [blame] | 38 | } |
csalter | ddac349 | 2005-02-11 03:56:53 +0000 | [diff] [blame] | 39 | } |