summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2013-07-30 04:59:08 (EDT)
committerTomasz Zarna2013-07-30 04:59:08 (EDT)
commit86fe06072030144cd314de8d824568ba0a920714 (patch)
tree584d22000b9fd1c4ea5f1c9c84e63bfd55eb86e9
parent193f49befd63eff68d49c7ff31b3a3ab3b5bb203 (diff)
downloadorg.eclipse.mylyn.tasks-86fe06072030144cd314de8d824568ba0a920714.zip
org.eclipse.mylyn.tasks-86fe06072030144cd314de8d824568ba0a920714.tar.gz
org.eclipse.mylyn.tasks-86fe06072030144cd314de8d824568ba0a920714.tar.bz2
411929: Provide a multi line text field for "Query URL"refs/changes/55/14955/1
Bug: 411929 Change-Id: Ie1a74c698fb60c035a50216de802390f15969801 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=411929 Signed-off-by: Tomasz Zarna <tomasz.zarna@tasktop.com>
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java25
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/messages.properties4
2 files changed, 10 insertions, 19 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java
index c2307f2..21ba64f 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 Tasktop Technologies and others.
+ * Copyright (c) 2004, 2013 Tasktop Technologies and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -37,14 +37,6 @@ import org.eclipse.swt.widgets.Text;
*/
public class BugzillaCustomQueryWizardPage extends AbstractRepositoryQueryPage {
- private static final String LABEL_CUSTOM_TITLE = Messages.BugzillaCustomQueryWizardPage_Query_Title;
-
- private static final String LABEL_CUSTOM_QUERY = Messages.BugzillaCustomQueryWizardPage_Query_URL;
-
- private static final String TITLE = Messages.BugzillaCustomQueryWizardPage_Create_query_from_URL;
-
- private static final String DESCRIPTION = Messages.BugzillaCustomQueryWizardPage_Enter_the_title_and_URL_for_the_query;
-
private static final Pattern URL_PATTERN = Pattern.compile("([a-zA-Z][a-zA-Z+.-]{0,10}://[a-zA-Z0-9%._~!$&?#'()*+,;:@/=-]*/buglist.cgi?[a-zA-Z0-9%_~!$&?#'(*+;:@/=-])"); //$NON-NLS-1$
private Text queryText;
@@ -54,10 +46,10 @@ public class BugzillaCustomQueryWizardPage extends AbstractRepositoryQueryPage {
private Text queryTitle;
public BugzillaCustomQueryWizardPage(TaskRepository repository, IRepositoryQuery query) {
- super(TITLE, repository, query);
+ super(Messages.BugzillaCustomQueryWizardPage_Create_query_from_URL, repository, query);
this.query = query;
- setTitle(TITLE);
- setDescription(DESCRIPTION);
+ setTitle(Messages.BugzillaCustomQueryWizardPage_Create_query_from_URL);
+ setDescription(Messages.BugzillaCustomQueryWizardPage_Enter_the_title_and_URL_for_the_query);
setImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
}
@@ -77,7 +69,7 @@ public class BugzillaCustomQueryWizardPage extends AbstractRepositoryQueryPage {
};
final Label queryTitleLabel = new Label(composite, SWT.NONE);
- queryTitleLabel.setText(LABEL_CUSTOM_TITLE);
+ queryTitleLabel.setText(Messages.BugzillaCustomQueryWizardPage_Query_Title);
queryTitle = new Text(composite, SWT.BORDER);
queryTitle.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
@@ -85,10 +77,10 @@ public class BugzillaCustomQueryWizardPage extends AbstractRepositoryQueryPage {
queryTitle.setFocus();
final Label queryUrlLabel = new Label(composite, SWT.NONE);
- queryUrlLabel.setText(LABEL_CUSTOM_QUERY);
+ queryUrlLabel.setText(Messages.BugzillaCustomQueryWizardPage_Query_URL);
- queryText = new Text(composite, SWT.BORDER);
- final GridData gd_queryText = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ queryText = new Text(composite, SWT.BORDER | SWT.MULTI | SWT.WRAP);
+ final GridData gd_queryText = new GridData(GridData.FILL_BOTH);
gd_queryText.widthHint = 300;
queryText.setLayoutData(gd_queryText);
queryText.addModifyListener(modifyListener);
@@ -119,7 +111,6 @@ public class BugzillaCustomQueryWizardPage extends AbstractRepositoryQueryPage {
return true;
} else {
setErrorMessage(Messages.BugzillaCustomQueryWizardPage_No_Valid_Buglist_URL);
-
return false;
}
}
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 83cc4d7..b223ce1 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
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2009, 2010 Tasktop Technologies and others.
+# Copyright (c) 2009, 2013 Tasktop Technologies and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -17,7 +17,7 @@ BugzillaCustomQueryWizardPage_Enter_the_title_and_URL_for_the_query=Enter the ti
BugzillaCustomQueryWizardPage_No_Valid_Buglist_URL=Please specify a valid Buglist URL (../buglist.cgi)
BugzillaCustomQueryWizardPage_Please_specify_Query_URL=Please specify Query URL
BugzillaCustomQueryWizardPage_Query_Title=&Query Title:
-BugzillaCustomQueryWizardPage_Query_URL=Query &URL
+BugzillaCustomQueryWizardPage_Query_URL=Query &URL:
BugzillaQueryTypeWizardPage_Choose_query_type=Choose query type
BugzillaQueryTypeWizardPage_Create_query_from_existing_URL=&Create query from existing URL