]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootLauncherTabGroup.java
git-svn-id: https://svn.argeo.org/slc/trunk@4431 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc
[gpl/argeo-slc.git] / eclipse / plugins / org.argeo.slc.ide.ui / src / main / java / org / argeo / slc / ide / ui / launch / osgi / OsgiBootLauncherTabGroup.java
index bcbeccd89f9c379e9dd03188480fd98595281e11..de3b20cafbc9a574cd6af4d59466cffb4183c558 100644 (file)
@@ -1,17 +1,66 @@
 package org.argeo.slc.ide.ui.launch.osgi;
 
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.ui.CommonTab;
+import org.eclipse.debug.ui.EnvironmentTab;
 import org.eclipse.debug.ui.ILaunchConfigurationDialog;
 import org.eclipse.debug.ui.ILaunchConfigurationTab;
-import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;
+import org.eclipse.pde.ui.launcher.BundlesTab;
 import org.eclipse.pde.ui.launcher.OSGiLauncherTabGroup;
 import org.eclipse.pde.ui.launcher.OSGiSettingsTab;
+import org.eclipse.pde.ui.launcher.TracingTab;
 
+/** Definition of the set of tabs used in OSGiBoot launch configuration UI. */
 public class OsgiBootLauncherTabGroup extends OSGiLauncherTabGroup {
 
        @Override
        public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+               // JavaArgumentsTab javaArgumentsTab = new JavaArgumentsTab() {
+               // private boolean initializing = false;
+               //
+               // @Override
+               // public void performApply(
+               // ILaunchConfigurationWorkingCopy configuration) {
+               // if (initializing)
+               // return;
+               // initializing = true;
+               // initializeFrom(configuration);
+               // initializing = false;
+               // }
+               //
+               // @Override
+               // public boolean isValid(ILaunchConfiguration config) {
+               // return true;
+               // }
+               // };
+
                ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
-                               new JavaArgumentsTab(), new OSGiSettingsTab() };
+                               new OsgiBootMainTab(),
+                               new BundlesTab() {
+                                       private boolean activating = false;
+
+                                       @Override
+                                       public void performApply(
+                                                       ILaunchConfigurationWorkingCopy config) {
+                                               super.performApply(config);
+                                               if (activating) {
+                                                       try {
+                                                               config.doSave();
+                                                       } catch (CoreException e) {
+                                                               e.printStackTrace();
+                                                       }
+                                                       activating = false;
+                                               }
+                                       }
+
+                                       @Override
+                                       public void activated(
+                                                       ILaunchConfigurationWorkingCopy workingCopy) {
+                                               activating = true;
+                                       }
+                               }, new OSGiSettingsTab(), new EnvironmentTab(),
+                               new TracingTab(), new CommonTab() };
                setTabs(tabs);
        }