diff options
author | ddunne | 2010-03-16 23:08:12 +0000 |
---|---|---|
committer | ddunne | 2010-03-16 23:08:12 +0000 |
commit | 54318d27870f1f9947ef0f736e7da41a3743d68e (patch) | |
tree | f008bcbd2ca36cd31adb91e795c9600443f8e884 | |
parent | 790dd23af3dcf4819df266a7ddd943c3ce8722e8 (diff) | |
download | org.eclipse.osee-54318d27870f1f9947ef0f736e7da41a3743d68e.tar.gz org.eclipse.osee-54318d27870f1f9947ef0f736e7da41a3743d68e.tar.xz org.eclipse.osee-54318d27870f1f9947ef0f736e7da41a3743d68e.zip |
Optimized for refresh
-rw-r--r-- | plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java index 785cf85e100..56c152b2bd5 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranch.java @@ -58,9 +58,7 @@ public class XWorkingBranch extends XWidget implements IArtifactWidget, IFramewo private Button showChangeReport;
private Button purgeBranchButton;
public static enum BranchStatus {
- Not_Started,
- Changes_InProgress,
- Changes_NotPermitted
+ Not_Started, Changes_InProgress, Changes_NotPermitted
}
public final static String WIDGET_ID = ATSAttributes.WORKING_BRANCH_WIDGET.getStoreName();
@@ -230,6 +228,11 @@ public class XWorkingBranch extends XWidget implements IArtifactWidget, IFramewo @Override
public void refresh() {
+ // don't do anything here cause to expensive to check for branch conditions during every refresh
+ }
+
+ // only refresh on branch event; this may bust some tests
+ public void refreshOnBranchEvent() {
if (teamArt == null || teamArt.getBranchMgr() == null || labelWidget == null || labelWidget.isDisposed()) {
return;
}
@@ -306,7 +309,7 @@ public class XWorkingBranch extends XWidget implements IArtifactWidget, IFramewo @Override
public void handleBranchEvent(Sender sender, BranchEventType branchModType, int branchId) throws OseeCoreException {
- refresh();
+ refreshOnBranchEvent();
}
@Override
@@ -315,7 +318,7 @@ public class XWorkingBranch extends XWidget implements IArtifactWidget, IFramewo @Override
public void handleFrameworkTransactionEvent(Sender sender, FrameworkTransactionData transData) throws OseeCoreException {
- refresh();
+ refreshOnBranchEvent();
}
public Button getCreateBranchButton() {
|