summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Panjer2012-04-04 03:14:17 (EDT)
committer Steffen Pingel2012-04-04 03:14:17 (EDT)
commite702904b3c674166496bbe46e927d47a48245e11 (patch)
tree9d56cef14ba81db255d43f6f9bac7f528f6c5321
parente0d834a5c18492c135fba09fdc04f4945a698372 (diff)
downloadorg.eclipse.mylyn.builds-e702904b3c674166496bbe46e927d47a48245e11.zip
org.eclipse.mylyn.builds-e702904b3c674166496bbe46e927d47a48245e11.tar.gz
org.eclipse.mylyn.builds-e702904b3c674166496bbe46e927d47a48245e11.tar.bz2
ASSIGNED - bug 375099: Automatically refresh the Builds view upon user
initiated activation or bringing to foreground https://bugs.eclipse.org/bugs/show_bug.cgi?id=375099
-rw-r--r--org.eclipse.mylyn.builds.ui/src/org/eclipse/mylyn/internal/builds/ui/view/BuildsView.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.builds.ui/src/org/eclipse/mylyn/internal/builds/ui/view/BuildsView.java b/org.eclipse.mylyn.builds.ui/src/org/eclipse/mylyn/internal/builds/ui/view/BuildsView.java
index 90c9a96..ef177c8 100644
--- a/org.eclipse.mylyn.builds.ui/src/org/eclipse/mylyn/internal/builds/ui/view/BuildsView.java
+++ b/org.eclipse.mylyn.builds.ui/src/org/eclipse/mylyn/internal/builds/ui/view/BuildsView.java
@@ -46,9 +46,11 @@ import org.eclipse.mylyn.builds.core.IBuildElement;
import org.eclipse.mylyn.builds.core.IBuildPlan;
import org.eclipse.mylyn.builds.core.IBuildServer;
import org.eclipse.mylyn.builds.internal.core.BuildModel;
+import org.eclipse.mylyn.builds.internal.core.operations.RefreshOperation;
import org.eclipse.mylyn.builds.internal.core.util.BuildsConstants;
import org.eclipse.mylyn.builds.ui.BuildsUiConstants;
import org.eclipse.mylyn.commons.core.CoreUtil;
+import org.eclipse.mylyn.commons.core.operations.IOperationMonitor.OperationFlag;
import org.eclipse.mylyn.commons.ui.AbstractColumnViewerSupport;
import org.eclipse.mylyn.commons.ui.CommonImages;
import org.eclipse.mylyn.commons.ui.TreeSorter;
@@ -100,6 +102,7 @@ import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
/**
* @author Steffen Pingel
* @author Torkild U. Resheim
+ * @author Lucas Panjer
*/
public class BuildsView extends ViewPart implements IShowInTarget {
@@ -580,6 +583,11 @@ public class BuildsView extends ViewPart implements IShowInTarget {
@Override
public void setFocus() {
getViewer().getControl().setFocus();
+ if (BuildsUiPlugin.getDefault().getPreferenceStore().getBoolean(BuildsUiInternal.PREF_AUTO_REFRESH_ENABLED)) {
+ RefreshOperation operation = BuildsUiInternal.getFactory().getRefreshOperation();
+ operation.addFlag(OperationFlag.BACKGROUND);
+ operation.execute();
+ }
}
private void setTopControl(Control control) {