Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2013-10-06 22:16:24 -0400
committerSteffen Pingel2013-10-06 22:16:24 -0400
commit71852f953f4721bbd6d41bf85ec116076dba57b6 (patch)
treebf1b7659c0f0fef16ca2e9212611e06ee32ceab7
parent4558d8ca922949d8e58694b57f677f50073e373c (diff)
downloadorg.eclipse.mylyn.tasks-71852f953f4721bbd6d41bf85ec116076dba57b6.tar.gz
org.eclipse.mylyn.tasks-71852f953f4721bbd6d41bf85ec116076dba57b6.tar.xz
org.eclipse.mylyn.tasks-71852f953f4721bbd6d41bf85ec116076dba57b6.zip
418759: query page wastes spaces without buttons
Change-Id: I7f00df3da35e6e8ca7b952251b269f099f0d64ea Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=418759
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositoryQueryPage2.java61
1 files changed, 33 insertions, 28 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositoryQueryPage2.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositoryQueryPage2.java
index 6e5eb8483..e8707e06c 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositoryQueryPage2.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositoryQueryPage2.java
@@ -379,40 +379,45 @@ public abstract class AbstractRepositoryQueryPage2 extends AbstractRepositoryQue
}
});
}
- final ProgressMonitorPart progressMonitorPart = new ProgressMonitorPart(composite, null);
- GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BEGINNING).grab(true, false).applyTo(progressMonitorPart);
- progressMonitorPart.setVisible(false);
- progressContainer = new ProgressContainer(composite.getShell(), progressMonitorPart) {
- @Override
- protected void restoreUiState(java.util.Map<Object, Object> state) {
- cancelButton.setVisible(false);
- CommonUiUtil.setEnabled(innerComposite, true);
- for (Control control : composite.getChildren()) {
- if (control instanceof ProgressMonitorPart) {
- break;
+ if (getContainer() == null) {
+ final ProgressMonitorPart progressMonitorPart = new ProgressMonitorPart(composite, null);
+ GridDataFactory.fillDefaults()
+ .align(SWT.FILL, SWT.BEGINNING)
+ .grab(true, false)
+ .applyTo(progressMonitorPart);
+ progressMonitorPart.setVisible(false);
+ progressContainer = new ProgressContainer(composite.getShell(), progressMonitorPart) {
+ @Override
+ protected void restoreUiState(java.util.Map<Object, Object> state) {
+ cancelButton.setVisible(false);
+ CommonUiUtil.setEnabled(innerComposite, true);
+ for (Control control : composite.getChildren()) {
+ if (control instanceof ProgressMonitorPart) {
+ break;
+ }
+ control.setEnabled(true);
}
- control.setEnabled(true);
}
- }
- @Override
- protected void saveUiState(java.util.Map<Object, Object> savedState) {
- CommonUiUtil.setEnabled(innerComposite, false);
- for (Control control : composite.getChildren()) {
- if (control instanceof ProgressMonitorPart) {
- break;
+ @Override
+ protected void saveUiState(java.util.Map<Object, Object> savedState) {
+ CommonUiUtil.setEnabled(innerComposite, false);
+ for (Control control : composite.getChildren()) {
+ if (control instanceof ProgressMonitorPart) {
+ break;
+ }
+ control.setEnabled(false);
}
- control.setEnabled(false);
+ cancelButton.setEnabled(true);
+ cancelButton.setVisible(true);
}
- cancelButton.setEnabled(true);
- cancelButton.setVisible(true);
- }
- };
+ };
- cancelButton = new Button(composite, SWT.PUSH);
- cancelButton.setText(IDialogConstants.CANCEL_LABEL);
- cancelButton.setVisible(false);
- progressContainer.setCancelButton(cancelButton);
+ cancelButton = new Button(composite, SWT.PUSH);
+ cancelButton.setText(IDialogConstants.CANCEL_LABEL);
+ cancelButton.setVisible(false);
+ progressContainer.setCancelButton(cancelButton);
+ }
}
protected abstract void createPageContent(@NonNull SectionComposite parent);

Back to the top