Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-01-19 13:43:41 -0500
committermkersten2007-01-19 13:43:41 -0500
commit0b5898baf18b1c0fc7af5b5c7b77da49712e1247 (patch)
tree11a3dcfb4d27dad72864c956be2f88b9bb0305a9 /org.eclipse.mylyn.bugzilla.ui
parent7615bbf51849927382d535be72b9d79fe914defe (diff)
downloadorg.eclipse.mylyn.tasks-0b5898baf18b1c0fc7af5b5c7b77da49712e1247.tar.gz
org.eclipse.mylyn.tasks-0b5898baf18b1c0fc7af5b5c7b77da49712e1247.tar.xz
org.eclipse.mylyn.tasks-0b5898baf18b1c0fc7af5b5c7b77da49712e1247.zip
NEW - bug 171077: remove pre 1.0 migration code
https://bugs.eclipse.org/bugs/show_bug.cgi?id=171077
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui')
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java102
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java18
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskExternalizer.java30
3 files changed, 0 insertions, 150 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 afd8b06b1..fb33f95ad 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
@@ -112,8 +112,6 @@ public class BugzillaUiPlugin extends AbstractUIPlugin {
.getRepositoryManager().getRepositoryConnector(BugzillaCorePlugin.REPOSITORY_KIND);
TasksUiPlugin.getRepositoryManager().addListener(bugzillaConnector.getClientManager());
-
- // migrateOldAuthenticationData();
}
/**
@@ -316,103 +314,3 @@ public class BugzillaUiPlugin extends AbstractUIPlugin {
}
}
}
-
-// @SuppressWarnings("unchecked")
-// private void migrateOldAuthenticationData() {
-// String OLD_PREF_SERVER = "BUGZILLA_SERVER";
-// String serverUrl =
-// BugzillaPlugin.getDefault().getPreferenceStore().getString(OLD_PREF_SERVER);
-// if (serverUrl != null && serverUrl.trim() != "") {
-// URL oldFakeUrl = null;
-// try {
-// oldFakeUrl = new URL("http://org.eclipse.mylar.bugzilla");
-// } catch (MalformedURLException e) {
-// BugzillaPlugin.log(new Status(IStatus.WARNING, BugzillaPlugin.PLUGIN_ID,
-// IStatus.OK,
-// "Bad temp server url: BugzillaPreferencePage", e));
-// }
-//
-// String user = "";
-// String password = "";
-// Map<String, String> map = Platform.getAuthorizationInfo(oldFakeUrl,
-// "Bugzilla",
-// BugzillaPreferencePage.AUTH_SCHEME);
-//
-// // get the information from the map and save it
-// if (map != null && !map.isEmpty()) {
-// String username = map.get(BugzillaPreferencePage.INFO_USERNAME);
-// if (username != null)
-// user = username;
-//
-// String pwd = map.get(BugzillaPreferencePage.INFO_PASSWORD);
-// if (pwd != null)
-// password = pwd;
-// }
-// TaskRepository repository;
-// // try {
-// repository = new TaskRepository(BugzillaPlugin.REPOSITORY_KIND, serverUrl);
-// repository.setAuthenticationCredentials(user, password);
-// MylarTaskListPlugin.getRepositoryManager().addRepository(repository);
-// BugzillaPlugin.getDefault().getPreferenceStore().setValue(OLD_PREF_SERVER,
-// "");
-// // } catch (MalformedURLException e) {
-// // MylarStatusHandler.fail(e, "could not create default repository",
-// // true);
-// // }
-// try {
-// // reset the authorization
-// Platform.addAuthorizationInfo(oldFakeUrl, "Bugzilla",
-// BugzillaPreferencePage.AUTH_SCHEME, new HashMap<String, String>());
-// } catch (CoreException e) {
-// // ignore
-// }
-// }
-// }
-
-// private void readOfflineReportsFile() {
-// IPath offlineReportsPath = getOfflineReportsFilePath();
-//
-// try {
-// offlineReportsFile = new OfflineTaskManager(offlineReportsPath.toFile(),
-// true);
-// } catch (Exception e) {
-// MylarStatusHandler.log(e,
-// "Could not restore offline Bugzilla reports file, creating new one
-// (possible version incompatibility)");
-// offlineReportsPath.toFile().delete();
-// // if (offlineReportsPath.toFile().delete()) {
-// try {
-// offlineReportsFile = new OfflineTaskManager(offlineReportsPath.toFile(),
-// false);
-// } catch (Exception e1) {
-// MylarStatusHandler.fail(e, "could not reset offline Bugzilla reports
-// file", true);
-// }
-// // } else {
-// // MylarStatusHandler.fail(null, "reset of Bugzilla offline reports file
-// failed", true);
-// // }
-// }
-// }
-//
-// /**
-// * Returns the path to the file cacheing the offline bug reports.
-// */
-// private IPath getOfflineReportsFilePath() {
-// IPath stateLocation =
-// Platform.getStateLocation(BugzillaPlugin.getDefault().getBundle());
-// IPath configFile = stateLocation.append("offlineReports");
-// return configFile;
-// }
-//
-// public OfflineTaskManager getOfflineReportsFile() {
-// if (offlineReportsFile == null) {
-// MylarStatusHandler.fail(null, "Offline reports file not created, try
-// restarting.", true);
-// }
-// return offlineReportsFile;
-// }
-
-// public List<BugzillaReport> getSavedBugReports() {
-// return offlineReportsFile.elements();
-// }
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java
index 4e27f5678..4d18dd231 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java
@@ -17,7 +17,6 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaCorePlugin;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaRepositoryConnector;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaTask;
-import org.eclipse.mylar.tasks.core.RepositoryTaskAttribute;
import org.eclipse.mylar.tasks.core.RepositoryTaskData;
import org.eclipse.mylar.tasks.core.TaskRepository;
import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
@@ -38,8 +37,6 @@ public class BugzillaTaskEditorInput extends RepositoryTaskEditorInput {
public BugzillaTaskEditorInput(TaskRepository repository, BugzillaTask bugTask, boolean offline) {
super(repository, bugTask.getHandleIdentifier(), bugTask.getUrl());
this.bugTask = bugTask;
- migrateDescToReadOnly(getTaskData());
- migrateDescToReadOnly(getOldTaskData());
updateOptions(getTaskData());
updateOptions(getOldTaskData());
}
@@ -59,11 +56,6 @@ public class BugzillaTaskEditorInput extends RepositoryTaskEditorInput {
return null;
}
- // @Override
- // public String getName() {
- // return bugTask.getDescription();
- // }
-
@Override
public IPersistableElement getPersistable() {
return null;
@@ -87,16 +79,6 @@ public class BugzillaTaskEditorInput extends RepositoryTaskEditorInput {
return bugTask;
}
- // TODO: migration code 0.6.1 -> 0.6.2
- private void migrateDescToReadOnly(RepositoryTaskData taskData) {
- if (taskData != null) {
- RepositoryTaskAttribute attrib = taskData.getDescriptionAttribute();
- if (attrib != null) {
- attrib.setReadOnly(true);
- }
- }
- }
-
// TODO: repository configuration update (remove at some point)
private void updateOptions(RepositoryTaskData taskData) {
try {
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskExternalizer.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskExternalizer.java
index 2b0c076c3..90765b928 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskExternalizer.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskExternalizer.java
@@ -11,9 +11,6 @@
package org.eclipse.mylar.internal.bugzilla.ui.tasklist;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
import org.eclipse.mylar.internal.bugzilla.core.BugzillaQueryHit;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaRepositoryQuery;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaTask;
@@ -37,8 +34,6 @@ public class BugzillaTaskExternalizer extends DelegatingTaskExternalizer {
private static final String STATUS_NEW = "NEW";
- private static final String KEY_OLD_LAST_DATE = "LastDate";
-
private static final String TAG_BUGZILLA_QUERY_HIT = "Bugzilla" + KEY_QUERY_HIT;
private static final String TAG_BUGZILLA_QUERY = "Bugzilla" + KEY_QUERY;
@@ -127,31 +122,6 @@ public class BugzillaTaskExternalizer extends DelegatingTaskExternalizer {
}
BugzillaTask task = new BugzillaTask(handle, label, false);
super.readTaskInfo(task, taskList, element, parent, category);
-
- if (!element.hasAttribute(KEY_LAST_MOD_DATE) || element.getAttribute(KEY_LAST_MOD_DATE).equals("")) {
- // migrate to new time stamp 0.5.3 -> 0.6.0
- try {
- if (element.hasAttribute(KEY_OLD_LAST_DATE)) {
- String DATE_FORMAT_2 = "yyyy-MM-dd HH:mm:ss";
- SimpleDateFormat delta_ts_format = new SimpleDateFormat(DATE_FORMAT_2);
- String oldDateStamp = "";
- try {
- oldDateStamp = delta_ts_format.format(new Date(
- new Long(element.getAttribute(KEY_OLD_LAST_DATE)).longValue()));
- task.setLastSyncDateStamp(oldDateStamp);
- } catch (NumberFormatException e) {
- // For those who may have been working from head...
- Date parsedDate = delta_ts_format.parse(element.getAttribute(KEY_OLD_LAST_DATE));
- if (parsedDate != null) {
- oldDateStamp = element.getAttribute(KEY_OLD_LAST_DATE);
- task.setLastSyncDateStamp(oldDateStamp);
- }
- }
- }
- } catch (Exception e) {
- // invalid date format/parse
- }
- }
return task;
}

Back to the top