summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorTomasz Zarna2011-11-13 16:36:35 (EST)
committer Tomasz Zarna2011-11-13 16:36:35 (EST)
commit647df0265fbf606c922a4729bfe873cb65a1abaa (patch)
tree29b5f2e6a5dbbd299185336cef139d1623816212
parent022405e4714ba274fbc3168c39c3323cb8bc6bd3 (diff)
downloadegit-647df0265fbf606c922a4729bfe873cb65a1abaa.zip
egit-647df0265fbf606c922a4729bfe873cb65a1abaa.tar.gz
egit-647df0265fbf606c922a4729bfe873cb65a1abaa.tar.bz2
Check "Select Branch" page on filter changerefs/changes/09/4609/1
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/SourceBranchPage.java24
1 files changed, 23 insertions, 1 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/SourceBranchPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/SourceBranchPage.java
index 120ad14..c819eef 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/SourceBranchPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/clone/SourceBranchPage.java
@@ -24,6 +24,8 @@ import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.egit.core.op.ListRemoteOperation;
import org.eclipse.egit.core.securestorage.UserPasswordCredentials;
import org.eclipse.egit.ui.Activator;
@@ -62,6 +64,7 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.PatternFilter;
+import org.eclipse.ui.progress.WorkbenchJob;
class SourceBranchPage extends WizardPage {
@@ -124,7 +127,26 @@ class SourceBranchPage extends WizardPage {
label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
FilteredCheckboxTree fTree = new FilteredCheckboxTree(panel, null,
- SWT.NONE, new PatternFilter());
+ SWT.NONE, new PatternFilter()) {
+ /*
+ * Overridden to check page when refreshing is done.
+ */
+ protected WorkbenchJob doCreateRefreshJob() {
+ WorkbenchJob refreshJob = super.doCreateRefreshJob();
+ refreshJob.addJobChangeListener(new JobChangeAdapter() {
+ public void done(IJobChangeEvent event) {
+ if (event.getResult().isOK()) {
+ getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ checkPage();
+ }
+ });
+ }
+ }
+ });
+ return refreshJob;
+ }
+ };
refsViewer = fTree.getCheckboxTreeViewer();
ITreeContentProvider provider = new ITreeContentProvider() {