Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Jury2017-07-12 17:42:28 -0400
committerAndy Jury2017-07-12 17:42:34 -0400
commitf407515d8d28ba9d0c216738b541731cd6c830ec (patch)
treecfbc08e8f54821d0c7a4f39cbe12c96b21694053
parentc618be325a737bbbf9eec46836ec62e33dc41414 (diff)
downloadorg.eclipse.osee-f407515d8d28ba9d0c216738b541731cd6c830ec.tar.gz
org.eclipse.osee-f407515d8d28ba9d0c216738b541731cd6c830ec.tar.xz
org.eclipse.osee-f407515d8d28ba9d0c216738b541731cd6c830ec.zip
bug[ats_TW1311]: Open tmo files not in workspace.OTE_08_29_2017OTE_07_10_2017.1
This functionality used to be available but was somehow lost over time.
-rw-r--r--plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/models/FileModel.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/models/FileModel.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/models/FileModel.java
index 6d02668447..17ad692e7d 100644
--- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/models/FileModel.java
+++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/models/FileModel.java
@@ -13,7 +13,8 @@ package org.eclipse.osee.ote.ui.test.manager.models;
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
-
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -23,7 +24,10 @@ import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.ws.AWorkspace;
import org.eclipse.osee.ote.ui.test.manager.internal.TestManagerPlugin;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
public class FileModel {
@@ -149,6 +153,14 @@ public class FileModel {
public void openEditor() {
if (getIFile() != null) {
AWorkspace.openEditor(getIFile());
+ } else {
+ IFileStore fileStore = EFS.getLocalFileSystem().getStore(new Path(file.getAbsolutePath()));
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ try {
+ IDE.openEditorOnFileStore(page, fileStore);
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ }
}
}

Back to the top