diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeUiUtil.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeUiUtil.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeUiUtil.java index 1de467e9048..09f5606131a 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeUiUtil.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeUiUtil.java @@ -17,6 +17,7 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.TransactionToken; +import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.model.TransactionDelta; import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; @@ -72,8 +73,17 @@ public final class ChangeUiUtil { } public static ChangeReportEditorInput createInput(BranchId branch, boolean loadOnOpen) throws OseeCoreException { - BranchId parentBranch = BranchManager.getParentBranch(branch); - return createInput(branch, parentBranch, loadOnOpen); + if (BranchManager.isArchived(branch) || BranchManager.getState(branch).equals(BranchState.COMMITTED)) { + TransactionToken startTx = BranchManager.getBaseTransaction(branch); + TransactionToken endTx = TransactionManager.getHeadTransaction(branch); + TransactionDelta txDelta = new TransactionDelta(startTx, endTx); + ChangeReportEditorInput input = createInput(CompareType.COMPARE_BASE_TO_HEAD, txDelta, loadOnOpen); + input.setBranch(branch); + return input; + } else { + BranchId parentBranch = BranchManager.getParentBranch(branch); + return createInput(branch, parentBranch, loadOnOpen); + } } public static ChangeReportEditorInput createInput(BranchId branch, BranchId parentBranch, boolean loadOnOpen) throws OseeCoreException { |