Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2009-10-14 20:55:50 -0400
committerrelves2009-10-14 20:55:50 -0400
commite1fd2364854eced69cae463d054304e4ba9e87a2 (patch)
treecd863e73c0273f20a71197dbdb7f38d4817c68fa
parenteae952b1cfe2576a2f1bd72f8e5033574086113a (diff)
downloadorg.eclipse.mylyn.tasks-e1fd2364854eced69cae463d054304e4ba9e87a2.tar.gz
org.eclipse.mylyn.tasks-e1fd2364854eced69cae463d054304e4ba9e87a2.tar.xz
org.eclipse.mylyn.tasks-e1fd2364854eced69cae463d054304e4ba9e87a2.zip
RESOLVED - bug 292307: [releng] conduct manual tests for Mylyn 3.3
https://bugs.eclipse.org/bugs/show_bug.cgi?id=292307
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java71
1 files changed, 39 insertions, 32 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java
index 7f8cb6c93..b02e450cc 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java
@@ -396,47 +396,54 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
// Note: setting current version to latest assumes the data arriving here is either for a new task or is
// fresh from the repository (not locally stored data that may not have been migrated).
taskData.setVersion(TaskDataVersion.VERSION_CURRENT.toString());
+ try {
+ monitor = Policy.monitorFor(monitor);
- RepositoryConfiguration repositoryConfiguration = connector.getRepositoryConfiguration(repository, false,
- monitor);
-
- if (repositoryConfiguration == null) {
- return false;
- }
+ monitor.beginTask("Initialize Task Data", IProgressMonitor.UNKNOWN); //$NON-NLS-1$
- if (taskData.isNew()) {
- String product = null;
- String component = null;
- if (initializationData == null || initializationData.getProduct() == null) {
- if (repositoryConfiguration.getProducts().size() > 0) {
- product = repositoryConfiguration.getProducts().get(0);
- }
- } else {
- product = initializationData.getProduct();
- }
+ RepositoryConfiguration repositoryConfiguration = connector.getRepositoryConfiguration(repository, false,
+ monitor);
- if (product == null) {
+ if (repositoryConfiguration == null) {
return false;
}
- if (initializationData != null && initializationData.getComponent() != null
- && initializationData.getComponent().length() > 0) {
- component = initializationData.getComponent();
- }
+ if (taskData.isNew()) {
+ String product = null;
+ String component = null;
+ if (initializationData == null || initializationData.getProduct() == null) {
+ if (repositoryConfiguration.getProducts().size() > 0) {
+ product = repositoryConfiguration.getProducts().get(0);
+ }
+ } else {
+ product = initializationData.getProduct();
+ }
- if (component == null && repositoryConfiguration.getComponents(product).size() > 0) {
- component = repositoryConfiguration.getComponents(product).get(0);
- }
+ if (product == null) {
+ return false;
+ }
- initializeNewTaskDataAttributes(repositoryConfiguration, taskData, product, component, monitor);
- if (connector != null) {
- connector.setPlatformDefaultsOrGuess(repository, taskData);
- }
- return true;
+ if (initializationData != null && initializationData.getComponent() != null
+ && initializationData.getComponent().length() > 0) {
+ component = initializationData.getComponent();
+ }
- } else {
- boolean shortLogin = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.REPOSITORY_SETTING_SHORT_LOGIN));
- repositoryConfiguration.configureTaskData(taskData, shortLogin, connector);
+ if (component == null && repositoryConfiguration.getComponents(product).size() > 0) {
+ component = repositoryConfiguration.getComponents(product).get(0);
+ }
+
+ initializeNewTaskDataAttributes(repositoryConfiguration, taskData, product, component, monitor);
+ if (connector != null) {
+ connector.setPlatformDefaultsOrGuess(repository, taskData);
+ }
+ return true;
+
+ } else {
+ boolean shortLogin = Boolean.parseBoolean(repository.getProperty(IBugzillaConstants.REPOSITORY_SETTING_SHORT_LOGIN));
+ repositoryConfiguration.configureTaskData(taskData, shortLogin, connector);
+ }
+ } finally {
+ monitor.done();
}
return true;
}

Back to the top