Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew M. Finkbeiner2016-06-16 22:28:53 -0400
committerAndrew M. Finkbeiner2016-10-06 21:12:09 -0400
commitd0ce9d8df58665a065b07997d1dacbe12fcb5204 (patch)
tree69b97a987556ef25cef45b74badb365624a7f9c2
parent4dd784ba3eb9113080febfd64fe2529d1748cbea (diff)
downloadorg.eclipse.osee-d0ce9d8df58665a065b07997d1dacbe12fcb5204.tar.gz
org.eclipse.osee-d0ce9d8df58665a065b07997d1dacbe12fcb5204.tar.xz
org.eclipse.osee-d0ce9d8df58665a065b07997d1dacbe12fcb5204.zip
feature[ats_ATS290838]: Fix product-line related issues
-rw-r--r--plugins/org.eclipse.osee.ote.ui.test.manager/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/models/FileModel.java15
-rw-r--r--plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/ScriptTableViewer.java8
-rw-r--r--plugins/org.eclipse.osee.ote.version.svn/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/ScriptToProject.java28
5 files changed, 41 insertions, 14 deletions
diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ote.ui.test.manager/META-INF/MANIFEST.MF
index e57f913fe6..7b25aff521 100644
--- a/plugins/org.eclipse.osee.ote.ui.test.manager/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ote.ui.test.manager/META-INF/MANIFEST.MF
@@ -46,6 +46,7 @@ Require-Bundle: org.eclipse.ui,
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.apache.xml.serialize,
+ org.eclipse.core.filesystem,
org.eclipse.jdt.core,
org.eclipse.nebula.widgets.xviewer.core.model,
org.eclipse.osee.framework.core.exception,
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 ad8376c85f..6d02668447 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,6 +13,7 @@ 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.resources.IFile;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -55,13 +56,19 @@ public class FileModel {
}
/**
- * @return Returns the iFile.
+ * @return Returns the iFile for the given local data {@link #rawFilename}. You may still have to check if the file actually exists.
*/
public IFile getIFile() {
if (iFile == null) {
if (path.equals("")) {
if (!rawFilename.equals("")) {
iFile = AWorkspace.getIFile(rawFilename);
+ if(iFile == null){
+ IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(org.eclipse.core.filesystem.URIUtil.toURI(rawFilename));
+ if(files.length > 0){
+ iFile = files[0];
+ }
+ }
}
}
}
@@ -98,6 +105,12 @@ public class FileModel {
public String getWorkspaceRelativePath() {
IWorkspace ws = ResourcesPlugin.getWorkspace();
IFile ifile = ws.getRoot().getFileForLocation(new Path(rawFilename));
+ if(ifile == null){
+ IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(org.eclipse.core.filesystem.URIUtil.toURI(rawFilename));
+ if(files.length > 0){
+ ifile = files[0];
+ }
+ }
if (!ifile.exists()) {
return null;
} else {
diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/ScriptTableViewer.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/ScriptTableViewer.java
index 9bfeb83807..c59fc7a040 100644
--- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/ScriptTableViewer.java
+++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/ScriptTableViewer.java
@@ -15,6 +15,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Vector;
import java.util.logging.Level;
+import org.eclipse.core.resources.IFile;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
@@ -36,6 +37,7 @@ import org.eclipse.osee.ote.ui.test.manager.configuration.ILoadConfig;
import org.eclipse.osee.ote.ui.test.manager.configuration.ISaveConfig;
import org.eclipse.osee.ote.ui.test.manager.core.TestManagerEditor;
import org.eclipse.osee.ote.ui.test.manager.internal.TestManagerPlugin;
+import org.eclipse.osee.ote.ui.test.manager.models.OutputModel;
import org.eclipse.osee.ote.ui.test.manager.models.OutputModelJob;
import org.eclipse.osee.ote.ui.test.manager.pages.scriptTable.xscript.XScriptTable;
import org.eclipse.osee.ote.ui.test.manager.pages.scriptTable.xscript.XScriptTableContentProvider;
@@ -440,8 +442,10 @@ public class ScriptTableViewer {
ScriptTask newTask = new ScriptTask(files[i], testManagerEditor.getAlternateOutputDir());
if (!taskList.contains(newTask)) {
// newTask.computeExists();
- if (newTask.getScriptModel().getOutputModel() != null) {
- if (newTask.getScriptModel().getOutputModel().getIFile() != null) {
+ OutputModel outputModel = newTask.getScriptModel().getOutputModel();
+ if (outputModel != null) {
+ IFile outputIFile = outputModel.getIFile();
+ if (outputIFile != null && outputIFile.exists()) {
MarkerPlugin.addMarkers(newTask.getScriptModel().getOutputModel().getIFile());
}
}
diff --git a/plugins/org.eclipse.osee.ote.version.svn/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ote.version.svn/META-INF/MANIFEST.MF
index b4c579dce7..5478942fba 100644
--- a/plugins/org.eclipse.osee.ote.version.svn/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ote.version.svn/META-INF/MANIFEST.MF
@@ -6,7 +6,8 @@ Bundle-Version: 0.23.1.qualifier
Require-Bundle: org.eclipse.core.runtime
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: org.eclipse.core.resources,
+Import-Package: org.eclipse.core.filesystem,
+ org.eclipse.core.resources,
org.eclipse.osee.framework.logging,
org.eclipse.osee.ote.version,
org.eclipse.team.svn.core.connector,
diff --git a/plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/ScriptToProject.java b/plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/ScriptToProject.java
index cc7cc8d701..44834f083a 100644
--- a/plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/ScriptToProject.java
+++ b/plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/ScriptToProject.java
@@ -11,7 +11,10 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.team.svn.core.utility.SVNUtility;
public class ScriptToProject {
@@ -27,22 +30,27 @@ public class ScriptToProject {
public void add(File scriptFile) {
String scriptName = scriptFile.getName();
IProject scriptProject = null;
-
+ IFile iFile = null;
+ IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(org.eclipse.core.filesystem.URIUtil.toURI(scriptFile.getAbsolutePath()));
+ if(files.length > 0){
+ iFile = files[0];
+ }
for(IProject project:workspaceProjects){
String projectName = project.getName();
- if(scriptFile.toString().contains(projectName)){
+ if(iFile.toString().contains(projectName)){
scriptProject = project;
}
}
+ if(scriptProject != null){
+ URI scriptProjectLocationUri = scriptProject.getLocationURI();
+ File scriptProjectFile = new File(scriptProjectLocationUri);
- URI scriptProjectLocationUri = scriptProject.getLocationURI();
- File scriptProjectFile = new File(scriptProjectLocationUri);
-
- if (isSvn(scriptProjectFile)) {
- String scriptProjectLocation = scriptProjectFile.getAbsolutePath();
- addScriptListValue(scriptProjectLocation, scriptName);
- scriptNameToScriptFileMap.put(scriptName, scriptFile);
- }
+ if (isSvn(scriptProjectFile)) {
+ String scriptProjectLocation = scriptProjectFile.getAbsolutePath();
+ addScriptListValue(scriptProjectLocation, scriptName);
+ scriptNameToScriptFileMap.put(scriptName, scriptFile);
+ }
+ }
}
public Set<String> getProjectsSet() {

Back to the top