| /******************************************************************************* |
| * Copyright (c) 2003, 2004 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.ws.internal.variable.initializers; |
| |
| import java.net.URL; |
| |
| import org.eclipse.core.runtime.IPluginDescriptor; |
| |
| |
| public class XercesAPIVariableInitializer extends WebServiceClasspathVariableInitializer { |
| public static final String XERCES_API_VARIABLE = "XERCES_API_JAR"; //$NON-NLS-1$ |
| public static final String XERCES_API_JAR = "xmlParserAPIs.jar"; //$NON-NLS-1$ |
| /** |
| * |
| */ |
| public XercesAPIVariableInitializer() { |
| super(); |
| } |
| |
| public void initialize(String variable) { |
| IPluginDescriptor descr = getXercesPluginDescriptor(); |
| if (descr == null) |
| return; |
| URL installURL = descr.getInstallURL(); |
| //setup the xercesAPI.jar variable |
| URL varURL = appendURL(installURL, XERCES_API_JAR); |
| if (varURL != null) |
| setClasspathVariable(XERCES_API_VARIABLE, createPath(varURL)); |
| } |
| } |