Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2008-02-14 18:30:26 +0000
committerddunne2008-02-14 18:30:26 +0000
commit209eb5d01fe66dd57a65d308c0fd069c58d8af50 (patch)
treea019affcc12dc4fdf3160245f227de882449c8cb
parent9dd4fdf43b2bdbe421cb2912a0559a9ac6284010 (diff)
downloadorg.eclipse.osee-209eb5d01fe66dd57a65d308c0fd069c58d8af50.tar.gz
org.eclipse.osee-209eb5d01fe66dd57a65d308c0fd069c58d8af50.tar.xz
org.eclipse.osee-209eb5d01fe66dd57a65d308c0fd069c58d8af50.zip
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/autoRun/LaunchAutoRunWorkbench.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/autoRun/LaunchAutoRunWorkbench.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/autoRun/LaunchAutoRunWorkbench.java
index a2a5c843ea6..5dd208c2391 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/autoRun/LaunchAutoRunWorkbench.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/autoRun/LaunchAutoRunWorkbench.java
@@ -18,10 +18,8 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.jface.action.Action;
-import org.eclipse.osee.framework.jdk.core.util.AFile;
-import org.eclipse.osee.framework.ui.plugin.util.OseeData;
+import org.eclipse.osee.framework.ui.plugin.util.AWorkspace;
import org.eclipse.osee.framework.ui.plugin.util.Result;
-import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.autoRun.IAutoRunTask.RunDb;
/**
@@ -42,18 +40,16 @@ public class LaunchAutoRunWorkbench extends Action {
public static Result launch(String autoRunExtensionUniqueId, String defaultDbConnection) throws Exception {
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
- String launchFile = "AutoRun.launch";
- File pluginFile = SkynetGuiPlugin.getInstance().getPluginFile(launchFile);
- if (!pluginFile.exists()) {
+ String launchFile = "org.eclipse.osee.framework.ui.skynet\\AutoRun.launch";
+ File file = AWorkspace.getWorkspaceFile(launchFile);
+ if (!file.exists()) {
throw new IllegalArgumentException("Can't locate file \"" + launchFile + "\"");
}
- File workspaceFile = OseeData.getFile(launchFile);
- AFile.writeFile(workspaceFile, AFile.readFile(pluginFile));
- IFile workspaceIFile = OseeData.getIFile(launchFile);
- if (workspaceIFile == null || !workspaceIFile.exists()) {
- throw new IllegalArgumentException("Can't locate workspaceIFile \"" + launchFile + "\"");
+ IFile iFile = AWorkspace.fileToIFile(file);
+ if (iFile == null || !iFile.exists()) {
+ throw new IllegalArgumentException("Can't locate file \"" + launchFile + "\"");
}
- ILaunchConfiguration config = manager.getLaunchConfiguration(workspaceIFile);
+ ILaunchConfiguration config = manager.getLaunchConfiguration(iFile);
// System.out.println("Pre Config " + config.getAttributes());
// Get a copy of the config to work with
ILaunchConfigurationWorkingCopy copy = config.getWorkingCopy();

Back to the top