Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2011-08-24 15:53:23 -0400
committerFrank Becker2011-08-24 15:53:23 -0400
commit759c9e58f5a08d0469d699ada679b1c7da294054 (patch)
tree4054b7c45904b77f72591506a7efe77b9f28b87e
parent8238a17e893542cdce3a6c42b569f0e907547012 (diff)
downloadorg.eclipse.mylyn.tasks-759c9e58f5a08d0469d699ada679b1c7da294054.tar.gz
org.eclipse.mylyn.tasks-759c9e58f5a08d0469d699ada679b1c7da294054.tar.xz
org.eclipse.mylyn.tasks-759c9e58f5a08d0469d699ada679b1c7da294054.zip
ASSIGNED - bug 310059: [patch][api][framework] provide 'update
configuration' button on query pages https://bugs.eclipse.org/bugs/show_bug.cgi?id=310059
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java45
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/Messages.java14
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/messages.properties7
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/Messages.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/messages.properties1
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/provisional/tasks/ui/wizards/AbstractRepositoryQueryPage2.java24
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/provisional/tasks/ui/wizards/Messages.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/provisional/tasks/ui/wizards/messages.properties3
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/QueryWizardDialog.java10
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/messages.properties4
10 files changed, 36 insertions, 76 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
index 9943e3b84..af93ef9e3 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
@@ -63,7 +63,6 @@ import org.eclipse.mylyn.internal.provisional.commons.ui.dialogs.InPlaceCheckBox
import org.eclipse.mylyn.internal.provisional.commons.ui.dialogs.InPlaceDialogEvent;
import org.eclipse.mylyn.internal.provisional.tasks.ui.wizards.AbstractRepositoryQueryPage2;
import org.eclipse.mylyn.internal.tasks.ui.util.WebBrowserDialog;
-import org.eclipse.mylyn.internal.tasks.ui.wizards.QueryWizardDialog;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.RepositoryStatus;
import org.eclipse.mylyn.tasks.core.TaskRepository;
@@ -513,20 +512,11 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage2 implements
if (originalQuery != null) {
return;
}
- Button clearButton = new Button(control, SWT.PUSH);
- clearButton.setText(Messages.BugzillaSearchPage_ClearFields);
- clearButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false));
- clearButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- clearFields();
- }
-
- });
super.createButtons(control);
}
- private void clearFields() {
+ @Override
+ public void clearFields() {
product.deselectAll();
component.deselectAll();
version.deselectAll();
@@ -2505,10 +2495,12 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage2 implements
@Override
protected void createPageContent(Composite parent) {
- Composite composite = new Composite(parent, SWT.BORDER);
- composite.setLayout(new GridLayout(2, false));
+ Composite composite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(2, false);
+ layout.marginWidth = 0;
+ layout.marginHeight = 0;
+ composite.setLayout(layout);
createOptionsGroup(composite);
-// createButtons(composite);
}
@Override
@@ -2543,27 +2535,4 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage2 implements
saveState();
}
- @Override
- public void setExtraButtonState(Button button) {
- Integer obj = (Integer) button.getData();
- if (obj == QueryWizardDialog.CLEAR_BUTTON_ID) {
- if (!button.isVisible()) {
- button.setVisible(true);
- }
- button.setEnabled(true);
- } else {
- super.setExtraButtonState(button);
- }
- }
-
- @Override
- public boolean handleExtraButtonPressed(int buttonId) {
- if (buttonId == QueryWizardDialog.CLEAR_BUTTON_ID) {
- clearFields();
- return true;
- } else {
- return super.handleExtraButtonPressed(buttonId);
- }
- }
-
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/Messages.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/Messages.java
index debc368f8..d143d816d 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/Messages.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/Messages.java
@@ -75,12 +75,8 @@ public class Messages extends NLS {
public static String BugzillaSearchPage_Add_Chart_Button;
- public static String BugzillaSearchPage_No_repository_available;
-
public static String BugzillaSearchPage_none;
- public static String BugzillaSearchPage_notregexp;
-
public static String BugzillaSearchPage_Number_of_days_must_be_a_positive_integer;
public static String BugzillaSearchPage_Operating_System;
@@ -157,10 +153,6 @@ public class Messages extends NLS {
public static String BugzillaSearchPage_qacontact;
- public static String BugzillaSearchPage_Query_Title;
-
- public static String BugzillaSearchPage_regexp;
-
public static String BugzillaSearchPage_reporter;
public static String BugzillaSearchPage_Resolution;
@@ -173,18 +165,12 @@ public class Messages extends NLS {
public static String BugzillaSearchPage_Status;
- public static String BugzillaSearchPage_substring;
-
public static String BugzillaSearchPage_Summary;
- public static String BugzillaSearchPage_Update_Attributes_from_Repository;
-
public static String BugzillaSearchPage_Updating_search_options_;
public static String BugzillaSearchPage_Version;
- public static String BugzillaSearchPage_ClearFields;
-
public static String BugzillaSearchPage_BooleanChart;
public static String BugzillaSearchPage_Field_Alias;
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/messages.properties b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/messages.properties
index 6a1de89b8..9f38df2d0 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/messages.properties
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/messages.properties
@@ -33,9 +33,7 @@ BugzillaSearchPage_Keywords=&Keywords:
BugzillaSearchPage_Milestone=&Milestone:
BugzillaSearchPage_Negate_Button=Negate
BugzillaSearchPage_Add_Chart_Button=Add chart
-BugzillaSearchPage_No_repository_available=No repository available, please add one using the Task Repositories view.
BugzillaSearchPage_none=none
-BugzillaSearchPage_notregexp=notregexp
BugzillaSearchPage_Number_of_days_must_be_a_positive_integer=Number of days must be a positive integer. {0} is invalid.
BugzillaSearchPage_Operating_System=&Operating System:
BugzillaSearchPage_Operation_changed_after=changed after
@@ -74,20 +72,15 @@ BugzillaSearchPage_owner=Owner
BugzillaSearchPage_Product=&Product:
BugzillaSearchPage_PROORITY=Priori&ty:
BugzillaSearchPage_qacontact=QA Contact
-BugzillaSearchPage_Query_Title=&Query Title:
-BugzillaSearchPage_regexp=regexp
BugzillaSearchPage_reporter=Reporter
BugzillaSearchPage_Resolution=&Resolution:
BugzillaSearchPage_Select_=Select...
BugzillaSearchPage_Select_the_Bugzilla_query_parameters=Select the Bugzilla query parameters. Use the Update Attributes button to retrieve updated values from the repository.
BugzillaSearchPage_Severity=Se&verity:
BugzillaSearchPage_Status=Stat&us:
-BugzillaSearchPage_substring=contains
BugzillaSearchPage_Summary=Summar&y:
-BugzillaSearchPage_Update_Attributes_from_Repository=Up&date Attributes from Repository
BugzillaSearchPage_Updating_search_options_=Updating search options...
BugzillaSearchPage_Version=Vers&ion:
-BugzillaSearchPage_ClearFields=Clear Fields
BugzillaSearchPage_BooleanChart=Boolean Charts (Advanced)
BugzillaSearchPage_Field_Alias=Alias
BugzillaSearchPage_Field_AssignedTo=AssignedTo
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/Messages.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/Messages.java
index ae296231b..2f5936352 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/Messages.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/Messages.java
@@ -59,8 +59,6 @@ public class Messages extends NLS {
public static String BugzillaRepositorySettingsPage_All;
- public static String BugzillaRepositorySettingsPage_AutodetectWorkflow;
-
public static String BugzillaRepositorySettingsPage_AUTOTETECT_PLATFORM_AND_OS;
public static String BugzillaRepositorySettingsPage_admin_parameter;
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/messages.properties b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/messages.properties
index c1f412f67..01c723929 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/messages.properties
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/messages.properties
@@ -28,7 +28,6 @@ BugzillaQueryTypeWizardPage_Create_query_using_form=Cre&ate query using form
BugzillaQueryTypeWizardPage_Select_from_the_available_query_types=Select from the available query types.
BugzillaRepositorySettingsPage_All=All
-BugzillaRepositorySettingsPage_AutodetectWorkflow=Autodetect workflow:
BugzillaRepositorySettingsPage_AUTOTETECT_PLATFORM_AND_OS=Autodetect platform and os
BugzillaRepositorySettingsPage_admin_parameter=Task Editor Attributes to Suppress
BugzillaRepositorySettingsPage_available_once_repository_created=Available once repository has been created.
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/provisional/tasks/ui/wizards/AbstractRepositoryQueryPage2.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/provisional/tasks/ui/wizards/AbstractRepositoryQueryPage2.java
index 43b956ad7..ca37a4df5 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/provisional/tasks/ui/wizards/AbstractRepositoryQueryPage2.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/provisional/tasks/ui/wizards/AbstractRepositoryQueryPage2.java
@@ -129,10 +129,21 @@ public abstract class AbstractRepositoryQueryPage2 extends AbstractRepositoryQue
}
protected void createButtons(final Composite control) {
+ Button clearButton = new Button(control, SWT.PUSH);
+ clearButton.setText(Messages.AbstractRepositoryQueryPage2_Clear_Fields);
+ clearButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+ clearButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ clearFields();
+ }
+
+ });
if (needsRepositoryConfiguration) {
updateButton = new Button(control, SWT.PUSH);
updateButton.setText(Messages.AbstractRepositoryQueryPage2__Refresh_From_Repository);
- updateButton.setLayoutData(new GridData());
+ updateButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false));
+// updateButton.setImage(TasksUiImages.REPOSITORY_UPDATE_CONFIGURATION.createImage());
updateButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -281,7 +292,13 @@ public abstract class AbstractRepositoryQueryPage2 extends AbstractRepositoryQue
button.setVisible(false);
}
}
+ } else if (obj == QueryWizardDialog.CLEAR_BUTTON_ID) {
+ if (!button.isVisible()) {
+ button.setVisible(true);
+ }
+ button.setEnabled(true);
}
+
}
public boolean handleExtraButtonPressed(int buttonId) {
@@ -295,7 +312,12 @@ public abstract class AbstractRepositoryQueryPage2 extends AbstractRepositoryQue
Messages.AbstractRepositoryQueryPage2_No_repository_available_please_add_one_using_the_Task_Repositories_view);
}
return true;
+ } else if (buttonId == QueryWizardDialog.CLEAR_BUTTON_ID) {
+ clearFields();
+ return true;
}
return false;
}
+
+ abstract public void clearFields();
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/provisional/tasks/ui/wizards/Messages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/provisional/tasks/ui/wizards/Messages.java
index 0075bcbf8..e9e7f5ee5 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/provisional/tasks/ui/wizards/Messages.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/provisional/tasks/ui/wizards/Messages.java
@@ -29,6 +29,8 @@ public class Messages extends NLS {
public static String AbstractRepositoryQueryPage2__Title_;
+ public static String AbstractRepositoryQueryPage2_Clear_Fields;
+
public static String AbstractRepositoryQueryPage2_Create_a_Query_Page_Description;
public static String AbstractRepositoryQueryPage2_Enter_a_title;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/provisional/tasks/ui/wizards/messages.properties b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/provisional/tasks/ui/wizards/messages.properties
index 7f0f0eeb9..5e51bb568 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/provisional/tasks/ui/wizards/messages.properties
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/provisional/tasks/ui/wizards/messages.properties
@@ -8,8 +8,9 @@
# Contributors:
# Tasktop Technologies - initial API and implementation
###############################################################################
-AbstractRepositoryQueryPage2__Refresh_From_Repository=&Refresh From Repository
+AbstractRepositoryQueryPage2__Refresh_From_Repository=&Refresh Configuration
AbstractRepositoryQueryPage2__Title_=&Title:
+AbstractRepositoryQueryPage2_Clear_Fields=Clear Fields
AbstractRepositoryQueryPage2_Create_a_Query_Page_Description=Create a query.
AbstractRepositoryQueryPage2_Enter_a_title=Enter a title
AbstractRepositoryQueryPage2_Enter_query_parameters=Enter query parameters
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/QueryWizardDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/QueryWizardDialog.java
index f4b8d235d..3515210ad 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/QueryWizardDialog.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/QueryWizardDialog.java
@@ -72,16 +72,6 @@ public class QueryWizardDialog extends EnhancedWizardDialog {
protected boolean handleExtraButtonPressed(int buttonId) {
if (abstractRepositoryQueryPage != null) {
abstractRepositoryQueryPage.handleExtraButtonPressed(buttonId);
-// if (buttonId == CLEAR_BUTTON_ID) {
-//// if (getCurrentPage() instanceof IQueryButtomButtons) {
-//// ((IQueryButtomButtons) getCurrentPage()).performClearFields();
-//// return true;
-//// }
-// } else if (buttonId == UPDATE_BUTTON_ID) {
-//// if (getCurrentPage() instanceof IQueryButtomButtons) {
-//// ((IQueryButtomButtons) getCurrentPage()).performUpdateConfiguration();
-//// return true;
-//// }
}
return false;
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/messages.properties b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/messages.properties
index 7a09d0159..af2c94c84 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/messages.properties
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/messages.properties
@@ -157,5 +157,5 @@ AbstractTaskRepositoryPage_Validation_failed=Validation failed
LocalRepositorySettingsPage_Configure_the_local_repository=Configure the local repository
LocalRepositorySettingsPage_Local_Repository_Settings=Local Repository Settings
-QueryWizardDialog_Clear_Fields=Clear fields
-QueryWizardDialog_Update_Attributes_from_Repository=Update Attributes from Repository
+QueryWizardDialog_Clear_Fields=Clear Fields
+QueryWizardDialog_Update_Attributes_from_Repository=Refresh Configuration

Back to the top