Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-06-07 22:46:14 -0400
committermkersten2007-06-07 22:46:14 -0400
commit8724cdcfd3f1901f2daa614ba905b4b4ac61e4ed (patch)
tree2049ceb51efb0762fc84760e05702d05eff0830e /org.eclipse.mylyn.trac.core/src
parentc903b2a2c43c7964e6ec36fbbd4561dffba1b355 (diff)
downloadorg.eclipse.mylyn.tasks-8724cdcfd3f1901f2daa614ba905b4b4ac61e4ed.tar.gz
org.eclipse.mylyn.tasks-8724cdcfd3f1901f2daa614ba905b4b4ac61e4ed.tar.xz
org.eclipse.mylyn.tasks-8724cdcfd3f1901f2daa614ba905b4b4ac61e4ed.zip
NEW - bug 191406: rename Mylar project to Mylyn
https://bugs.eclipse.org/bugs/show_bug.cgi?id=191406
Diffstat (limited to 'org.eclipse.mylyn.trac.core/src')
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttachmentHandler.java5
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracCorePlugin.java10
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracStatus.java3
3 files changed, 7 insertions, 11 deletions
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttachmentHandler.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttachmentHandler.java
index 779a57b9a..e1e469bd4 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttachmentHandler.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracAttachmentHandler.java
@@ -19,7 +19,6 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
import org.eclipse.mylyn.tasks.core.AbstractAttachmentHandler;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryTask;
-import org.eclipse.mylyn.tasks.core.IMylarStatusConstants;
import org.eclipse.mylyn.tasks.core.ITaskAttachment;
import org.eclipse.mylyn.tasks.core.RepositoryAttachment;
import org.eclipse.mylyn.tasks.core.RepositoryStatus;
@@ -42,7 +41,7 @@ public class TracAttachmentHandler extends AbstractAttachmentHandler {
String filename = attachment.getAttributeValue(RepositoryTaskAttribute.ATTACHMENT_FILENAME);
if (filename == null) {
throw new CoreException(new RepositoryStatus(repository.getUrl(), IStatus.ERROR, TracCorePlugin.PLUGIN_ID,
- IMylarStatusConstants.REPOSITORY_ERROR, "Attachment download from " + repository.getUrl()
+ RepositoryStatus.ERROR_REPOSITORY, "Attachment download from " + repository.getUrl()
+ " failed, missing attachment filename."));
}
@@ -59,7 +58,7 @@ public class TracAttachmentHandler extends AbstractAttachmentHandler {
String comment, IProgressMonitor monitor) throws CoreException {
if (!TracRepositoryConnector.hasAttachmentSupport(repository, task)) {
throw new CoreException(new RepositoryStatus(repository.getUrl(), IStatus.INFO, TracCorePlugin.PLUGIN_ID,
- IMylarStatusConstants.REPOSITORY_ERROR,
+ RepositoryStatus.ERROR_REPOSITORY,
"Attachments are not supported by this repository access type"));
}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracCorePlugin.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracCorePlugin.java
index f21db049c..30e53105b 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracCorePlugin.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracCorePlugin.java
@@ -17,8 +17,6 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.tasks.core.IMylarStatusConstants;
-import org.eclipse.mylyn.tasks.core.MylarStatus;
import org.eclipse.mylyn.tasks.core.RepositoryStatus;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.osgi.framework.BundleContext;
@@ -101,13 +99,13 @@ public class TracCorePlugin extends Plugin {
if (message == null) {
message = "I/O error has occured";
}
- return new MylarStatus(Status.ERROR, PLUGIN_ID, IMylarStatusConstants.IO_ERROR, message, e);
+ return new RepositoryStatus(Status.ERROR, PLUGIN_ID, RepositoryStatus.ERROR_IO, message, e);
} else if (e instanceof ClassCastException) {
- return new MylarStatus(Status.ERROR, PLUGIN_ID, IMylarStatusConstants.IO_ERROR, "Unexpected server response: " + e.getMessage(), e);
+ return new RepositoryStatus(Status.ERROR, PLUGIN_ID, RepositoryStatus.ERROR_IO, "Unexpected server response: " + e.getMessage(), e);
} else if (e instanceof MalformedURLException) {
- return new MylarStatus(Status.ERROR, PLUGIN_ID, IMylarStatusConstants.IO_ERROR, "Repository URL is invalid", e);
+ return new RepositoryStatus(Status.ERROR, PLUGIN_ID, RepositoryStatus.ERROR_IO, "Repository URL is invalid", e);
} else {
- return new MylarStatus(Status.ERROR, PLUGIN_ID, IMylarStatusConstants.INTERNAL_ERROR, "Unexpected error", e);
+ return new RepositoryStatus(Status.ERROR, PLUGIN_ID, RepositoryStatus.ERROR_INTERNAL, "Unexpected error", e);
}
}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracStatus.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracStatus.java
index 14c056a5b..029321469 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracStatus.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/TracStatus.java
@@ -12,7 +12,6 @@
package org.eclipse.mylyn.internal.trac.core;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.mylyn.tasks.core.IMylarStatusConstants;
import org.eclipse.mylyn.tasks.core.RepositoryStatus;
/**
@@ -21,7 +20,7 @@ import org.eclipse.mylyn.tasks.core.RepositoryStatus;
public class TracStatus {
public static IStatus createPermissionDeniedError(String repositoryUrl, String pluginId) {
- return new RepositoryStatus(repositoryUrl, IStatus.ERROR, TracCorePlugin.PLUGIN_ID, IMylarStatusConstants.PERMISSION_DENIED_ERROR, "Permission denied.");
+ return new RepositoryStatus(repositoryUrl, IStatus.ERROR, TracCorePlugin.PLUGIN_ID, RepositoryStatus.ERROR_PERMISSION_DENIED, "Permission denied.");
}
}

Back to the top