| /******************************************************************************* |
| * Copyright (c) 2005, 2017 IBM Corporation and others. |
| * This program and the accompanying materials are made available under the |
| * terms of the Eclipse Public License v. 2.0 which is available at |
| * http://www.eclipse.org/legal/epl-2.0. |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| *******************************************************************************/ |
| package org.eclipse.dltk.debug.ui.launchConfigurations; |
| |
| import org.eclipse.debug.core.ILaunchConfiguration; |
| import org.eclipse.debug.ui.AbstractLaunchConfigurationTab; |
| |
| public abstract class CommonScriptLaunchTab |
| extends AbstractLaunchConfigurationTab { |
| |
| /** |
| * Config being modified |
| */ |
| private ILaunchConfiguration fLaunchConfig; |
| |
| /** |
| * Returns the launch configuration this tab was initialized from. |
| * |
| * @return launch configuration this tab was initialized from |
| */ |
| protected ILaunchConfiguration getCurrentLaunchConfiguration() { |
| return fLaunchConfig; |
| } |
| |
| /** |
| * Sets the launch configuration this tab was initialized from |
| * |
| * @param config |
| * launch configuration this tab was initialized from |
| */ |
| private void setCurrentLaunchConfiguration(ILaunchConfiguration config) { |
| fLaunchConfig = config; |
| } |
| |
| /** |
| * Subclasses may override this method and should call |
| * super.initializeFrom(...). |
| */ |
| @Override |
| public void initializeFrom(ILaunchConfiguration config) { |
| setCurrentLaunchConfiguration(config); |
| } |
| } |