Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2009-10-01 04:18:41 +0000
committerddunne2009-10-01 04:18:41 +0000
commitc27810ed4244f0821ba1b13c0a76efc6536d1d22 (patch)
treef1c5d91f33102fd4000f1a5d67b39a3ea4b1b976 /org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java
parentf9b671e3c6359d7fe6028bdc4cb59d89c134fa51 (diff)
downloadorg.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.java16
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);
}
}

Back to the top