]> git.argeo.org Git - gpl/argeo-slc.git/commitdiff
Bypass simple configurator if found
authorMathieu Baudier <mbaudier@argeo.org>
Mon, 2 Aug 2010 19:28:31 +0000 (19:28 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Mon, 2 Aug 2010 19:28:31 +0000 (19:28 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk@3750 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootEquinoxLaunchConfiguration.java
eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiLaunchHelper.java

index 6d1ebaf8b98281d310546ae889ac44e0d55d58cf..1f39aac0ad58d01022319f49f85de9e4a78708c5 100644 (file)
@@ -9,6 +9,7 @@ import org.eclipse.debug.core.ILaunch;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.pde.ui.launcher.EquinoxLaunchConfiguration;
+import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
 
 /** OSGiBoot launch configuration. */
 public class OsgiBootEquinoxLaunchConfiguration extends
@@ -20,6 +21,14 @@ public class OsgiBootEquinoxLaunchConfiguration extends
        public void launch(ILaunchConfiguration configuration, String mode,
                        ILaunch launch, IProgressMonitor monitor) throws CoreException {
                super.launch(configuration, mode, launch, monitor);
+
+               System.out.println("targetBundles="
+                               + configuration.getAttribute(
+                                               IPDELauncherConstants.TARGET_BUNDLES, ""));
+               System.out.println("workspaceBundles="
+                               + configuration.getAttribute(
+                                               IPDELauncherConstants.WORKSPACE_BUNDLES, ""));
+
                // Refresh resources before launching
                final IFile propertiesFile = (IFile) configuration.getMappedResources()[0];
                propertiesFile.getParent().refreshLocal(IResource.DEPTH_INFINITE,
index 6866f3dc41e7ae60f1b22833e6090d584951533d..ee01f02a2d2eaf0c3d27b81c278f2b07298b47b4 100644 (file)
@@ -34,9 +34,11 @@ import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.pde.core.plugin.IPluginModelBase;
 import org.eclipse.pde.core.plugin.PluginRegistry;
+import org.eclipse.pde.internal.build.IPDEBuildConstants;
 import org.eclipse.pde.ui.launcher.IPDELauncherConstants;
 import org.eclipse.swt.widgets.Shell;
 
+@SuppressWarnings("restriction")
 public class OsgiLaunchHelper implements OsgiLauncherConstants {
        private static Boolean debug = false;
 
@@ -279,10 +281,16 @@ public class OsgiLaunchHelper implements OsgiLauncherConstants {
                                bundleId = bundleId.substring(0, indexAt);
                        }
 
+                       // We can now rely on bundleId value
+
                        if (bundleId.endsWith(".source")) {
                                if (debug)
                                        System.out.println("Skip source bundle " + bundleId);
                                continue bundles;
+                       } else if (bundleId
+                                       .equals(IPDEBuildConstants.BUNDLE_SIMPLE_CONFIGURATOR)) {
+                               // skip simple configurator in order to avoid side-effects
+                               continue bundles;
                        }
 
                        if (bundlesToStart.contains(bundleId)) {