diff options
author | ddunne | 2009-10-01 04:18:41 +0000 |
---|---|---|
committer | ddunne | 2009-10-01 04:18:41 +0000 |
commit | c27810ed4244f0821ba1b13c0a76efc6536d1d22 (patch) | |
tree | f1c5d91f33102fd4000f1a5d67b39a3ea4b1b976 /org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java | |
parent | f9b671e3c6359d7fe6028bdc4cb59d89c134fa51 (diff) | |
download | org.eclipse.osee-c27810ed4244f0821ba1b13c0a76efc6536d1d22.tar.gz org.eclipse.osee-c27810ed4244f0821ba1b13c0a76efc6536d1d22.tar.xz org.eclipse.osee-c27810ed4244f0821ba1b13c0a76efc6536d1d22.zip |
improve refresh of XWidgets in ATS Editor
Diffstat (limited to 'org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java')
-rw-r--r-- | org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java b/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java index 0398c8b4935..641a66d4aa8 100644 --- a/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java +++ b/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java @@ -124,11 +124,18 @@ public class AtsBranchManager { * @throws OseeCoreException
*/
public boolean isMergeBranchExists(Branch destinationBranch) throws OseeCoreException {
- Branch branch = getWorkingBranch(true, false);
- if (branch == null) {
+ return isMergeBranchExists(getWorkingBranch(true, false), destinationBranch);
+ }
+
+ /**
+ * Method available for optimized checking of merge branches so don't have to re-acquire working branch if already
+ * have
+ */
+ public boolean isMergeBranchExists(Branch workingBranch, Branch destinationBranch) throws OseeCoreException {
+ if (workingBranch == null) {
return false;
}
- return BranchManager.isMergeBranch(branch, destinationBranch);
+ return BranchManager.isMergeBranch(workingBranch, destinationBranch);
}
public boolean isMergeCompleted(Branch destinationBranch) throws OseeCoreException {
@@ -261,10 +268,11 @@ public class AtsBranchManager { */
public Collection<TransactionId> getTransactionIds(boolean showMergeManager) throws OseeCoreException {
if (showMergeManager) {
+ Branch workingBranch = getWorkingBranch();
// grab only the transaction that had merge conflicts
Collection<TransactionId> transactionIds = new ArrayList<TransactionId>();
for (TransactionId transactionId : getTransactionIdsForBaslineBranches()) {
- if (isMergeBranchExists(transactionId.getBranch())) {
+ if (isMergeBranchExists(workingBranch, transactionId.getBranch())) {
transactionIds.add(transactionId);
}
}
|