X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=eclipse%2Fplugins%2Forg.argeo.slc.ide.ui%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fide%2Fui%2Flaunch%2Fosgi%2FOsgiBootLaunchShortcut.java;fp=eclipse%2Fplugins%2Forg.argeo.slc.ide.ui%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fide%2Fui%2Flaunch%2Fosgi%2FOsgiBootLaunchShortcut.java;h=513ba50a6c600d32d0b1a730898595ea55891e04;hb=24f738dcddf83ec2c13fe2e7498a47a4bcd0f427;hp=78bd57a148035cc4f3d04560847df6a0589b2d82;hpb=67235a82e5020e55e1b2250546645c9ee617f420;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/OsgiBootLaunchShortcut.java b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootLaunchShortcut.java index 78bd57a14..513ba50a6 100644 --- a/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootLaunchShortcut.java +++ b/eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/OsgiBootLaunchShortcut.java @@ -25,7 +25,7 @@ public class OsgiBootLaunchShortcut extends AbstractOsgiLaunchShortcut { @Override public void launch(ISelection selection, String mode) { - System.out.println("Launch shortcut... " + selection); + // System.out.println("Launch shortcut... " + selection); // we assume that: // - only one @@ -49,6 +49,8 @@ public class OsgiBootLaunchShortcut extends AbstractOsgiLaunchShortcut { OsgiLaunchHelper.interpretProperties(properties, bundlesToStart, systemPropertiesToAppend); super.launch(selection, mode); + + propertiesFile = null; } @Override @@ -62,17 +64,19 @@ public class OsgiBootLaunchShortcut extends AbstractOsgiLaunchShortcut { @Override protected String findWorkingDirectory() { try { - //String relPath = "exec/" + extractName(propertiesFile); + // String relPath = "exec/" + extractName(propertiesFile); IProject project = propertiesFile.getProject(); IPath parent = propertiesFile.getProjectRelativePath() .removeLastSegments(1); IFolder execFolder = project.getFolder(parent.append("exec")); - execFolder.create(true, true, null); + if (!execFolder.exists()) + execFolder.create(true, true, null); IFolder launchFolder = project.getFolder(execFolder .getProjectRelativePath().append( extractName(propertiesFile))); - launchFolder.create(true, true, null); + if (!launchFolder.exists()) + launchFolder.create(true, true, null); // IPath execDirPath = propertiesFile.getFullPath() // .removeLastSegments(1).append(relPath); @@ -89,7 +93,7 @@ public class OsgiBootLaunchShortcut extends AbstractOsgiLaunchShortcut { + launchFolder.getFullPath().toString().substring(1) + "}"; } catch (Exception e) { e.printStackTrace(); - return null; + throw new RuntimeException("Cannot create working directory", e); } }