Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2016-02-04 17:07:07 -0500
committerRyan D. Brooks2016-02-04 17:07:07 -0500
commit557079ac9aee8e8a41ab7ebce05c6142d64dafb9 (patch)
treea5ba9cc7c98a0804884686c1aa8d84abc0c64b63 /plugins/org.eclipse.osee.ote.ui.define
parent0d22cf094b4cb632a9b65a205e6c1f2b253fe61f (diff)
downloadorg.eclipse.osee-557079ac9aee8e8a41ab7ebce05c6142d64dafb9.tar.gz
org.eclipse.osee-557079ac9aee8e8a41ab7ebce05c6142d64dafb9.tar.xz
org.eclipse.osee-557079ac9aee8e8a41ab7ebce05c6142d64dafb9.zip
refactor: Use BranchId were appropriate
Diffstat (limited to 'plugins/org.eclipse.osee.ote.ui.define')
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java10
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/ImportOutfileUIOperation.java6
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java6
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java5
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java5
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/GrayableBranchSelectionComposite.java4
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java4
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java5
-rw-r--r--plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunArtifactOptions.java4
9 files changed, 26 insertions, 23 deletions
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java
index 6e6a82f463..45886de5c4 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java
@@ -19,7 +19,7 @@ import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.window.Window;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.TestRunStorageKey;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -78,7 +78,7 @@ public class BranchComboDialog extends TitleAreaDialog implements Listener {
return toReturn;
}
- public IOseeBranch getSelection() {
+ public BranchId getSelection() {
return branchSelectComposite.getSelectedBranch();
}
@@ -125,7 +125,7 @@ public class BranchComboDialog extends TitleAreaDialog implements Listener {
}
try {
- IOseeBranch branch = getSelection();
+ BranchId branch = getSelection();
if (branch != null) {
String lastBranchSelected = Long.toString(branch.getUuid());
@@ -152,8 +152,8 @@ public class BranchComboDialog extends TitleAreaDialog implements Listener {
}
}
- public static IOseeBranch getBranchFromUser() throws OseeCoreException {
- IOseeBranch toReturn = null;
+ public static BranchId getBranchFromUser() throws OseeCoreException {
+ BranchId toReturn = null;
BranchComboDialog branchSelection = new BranchComboDialog(AWorkbench.getActiveShell());
int result = branchSelection.open();
if (result == Window.OK) {
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/ImportOutfileUIOperation.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/ImportOutfileUIOperation.java
index 9ce3a6a286..74d82a2164 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/ImportOutfileUIOperation.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/ImportOutfileUIOperation.java
@@ -16,7 +16,7 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.swt.Displays;
@@ -33,9 +33,9 @@ import org.eclipse.swt.widgets.Shell;
public class ImportOutfileUIOperation {
private final URI[] fileSystemObjects;
- private final IOseeBranch selectedBranch;
+ private final BranchId selectedBranch;
- public ImportOutfileUIOperation(IOseeBranch selectedBranch, URI... fileSystemObjects) {
+ public ImportOutfileUIOperation(BranchId selectedBranch, URI... fileSystemObjects) {
this.fileSystemObjects = fileSystemObjects;
this.selectedBranch = selectedBranch;
}
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java
index df3f7d1c6a..0dd2c6a61a 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java
@@ -29,7 +29,7 @@ import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.TestRunStorageKey;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -264,7 +264,7 @@ public class OutfileImportPage extends WizardDataTransferPage {
@Override
protected boolean validateDestinationGroup() {
boolean toReturn = super.validateDestinationGroup();
- IOseeBranch branch = branchSelect.getData();
+ BranchId branch = branchSelect.getData();
if (branch == null) {
setMessage(null);
setErrorMessage("Please select a working branch. Cannot import into a null branch.");
@@ -303,7 +303,7 @@ public class OutfileImportPage extends WizardDataTransferPage {
branchUuids = new String[0];
}
- IOseeBranch branch = branchSelect.getData();
+ BranchId branch = branchSelect.getData();
try {
if (branch != null) {
String lastBranchSelected = Long.toString(branch.getUuid());
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java
index 03de0e352d..4b2079df7f 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java
@@ -151,7 +151,7 @@ class CommitJobDialog extends UIJob {
CommitColumnEnum column = CommitColumnEnum.values()[columnIndex - DUMMY_COLUMNS];
switch (column) {
case Branch:
- toReturn = artifact.getBranch().getName();
+ toReturn = artifact.getBranchToken().getName();
break;
case Id:
try {
@@ -165,7 +165,8 @@ class CommitJobDialog extends UIJob {
break;
case Outfile:
try {
- toReturn = new ArtifactTestRunOperator(artifact).getOutfileAttribute().getDisplayableString();
+ toReturn =
+ new ArtifactTestRunOperator(artifact).getOutfileAttribute().getDisplayableString();
} catch (Exception ex) {
OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, "Error getting Outfile", ex);
}
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java
index 8ab91c6faa..4b95c321d1 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java
@@ -82,7 +82,8 @@ public class CommitTestRunJob extends Job {
for (IOseeBranch branch : commitMap.keySet()) {
monitor.setTaskName(String.format("Committing Artifacts into Branch: [%s]", branch.getName()));
List<Artifact> artList = commitMap.get(branch);
- ImportOutfileOperation.commitTestRunTx(monitor, comment, branch, artList.toArray(new Artifact[artList.size()]));
+ ImportOutfileOperation.commitTestRunTx(monitor, comment, branch,
+ artList.toArray(new Artifact[artList.size()]));
committedList.addAll(artList);
}
return committedList.toArray(new Artifact[committedList.size()]);
@@ -92,7 +93,7 @@ public class CommitTestRunJob extends Job {
Map<IOseeBranch, List<Artifact>> branchMap = new HashMap<>();
for (Object object : items) {
Artifact testRun = (Artifact) object;
- IOseeBranch branch = testRun.getBranch();
+ IOseeBranch branch = testRun.getBranchToken();
List<Artifact> artList = branchMap.get(branch);
if (artList == null) {
artList = new ArrayList<>();
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/GrayableBranchSelectionComposite.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/GrayableBranchSelectionComposite.java
index 1588c09868..62e7bacf25 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/GrayableBranchSelectionComposite.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/GrayableBranchSelectionComposite.java
@@ -11,7 +11,7 @@
package org.eclipse.osee.ote.ui.define.panels;
import org.eclipse.osee.framework.core.client.ClientSessionManager;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
import org.eclipse.osee.framework.skynet.core.event.listener.IAccessControlEventListener;
@@ -139,7 +139,7 @@ public class GrayableBranchSelectionComposite extends Composite implements IAcce
}
}
- public IOseeBranch getSelectedBranch() {
+ public BranchId getSelectedBranch() {
return branchSelectComposite.getSelectedBranch();
}
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java
index bf089e2ed4..cf59ffb32a 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java
@@ -27,7 +27,7 @@ import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.jface.util.LocalSelectionTransfer;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -181,7 +181,7 @@ public class DragDropHandler {
}
private void handleResourceDrops(URI[] iFiles) throws OseeCoreException {
- IOseeBranch branch = BranchComboDialog.getBranchFromUser();
+ BranchId branch = BranchComboDialog.getBranchFromUser();
if (branch != null) {
OutfileToArtifactJob artifactJob = new OutfileToArtifactJob(branch, iFiles);
artifactJob.addJobChangeListener(new JobChangeAdapter() {
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java
index 94d90b879d..463727571b 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java
@@ -19,6 +19,7 @@ import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.nebula.widgets.xviewer.XViewer;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.exception.AttributeDoesNotExist;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -41,7 +42,7 @@ public class XViewerDataManager {
private final XViewer xViewer;
private final List<DataItem> commitableItems;
private final List<DataItem> uncommitableItems;
- private final Map<IOseeBranch, DataItem> branchMap;
+ private final Map<BranchId, DataItem> branchMap;
private final List<DataItem> backingData;
private final Collection<IDataChangedListener> listeners;
private boolean isInitialized;
@@ -129,7 +130,7 @@ public class XViewerDataManager {
}
private DataItem getBranchItem(Artifact artifact) {
- IOseeBranch branch = artifact.getBranch();
+ IOseeBranch branch = artifact.getBranchToken();
DataItem toReturn = branchMap.get(branch);
if (toReturn == null) {
toReturn = new BranchItem(branch, null);
diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunArtifactOptions.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunArtifactOptions.java
index 77aca1a2b5..e2c91e1854 100644
--- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunArtifactOptions.java
+++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunArtifactOptions.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.ote.ui.define.views;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.TestRunStorageKey;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.jdk.core.type.IPropertyStore;
@@ -48,7 +48,7 @@ public class TestRunArtifactOptions implements IPropertyStoreBasedControl {
propertyStore.put(TestRunStorageKey.STORAGE_ENABLED, this.panel.isBranchSelectEnabled());
propertyStore.put(TestRunStorageKey.BRANCH_IDS, this.panel.getBranchIds());
- IOseeBranch branch = this.panel.getSelectedBranch();
+ BranchId branch = this.panel.getSelectedBranch();
long branchUuid = -1;
if (branch != null) {
branchUuid = branch.getUuid();

Back to the top