| /******************************************************************************* |
| * Copyright (c) 2000, 2003 IBM Corporation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Common Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/cpl-v10.html |
| * |
| * Contributors: |
| * IBM Corporation - initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.jsp.launching; |
| |
| import java.util.List; |
| |
| import org.eclipse.debug.core.ILaunchConfiguration; |
| import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; |
| import org.eclipse.jdt.debug.ui.launchConfigurations.JavaSourceLookupTab; |
| import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants; |
| |
| /** |
| * A source locator tab for a Tomcat launch confiugration |
| */ |
| public class TomcatSourceLookupTab extends JavaSourceLookupTab { |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) |
| */ |
| public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { |
| configuration.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, TomcatSourceLocator.ID_TOMCAT_SOURCE_LOCATOR); |
| configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_SOURCE_PATH, (String)null); |
| configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_SOURCE_PATH, (List)null); |
| } |
| |
| /** |
| * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(ILaunchConfigurationWorkingCopy) |
| */ |
| public void performApply(ILaunchConfigurationWorkingCopy configuration) { |
| super.performApply(configuration); |
| configuration.setAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, TomcatSourceLocator.ID_TOMCAT_SOURCE_LOCATOR); |
| } |
| } |