]> git.argeo.org Git - gpl/argeo-slc.git/blob - OsgiBootLauncherTabGroup.java
48d9268f03f302db801da6c463052bf3f646d5f0
[gpl/argeo-slc.git] / OsgiBootLauncherTabGroup.java
1 package org.argeo.slc.ide.ui.launch.osgi;
2
3 import org.eclipse.core.runtime.CoreException;
4 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
5 import org.eclipse.debug.ui.CommonTab;
6 import org.eclipse.debug.ui.EnvironmentTab;
7 import org.eclipse.debug.ui.ILaunchConfigurationDialog;
8 import org.eclipse.debug.ui.ILaunchConfigurationTab;
9 import org.eclipse.pde.ui.launcher.BundlesTab;
10 import org.eclipse.pde.ui.launcher.OSGiLauncherTabGroup;
11 import org.eclipse.pde.ui.launcher.OSGiSettingsTab;
12 import org.eclipse.pde.ui.launcher.TracingTab;
13
14 public class OsgiBootLauncherTabGroup extends OSGiLauncherTabGroup {
15
16 @Override
17 public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
18 // JavaArgumentsTab javaArgumentsTab = new JavaArgumentsTab() {
19 // private boolean initializing = false;
20 //
21 // @Override
22 // public void performApply(
23 // ILaunchConfigurationWorkingCopy configuration) {
24 // if (initializing)
25 // return;
26 // initializing = true;
27 // initializeFrom(configuration);
28 // initializing = false;
29 // }
30 //
31 // @Override
32 // public boolean isValid(ILaunchConfiguration config) {
33 // return true;
34 // }
35 // };
36
37 ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
38 new OsgiBootMainTab(),
39 new BundlesTab() {
40 private boolean activating = false;
41
42 @Override
43 public void performApply(
44 ILaunchConfigurationWorkingCopy config) {
45 super.performApply(config);
46 if (activating) {
47 try {
48 config.doSave();
49 } catch (CoreException e) {
50 e.printStackTrace();
51 }
52 activating = false;
53 }
54 }
55
56 @Override
57 public void activated(
58 ILaunchConfigurationWorkingCopy workingCopy) {
59 activating = true;
60 }
61 }, new OSGiSettingsTab(), new EnvironmentTab(),
62 new TracingTab(), new CommonTab() };
63 setTabs(tabs);
64 }
65
66 }