refactor[TW18065]: Convert IBranchProvider to return BranchToken
Change-Id: Iacb42526da6e8ae7efd965803205b5400c181f3e
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IBranchProvider.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IBranchProvider.java
index f56eea7..5d6fa3a 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IBranchProvider.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IBranchProvider.java
@@ -13,12 +13,12 @@
package org.eclipse.osee.framework.skynet.core.artifact;
-import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.BranchToken;
/**
* @author Theron Virgin
*/
public interface IBranchProvider {
- public BranchId getBranch();
+ public BranchToken getBranch();
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ParentBranchProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ParentBranchProvider.java
index cd14c3c..a712e49 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ParentBranchProvider.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ParentBranchProvider.java
@@ -14,6 +14,7 @@
package org.eclipse.osee.framework.ui.skynet.change;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.BranchToken;
import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.skynet.core.artifact.IBranchProvider;
@@ -25,7 +26,7 @@
}
@Override
- public BranchId getBranch() {
+ public BranchToken getBranch() {
BranchId childBranch = uiData.getTxDelta().getStartTx().getBranch();
return BranchManager.getParentBranch(childBranch);
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/UiSelectBetweenDeltasBranchProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/UiSelectBetweenDeltasBranchProvider.java
index 7e9826c..58acf9b 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/UiSelectBetweenDeltasBranchProvider.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/UiSelectBetweenDeltasBranchProvider.java
@@ -21,9 +21,11 @@
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.window.Window;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.BranchToken;
import org.eclipse.osee.framework.core.model.TransactionDelta;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.plugin.core.util.Jobs;
+import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.skynet.core.artifact.IBranchProvider;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.skynet.branch.BranchSelectionDialog;
@@ -38,12 +40,12 @@
}
@Override
- public BranchId getBranch() {
- final BranchId[] selectedBranch = new BranchId[1];
+ public BranchToken getBranch() {
+ final BranchToken[] selectedBranch = new BranchToken[1];
TransactionDelta txDelta = uiData.getTxDelta();
if (txDelta.areOnTheSameBranch()) {
- selectedBranch[0] = txDelta.getStartTx().getBranch();
+ selectedBranch[0] = BranchManager.getBranch(txDelta.getStartTx().getBranch());
} else {
final Collection<BranchId> selectable = new ArrayList<>();
selectable.add(uiData.getTxDelta().getStartTx().getBranch());
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java
index c7ed736..55feca7 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java
@@ -430,7 +430,7 @@
}
@Override
- public BranchId getBranch() {
+ public BranchToken getBranch() {
return branch;
}