diff options
author | mkersten | 2007-06-08 02:46:14 +0000 |
---|---|---|
committer | mkersten | 2007-06-08 02:46:14 +0000 |
commit | 8724cdcfd3f1901f2daa614ba905b4b4ac61e4ed (patch) | |
tree | 2049ceb51efb0762fc84760e05702d05eff0830e /org.eclipse.mylyn.tasks.ui | |
parent | c903b2a2c43c7964e6ec36fbbd4561dffba1b355 (diff) | |
download | org.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.tasks.ui')
6 files changed, 22 insertions, 27 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryAwareStatusHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryAwareStatusHandler.java index 739b26703..0d31e8550 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryAwareStatusHandler.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryAwareStatusHandler.java @@ -16,8 +16,7 @@ import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.mylyn.core.IStatusHandler; import org.eclipse.mylyn.core.MylarStatusHandler; import org.eclipse.mylyn.internal.tasks.ui.util.WebBrowserDialog; -import org.eclipse.mylyn.tasks.core.IMylarStatusConstants; -import org.eclipse.mylyn.tasks.core.MylarStatus; +import org.eclipse.mylyn.tasks.core.RepositoryStatus; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.PlatformUI; @@ -53,7 +52,7 @@ public class RepositoryAwareStatusHandler implements IStatusHandler { public void displayStatus(final String title, final IStatus status) { - if (status.getCode() == IMylarStatusConstants.INTERNAL_ERROR) { + if (status.getCode() == RepositoryStatus.ERROR_INTERNAL) { MylarStatusHandler.log(status); fail(status, true); return; @@ -69,9 +68,9 @@ public class RepositoryAwareStatusHandler implements IStatusHandler { shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); } - if (status instanceof MylarStatus && ((MylarStatus) status).isHtmlMessage()) { + if (status instanceof RepositoryStatus && ((RepositoryStatus) status).isHtmlMessage()) { WebBrowserDialog.openAcceptAgreement(shell, title, status.getMessage(), - ((MylarStatus) status).getHtmlMessage()); + ((RepositoryStatus) status).getHtmlMessage()); return; } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyAttachmentToClipboardJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyAttachmentToClipboardJob.java index cc1c4ea78..d555ea1a7 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyAttachmentToClipboardJob.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyAttachmentToClipboardJob.java @@ -18,9 +18,8 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.mylyn.core.MylarStatusHandler; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.IAttachmentHandler; -import org.eclipse.mylyn.tasks.core.IMylarStatusConstants; -import org.eclipse.mylyn.tasks.core.MylarStatus; import org.eclipse.mylyn.tasks.core.RepositoryAttachment; +import org.eclipse.mylyn.tasks.core.RepositoryStatus; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; import org.eclipse.swt.dnd.Clipboard; @@ -49,7 +48,7 @@ public class CopyAttachmentToClipboardJob extends Job { attachment.getRepositoryKind()); IAttachmentHandler handler = connector.getAttachmentHandler(); if (handler == null) { - return new MylarStatus(IStatus.INFO, TasksUiPlugin.PLUGIN_ID, IMylarStatusConstants.INTERNAL_ERROR, + return new RepositoryStatus(IStatus.INFO, TasksUiPlugin.PLUGIN_ID, RepositoryStatus.ERROR_INTERNAL, "The repository does not support attachments."); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTipHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTipHandler.java index 4c9616bf8..7482a3547 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTipHandler.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTipHandler.java @@ -30,7 +30,7 @@ import org.eclipse.mylyn.tasks.core.AbstractTaskContainer; import org.eclipse.mylyn.tasks.core.DateRangeContainer; import org.eclipse.mylyn.tasks.core.ITask; import org.eclipse.mylyn.tasks.core.ITaskListElement; -import org.eclipse.mylyn.tasks.core.MylarStatus; +import org.eclipse.mylyn.tasks.core.RepositoryStatus; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.core.AbstractRepositoryTask.RepositoryTaskSyncState; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; @@ -255,7 +255,7 @@ public class TaskListToolTipHandler { } if (query.getStatus() != null) { tooltip += "\n" + "Last Error: " + query.getStatus().getMessage(); - if (query.getStatus() instanceof MylarStatus && ((MylarStatus) query.getStatus()).isHtmlMessage()) { + if (query.getStatus() instanceof RepositoryStatus && ((RepositoryStatus) query.getStatus()).isHtmlMessage()) { tooltip += " Please synchronize manually for full error message."; } tooltip += "\n"; diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java index 89eb2ff60..7fe55f3ed 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java @@ -35,10 +35,9 @@ import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractRepositoryTask; import org.eclipse.mylyn.tasks.core.IAttachmentHandler; -import org.eclipse.mylyn.tasks.core.IMylarStatusConstants; import org.eclipse.mylyn.tasks.core.ITask; import org.eclipse.mylyn.tasks.core.LocalAttachment; -import org.eclipse.mylyn.tasks.core.MylarStatus; +import org.eclipse.mylyn.tasks.core.RepositoryStatus; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.core.AbstractRepositoryTask.RepositoryTaskSyncState; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; @@ -144,7 +143,7 @@ public class NewAttachmentWizard extends Wizard { if (InputAttachmentSourcePage.CLIPBOARD_LABEL.equals(path)) { String contents = inputPage.getClipboardContents(); if (contents == null) { - throw new InvocationTargetException(new CoreException(new MylarStatus(IStatus.ERROR, TasksUiPlugin.PLUGIN_ID, IMylarStatusConstants.INTERNAL_ERROR, "Clipboard is empty", null))); + throw new InvocationTargetException(new CoreException(new RepositoryStatus(IStatus.ERROR, TasksUiPlugin.PLUGIN_ID, RepositoryStatus.ERROR_INTERNAL, "Clipboard is empty", null))); } attachment.setContent(contents.getBytes()); attachment.setFilename(CLIPBOARD_FILENAME); @@ -244,7 +243,7 @@ public class NewAttachmentWizard extends Wizard { } private void handleSubmitError(final CoreException exception) { - if (exception.getStatus().getCode() == IMylarStatusConstants.REPOSITORY_LOGIN_ERROR) { + if (exception.getStatus().getCode() == RepositoryStatus.ERROR_REPOSITORY_LOGIN) { if (TasksUiUtil.openEditRepositoryWizard(repository) == MessageDialog.OK) { // performFinish(); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java index f15db3265..a7dc0e5f9 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java @@ -81,13 +81,12 @@ import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; import org.eclipse.mylyn.tasks.core.AbstractRepositoryTask; import org.eclipse.mylyn.tasks.core.AbstractTaskContainer; import org.eclipse.mylyn.tasks.core.IAttachmentHandler; -import org.eclipse.mylyn.tasks.core.IMylarStatusConstants; import org.eclipse.mylyn.tasks.core.ITask; import org.eclipse.mylyn.tasks.core.ITaskDataHandler; import org.eclipse.mylyn.tasks.core.ITaskListChangeListener; -import org.eclipse.mylyn.tasks.core.MylarStatus; import org.eclipse.mylyn.tasks.core.RepositoryAttachment; import org.eclipse.mylyn.tasks.core.RepositoryOperation; +import org.eclipse.mylyn.tasks.core.RepositoryStatus; import org.eclipse.mylyn.tasks.core.RepositoryTaskAttribute; import org.eclipse.mylyn.tasks.core.RepositoryTaskData; import org.eclipse.mylyn.tasks.core.TaskComment; @@ -2722,8 +2721,8 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage { } else { // null taskId, assume task could not be created... throw new CoreException( - new MylarStatus(IStatus.ERROR, TasksUiPlugin.PLUGIN_ID, - IMylarStatusConstants.INTERNAL_ERROR, + new RepositoryStatus(IStatus.ERROR, TasksUiPlugin.PLUGIN_ID, + RepositoryStatus.ERROR_INTERNAL, "Task could not be created. No additional information was provided by the connector.")); } } else { @@ -2906,16 +2905,16 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { if (form != null && !form.isDisposed()) { - if (exception.getStatus().getCode() == IMylarStatusConstants.IO_ERROR) { + if (exception.getStatus().getCode() == RepositoryStatus.ERROR_IO) { parentEditor.setMessage(ERROR_NOCONNECTIVITY, IMessageProvider.ERROR); MylarStatusHandler.log(exception.getStatus()); - } else if (exception.getStatus().getCode() == IMylarStatusConstants.REPOSITORY_COMMENT_REQD) { + } else if (exception.getStatus().getCode() == RepositoryStatus.REPOSITORY_COMMENT_REQUIRED) { MylarStatusHandler.displayStatus("Comment required", exception.getStatus()); if (!isDisposed && newCommentTextViewer != null && !newCommentTextViewer.getControl().isDisposed()) { newCommentTextViewer.getControl().setFocus(); } - } else if (exception.getStatus().getCode() == IMylarStatusConstants.REPOSITORY_LOGIN_ERROR) { + } else if (exception.getStatus().getCode() == RepositoryStatus.ERROR_REPOSITORY_LOGIN) { if (TasksUiUtil.openEditRepositoryWizard(repository) == MessageDialog.OK) { submitToRepository(); return; diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java index 3d13de861..1fe1aa6ac 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java @@ -19,9 +19,8 @@ import org.eclipse.jface.wizard.Wizard; import org.eclipse.mylyn.core.MylarStatusHandler; import org.eclipse.mylyn.tasks.core.AbstractAttributeFactory; import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; -import org.eclipse.mylyn.tasks.core.IMylarStatusConstants; import org.eclipse.mylyn.tasks.core.ITaskDataHandler; -import org.eclipse.mylyn.tasks.core.MylarStatus; +import org.eclipse.mylyn.tasks.core.RepositoryStatus; import org.eclipse.mylyn.tasks.core.RepositoryTaskData; import org.eclipse.mylyn.tasks.core.Task; import org.eclipse.mylyn.tasks.core.TaskRepository; @@ -64,8 +63,8 @@ public class NewTaskWizard extends Wizard implements INewWizard { final ITaskDataHandler taskDataHandler = (ITaskDataHandler) connector.getTaskDataHandler(); if (taskDataHandler == null) { - MylarStatusHandler.displayStatus("Error creating new task", new MylarStatus(IStatus.ERROR, - TasksUiPlugin.PLUGIN_ID, IMylarStatusConstants.REPOSITORY_ERROR, "The selected repository does not support creating new tasks.")); + MylarStatusHandler.displayStatus("Error creating new task", new RepositoryStatus(IStatus.ERROR, + TasksUiPlugin.PLUGIN_ID, RepositoryStatus.ERROR_REPOSITORY, "The selected repository does not support creating new tasks.")); return false; } @@ -80,8 +79,8 @@ public class NewTaskWizard extends Wizard implements INewWizard { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { if (!taskDataHandler.initializeTaskData(taskRepository, taskData, monitor)) { - throw new CoreException(new MylarStatus(IStatus.ERROR, - TasksUiPlugin.PLUGIN_ID, IMylarStatusConstants.REPOSITORY_ERROR, "The selected repository does not support creating new tasks.")); } + throw new CoreException(new RepositoryStatus(IStatus.ERROR, + TasksUiPlugin.PLUGIN_ID, RepositoryStatus.ERROR_REPOSITORY, "The selected repository does not support creating new tasks.")); } } catch (CoreException e) { throw new InvocationTargetException(e); } |