KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > ui > launcher > OSGiLauncherTabGroup


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 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 package org.eclipse.pde.ui.launcher;
12
13 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
14 import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
15 import org.eclipse.debug.ui.CommonTab;
16 import org.eclipse.debug.ui.EnvironmentTab;
17 import org.eclipse.debug.ui.ILaunchConfigurationDialog;
18 import org.eclipse.debug.ui.ILaunchConfigurationTab;
19 import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;
20 import org.eclipse.pde.internal.ui.PDEPlugin;
21 import org.eclipse.pde.internal.ui.launcher.OSGiFrameworkManager;
22
23 /**
24  * Creates and initializes the tabs on the OSGi Framework launch configuration.
25  * <p>
26  * Clients may subclass this class.
27  * </p>
28  * @since 3.3
29  */

30 public class OSGiLauncherTabGroup extends AbstractLaunchConfigurationTabGroup {
31
32     /*
33      * (non-Javadoc)
34      * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#createTabs(org.eclipse.debug.ui.ILaunchConfigurationDialog, java.lang.String)
35      */

36     public void createTabs(ILaunchConfigurationDialog dialog, String JavaDoc mode) {
37         ILaunchConfigurationTab[] tabs =
38             new ILaunchConfigurationTab[]{
39                 new BundlesTab(),
40                 new JavaArgumentsTab(),
41                 new OSGiSettingsTab(),
42                 new TracingTab(),
43                 new EnvironmentTab(),
44                 new CommonTab()};
45         setTabs(tabs);
46     }
47     
48     /**
49      * Configures defaults on newly created launch configurations.
50      * This function also passes the launch configuration copy to the default
51      * registered OSGi framework, giving it an opportunity to initialize and override
52      * more defaults on the launch configuration.
53      * Refer to the <code>org.eclipse.pde.core.osgiFrameworks</code> extension point for more details
54      * on OSGi frameworks.
55      *
56      * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
57      */

58     public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
59         super.setDefaults(configuration);
60         OSGiFrameworkManager manager = PDEPlugin.getDefault().getOSGiFrameworkManager();
61         manager.getDefaultInitializer().initialize(configuration);
62     }
63
64 }
65
Popular Tags