X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=inline;f=eclipse%2Fplugins%2Forg.argeo.slc.ide.ui%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fide%2Fui%2Flaunch%2Fosgi%2FOsgiLaunchHelper.java;fp=eclipse%2Fplugins%2Forg.argeo.slc.ide.ui%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fide%2Fui%2Flaunch%2Fosgi%2FOsgiLaunchHelper.java;h=6866f3dc41e7ae60f1b22833e6090d584951533d;hb=0bcca59c19e554f94ec03af0dc7c44047a2eade7;hp=340f4b211bef036f2c26f6ef3b26fe52d6a4563d;hpb=1484a50db329967983861f21023b69e9d0297026;p=gpl%2Fargeo-slc.git diff --git a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiLaunchHelper.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiLaunchHelper.java index 340f4b211..6866f3dc4 100644 --- a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiLaunchHelper.java +++ b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiLaunchHelper.java @@ -35,7 +35,7 @@ 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.ui.launcher.IPDELauncherConstants; -import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; public class OsgiLaunchHelper implements OsgiLauncherConstants { private static Boolean debug = false; @@ -63,8 +63,11 @@ public class OsgiLaunchHelper implements OsgiLauncherConstants { updateLaunchConfiguration(configuration, bundlesToStart, systemPropertiesToAppend, dataDir.getAbsolutePath()); } catch (Exception e) { - ErrorDialog.openError(Display.getCurrent().getActiveShell(), - "Error", "Cannot read properties", + e.printStackTrace(); + Shell shell = SlcIdeUiPlugin.getDefault().getWorkbench() + .getActiveWorkbenchWindow().getShell(); + // Shell shell= Display.getCurrent().getActiveShell(); + ErrorDialog.openError(shell, "Error", "Cannot read properties", new Status(IStatus.ERROR, SlcIdeUiPlugin.ID, e.getMessage(), e)); return; @@ -92,7 +95,12 @@ public class OsgiLaunchHelper implements OsgiLauncherConstants { } targetBundles = tBuf.toString(); StringBuffer wBuf = new StringBuffer(); - for (IPluginModelBase model : PluginRegistry.getWorkspaceModels()) { + models: for (IPluginModelBase model : PluginRegistry + .getWorkspaceModels()) { + if (model.getBundleDescription() == null) { + System.err.println("No bundle description for " + model); + continue models; + } wBuf.append(model.getBundleDescription().getSymbolicName()); wBuf.append(','); }