Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbecker2010-07-26 07:03:41 +0000
committerfbecker2010-07-26 07:03:41 +0000
commitefb82bc1b4cc5b0b19f658e30f9f6b740f2fa22e (patch)
treec9e15379ab30463ee98a60661c74c6740d4bad3c /org.eclipse.mylyn.bugzilla.ui
parent4387ec177391149e4ed9835c430c6469163f15f6 (diff)
downloadorg.eclipse.mylyn.tasks-efb82bc1b4cc5b0b19f658e30f9f6b740f2fa22e.tar.gz
org.eclipse.mylyn.tasks-efb82bc1b4cc5b0b19f658e30f9f6b740f2fa22e.tar.xz
org.eclipse.mylyn.tasks-efb82bc1b4cc5b0b19f658e30f9f6b740f2fa22e.zip
ASSIGNED - bug 320202: [patch] add support for use... administation parameters
https://bugs.eclipse.org/bugs/show_bug.cgi?id=320202
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui')
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java114
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/Messages.java14
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/messages.properties7
4 files changed, 131 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java
index 83a3f61c9..c9ed2d0ff 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java
@@ -39,6 +39,8 @@ public class BugzillaUiPlugin extends AbstractUIPlugin {
public static final String EDITOR_PAGE_CONTEXT = BugzillaUiPlugin.ID_PLUGIN + ".bugzillaEditorContext"; //$NON-NLS-1$
+ public static final String ATTACHMENT_WIZARD_SETTINGS_SECTION = "BugzillaAttachmentWizard."; //$NON-NLS-1$
+
// The is's for hit markers used in the label provider and sorters
public static final String HIT_MARKER_ATTR_ID = "taskId"; //$NON-NLS-1$
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java
index 1ab58cfbf..0d3da3a53 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java
@@ -36,6 +36,8 @@ import org.eclipse.mylyn.internal.bugzilla.core.BugzillaStatus;
import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
import org.eclipse.mylyn.internal.bugzilla.core.RepositoryConfiguration;
import org.eclipse.mylyn.internal.tasks.core.IRepositoryConstants;
+import org.eclipse.mylyn.internal.tasks.core.RepositoryTemplateManager;
+import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.tasks.core.RepositoryStatus;
import org.eclipse.mylyn.tasks.core.RepositoryTemplate;
import org.eclipse.mylyn.tasks.core.TaskRepository;
@@ -47,12 +49,12 @@ import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
@@ -101,6 +103,18 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
private Button useXMLRPCstatusTransitions;
+ private Button useclassification;
+
+ private Button usetargetmilestone;
+
+ private Button useqacontact;
+
+ private Button usestatuswhiteboard;
+
+ private Button usebugaliases;
+
+ private Button use_see_also;
+
public BugzillaRepositorySettingsPage(TaskRepository taskRepository) {
super(TITLE, DESCRIPTION, taskRepository);
setNeedsAnonymousLogin(true);
@@ -117,6 +131,19 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
if (template.characterEncoding != null) {
setEncoding(template.characterEncoding);
}
+ boolean value = Boolean.parseBoolean(template.getAttribute("useclassification")); //$NON-NLS-1$
+ useclassification.setSelection(value);
+ value = Boolean.parseBoolean(template.getAttribute("usetargetmilestone")); //$NON-NLS-1$
+ usetargetmilestone.setSelection(value);
+ value = Boolean.parseBoolean(template.getAttribute("useqacontact")); //$NON-NLS-1$
+ useqacontact.setSelection(value);
+ value = Boolean.parseBoolean(template.getAttribute("usestatuswhiteboard")); //$NON-NLS-1$
+ usestatuswhiteboard.setSelection(value);
+ value = Boolean.parseBoolean(template.getAttribute("usebugaliases")); //$NON-NLS-1$
+ usebugaliases.setSelection(value);
+ value = Boolean.parseBoolean(template.getAttribute("use_see_also")); //$NON-NLS-1$
+ use_see_also.setSelection(value);
+
getContainer().updateButtons();
}
@@ -249,11 +276,11 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
.applyTo(descriptorComposite);
descriptorFile = new Text(descriptorComposite, SWT.BORDER);
- GridData gd = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1);
- gd.widthHint = 200;
- gd.horizontalAlignment = SWT.FILL;
- gd.verticalAlignment = SWT.CENTER;
- descriptorFile.setLayoutData(gd);
+ GridDataFactory.fillDefaults()
+ .grab(true, false)
+ .align(SWT.LEFT, SWT.CENTER)
+ .hint(200, SWT.DEFAULT)
+ .applyTo(descriptorFile);
Button browseDescriptor = new Button(descriptorComposite, SWT.PUSH);
browseDescriptor.setText(Messages.BugzillaRepositorySettingsPage_Browse_descriptor);
@@ -306,6 +333,69 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
languageSettingCombo.select(languageSettingCombo.indexOf(IBugzillaConstants.DEFAULT_LANG));
}
}
+ Group adminGroup = new Group(parent, SWT.SHADOW_ETCHED_IN);
+ adminGroup.setLayout(new GridLayout(3, false));
+ adminGroup.setText(Messages.BugzillaRepositorySettingsPage_admin_parameter);
+ GridDataFactory.fillDefaults()
+ .grab(true, false)
+ .align(SWT.BEGINNING, SWT.CENTER)
+ .span(2, 1)
+ .applyTo(adminGroup);
+
+ useclassification = new Button(adminGroup, SWT.CHECK | SWT.LEFT);
+ useclassification.setText(Messages.BugzillaRepositorySettingsPage_useclassification);
+ usetargetmilestone = new Button(adminGroup, SWT.CHECK | SWT.LEFT);
+ usetargetmilestone.setText(Messages.BugzillaRepositorySettingsPage_usetargetmilestone);
+ useqacontact = new Button(adminGroup, SWT.CHECK | SWT.LEFT);
+ useqacontact.setText(Messages.BugzillaRepositorySettingsPage_useqacontact);
+ usestatuswhiteboard = new Button(adminGroup, SWT.CHECK | SWT.LEFT);
+ usestatuswhiteboard.setText(Messages.BugzillaRepositorySettingsPage_usestatuswhiteboard);
+ usebugaliases = new Button(adminGroup, SWT.CHECK | SWT.LEFT);
+ usebugaliases.setText(Messages.BugzillaRepositorySettingsPage_usebugaliases);
+ use_see_also = new Button(adminGroup, SWT.CHECK | SWT.LEFT);
+ use_see_also.setText(Messages.BugzillaRepositorySettingsPage_use_see_also);
+ if (repository != null) {
+ RepositoryTemplate myTemplate = null;
+ if (repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USECLASSIFICATION) == null) {
+ final RepositoryTemplateManager templateManager = TasksUiPlugin.getRepositoryTemplateManager();
+ for (RepositoryTemplate template : templateManager.getTemplates(connector.getConnectorKind())) {
+ if (repository.getRepositoryLabel().equals(template.label)) {
+ myTemplate = template;
+ break;
+ }
+ }
+
+ }
+ if (myTemplate != null) {
+ // we have an Template but no values in the Repository so we use the Template values
+ boolean value = Boolean.parseBoolean(myTemplate.getAttribute("useclassification")); //$NON-NLS-1$
+ useclassification.setSelection(value);
+ value = Boolean.parseBoolean(myTemplate.getAttribute("usetargetmilestone")); //$NON-NLS-1$
+ usetargetmilestone.setSelection(value);
+ value = Boolean.parseBoolean(myTemplate.getAttribute("useqacontact")); //$NON-NLS-1$
+ useqacontact.setSelection(value);
+ value = Boolean.parseBoolean(myTemplate.getAttribute("usestatuswhiteboard")); //$NON-NLS-1$
+ usestatuswhiteboard.setSelection(value);
+ value = Boolean.parseBoolean(myTemplate.getAttribute("usebugaliases")); //$NON-NLS-1$
+ usebugaliases.setSelection(value);
+ value = Boolean.parseBoolean(myTemplate.getAttribute("use_see_also")); //$NON-NLS-1$
+ use_see_also.setSelection(value);
+ } else {
+ // we use the repository values
+ boolean value = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USECLASSIFICATION));
+ useclassification.setSelection(value);
+ value = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USETARGETMILESTONE));
+ usetargetmilestone.setSelection(value);
+ value = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT));
+ useqacontact.setSelection(value);
+ value = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USESTATUSWHITEBOARD));
+ usestatuswhiteboard.setSelection(value);
+ value = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USEBUGALIASES));
+ usebugaliases.setSelection(value);
+ value = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.BUGZILLA_PARAM_USE_SEE_ALSO));
+ use_see_also.setSelection(value);
+ }
+ }
}
private void populateOsCombo() {
@@ -379,6 +469,18 @@ public class BugzillaRepositorySettingsPage extends AbstractRepositorySettingsPa
repository.removeProperty(IBugzillaConstants.BUGZILLA_DEF_PLATFORM);
repository.removeProperty(IBugzillaConstants.BUGZILLA_DEF_OS);
}
+ repository.setProperty(IBugzillaConstants.BUGZILLA_PARAM_USECLASSIFICATION,
+ Boolean.toString(useclassification.getSelection()));
+ repository.setProperty(IBugzillaConstants.BUGZILLA_PARAM_USETARGETMILESTONE,
+ Boolean.toString(usetargetmilestone.getSelection()));
+ repository.setProperty(IBugzillaConstants.BUGZILLA_PARAM_USEQACONTACT,
+ Boolean.toString(useqacontact.getSelection()));
+ repository.setProperty(IBugzillaConstants.BUGZILLA_PARAM_USESTATUSWHITEBOARD,
+ Boolean.toString(usestatuswhiteboard.getSelection()));
+ repository.setProperty(IBugzillaConstants.BUGZILLA_PARAM_USEBUGALIASES,
+ Boolean.toString(usebugaliases.getSelection()));
+ repository.setProperty(IBugzillaConstants.BUGZILLA_PARAM_USE_SEE_ALSO,
+ Boolean.toString(use_see_also.getSelection()));
}
@Override
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 890c025b4..62ab2c246 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
@@ -63,6 +63,8 @@ public class Messages extends NLS {
public static String BugzillaRepositorySettingsPage_AUTOTETECT_PLATFORM_AND_OS;
+ public static String BugzillaRepositorySettingsPage_admin_parameter;
+
public static String BugzillaRepositorySettingsPage_available_once_repository_created;
public static String BugzillaRepositorySettingsPage_Browse_descriptor;
@@ -93,6 +95,18 @@ public class Messages extends NLS {
public static String BugzillaRepositorySettingsPage_supports_bugzilla_X;
+ public static String BugzillaRepositorySettingsPage_use_see_also;
+
+ public static String BugzillaRepositorySettingsPage_usebugaliases;
+
+ public static String BugzillaRepositorySettingsPage_useclassification;
+
+ public static String BugzillaRepositorySettingsPage_useqacontact;
+
+ public static String BugzillaRepositorySettingsPage_usestatuswhiteboard;
+
+ public static String BugzillaRepositorySettingsPage_usetargetmilestone;
+
public static String BugzillaRepositorySettingsPage_UseXmlRpc;
public static String BugzillaRepositorySettingsPage_Validating_server_settings;
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 70bd1f442..b6e08e459 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
@@ -30,6 +30,7 @@ BugzillaQueryTypeWizardPage_Select_from_the_available_query_types=Select from th
BugzillaRepositorySettingsPage_All=All
BugzillaRepositorySettingsPage_AutodetectWorkflow=Autodetect workflow:
BugzillaRepositorySettingsPage_AUTOTETECT_PLATFORM_AND_OS=Autodetect platform and os
+BugzillaRepositorySettingsPage_admin_parameter=admin parameter
BugzillaRepositorySettingsPage_available_once_repository_created=Available once repository has been created.
BugzillaRepositorySettingsPage_Browse_descriptor=Browse
BugzillaRepositorySettingsPage_bugzilla_repository_settings=Bugzilla Repository Settings
@@ -45,6 +46,12 @@ BugzillaRepositorySettingsPage_Retrieving_repository_configuration=Retrieving re
BugzillaRepositorySettingsPage_SelectDescriptorFile=Select descriptor file
BugzillaRepositorySettingsPage_Server_URL_is_invalid=Server URL is invalid.
BugzillaRepositorySettingsPage_supports_bugzilla_X=Supports Bugzilla {0}
+BugzillaRepositorySettingsPage_use_see_also=use_see_also
+BugzillaRepositorySettingsPage_usebugaliases=usebugaliases
+BugzillaRepositorySettingsPage_useclassification=useclassification
+BugzillaRepositorySettingsPage_useqacontact=useqacontact
+BugzillaRepositorySettingsPage_usestatuswhiteboard=usestatuswhiteboard
+BugzillaRepositorySettingsPage_usetargetmilestone=usetargetmilestone
BugzillaRepositorySettingsPage_UseXmlRpc=Use xmlrpc.cgi
BugzillaRepositorySettingsPage_Validating_server_settings=Validating server settings
BugzillaTaskAttachmentPage_Advanced=Advanced

Back to the top