diff options
author | spingel | 2008-12-07 02:43:32 +0000 |
---|---|---|
committer | spingel | 2008-12-07 02:43:32 +0000 |
commit | d33eb31d15e3afe5b2ae2a889900822abf442a0f (patch) | |
tree | ce610b1084de060e1bfe1ccb35bfcddde1d99aef /org.eclipse.mylyn.tasks.ui/src/org/eclipse | |
parent | 08e69ac230eec2babe8ed437a2151411fb4557c1 (diff) | |
download | org.eclipse.mylyn.tasks-d33eb31d15e3afe5b2ae2a889900822abf442a0f.tar.gz org.eclipse.mylyn.tasks-d33eb31d15e3afe5b2ae2a889900822abf442a0f.tar.xz org.eclipse.mylyn.tasks-d33eb31d15e3afe5b2ae2a889900822abf442a0f.zip |
NEW - bug 253125: externalize strings for org.eclipse.mylyn.tasks.*
https://bugs.eclipse.org/bugs/show_bug.cgi?id=253125
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui/src/org/eclipse')
53 files changed, 830 insertions, 336 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractChangeCompletionAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractChangeCompletionAction.java index a6d89754a..a0e6c9319 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractChangeCompletionAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AbstractChangeCompletionAction.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2004, 2008 Tasktop Technologies and others. + * Copyright (c) 2004, 2008 Tasktop Technologies and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,6 +11,7 @@ package org.eclipse.mylyn.internal.tasks.ui.actions; +import java.text.MessageFormat; import java.util.List; import org.eclipse.jface.action.Action; @@ -38,18 +39,19 @@ public class AbstractChangeCompletionAction extends Action { } protected String generateMessage(List<AbstractTask> toComplete, String status) { - String message = "Mark selected local tasks " + status + "?\n\n"; + String message = MessageFormat.format(Messages.AbstractChangeCompletionAction_Mark_selected_local_tasks_X, status) + + "\n\n"; //$NON-NLS-1$ int i = 0; for (ITask task : toComplete) { i++; if (i < 20) { - message += " "; + message += " "; //$NON-NLS-1$ if (task.getTaskKey() != null) { - message += task.getTaskKey() + ": "; + message += task.getTaskKey() + ": "; //$NON-NLS-1$ } - message += task.getSummary() + "\n"; + message += task.getSummary() + "\n"; //$NON-NLS-1$ } else { - message += "..."; + message += "..."; //$NON-NLS-1$ break; } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskDialogAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskDialogAction.java index ae1d0ddfe..28f3f340c 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskDialogAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskDialogAction.java @@ -37,8 +37,8 @@ public class ActivateTaskDialogAction extends ActionDelegate implements IWorkben @Override public void run(IAction action) { TaskSelectionDialog dlg = new TaskSelectionDialog(window.getShell()); - dlg.setTitle("Activate Task"); - dlg.setMessage("&Select a task to activate (? = any character, * = any String):"); + dlg.setTitle(Messages.ActivateTaskDialogAction_Activate_Task); + dlg.setMessage(Messages.ActivateTaskDialogAction_Select_a_task_to_activate__); if (dlg.open() != Window.OK) { return; diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskHistoryDropDownAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskHistoryDropDownAction.java index 11abf32b2..27e408e4f 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskHistoryDropDownAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivateTaskHistoryDropDownAction.java @@ -34,9 +34,7 @@ import org.eclipse.ui.IWorkbenchWindowPulldownDelegate; */ public class ActivateTaskHistoryDropDownAction extends Action implements IWorkbenchWindowPulldownDelegate, IMenuCreator { - public static final String ID = "org.eclipse.mylyn.tasklist.actions.navigate.previous"; - - private static final String LABEL = "Activate Previous Task"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.navigate.previous"; //$NON-NLS-1$ private Menu dropDownMenu; @@ -47,8 +45,8 @@ public class ActivateTaskHistoryDropDownAction extends Action implements IWorkbe public ActivateTaskHistoryDropDownAction() { this.taskHistory = TasksUiPlugin.getTaskActivityManager().getTaskActivationHistory(); this.taskHistoryDropDown = new TaskHistoryDropDown(null, taskHistory); - setText(LABEL); - setToolTipText(LABEL); + setText(Messages.ActivateTaskHistoryDropDownAction_Activate_Previous_Task); + setToolTipText(Messages.ActivateTaskHistoryDropDownAction_Activate_Previous_Task); setId(ID); setEnabled(true); setImageDescriptor(TasksUiImages.CONTEXT_HISTORY_PREVIOUS); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java index 558cf3c67..9c239d923 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java @@ -36,15 +36,13 @@ import org.eclipse.ui.handlers.IHandlerService; * @author Mik Kersten * @author Steffen Pingel */ -// TODO 3.1 rename to AddTaskRepositoryAction public class AddRepositoryAction extends Action { - private static final String PREF_ADD_QUERY = "org.eclipse.mylyn.internal.tasks.add.query"; + private static final String PREF_ADD_QUERY = "org.eclipse.mylyn.internal.tasks.add.query"; //$NON-NLS-1$ - // TODO externalize and move to messages class - public static final String TITLE = "Add Task Repository"; + private static final String ID = "org.eclipse.mylyn.tasklist.repositories.add"; //$NON-NLS-1$ - private static final String ID = "org.eclipse.mylyn.tasklist.repositories.add"; + public static final String TITLE = Messages.AddRepositoryAction_Add_Task_Repository; private boolean promptToAddQuery = true; @@ -92,9 +90,10 @@ public class AddRepositoryAction extends Action { IPreferenceStore preferenceStore = TasksUiPlugin.getDefault().getPreferenceStore(); if (!preferenceStore.getBoolean(PREF_ADD_QUERY)) { Shell shell = PlatformUI.getWorkbench().getDisplay().getActiveShell(); - MessageDialogWithToggle messageDialog = MessageDialogWithToggle.openYesNoQuestion(shell, "Add new query", - "Would you like to add a query to the Task List for this repository?", "Do not show again", false, - preferenceStore, PREF_ADD_QUERY); + MessageDialogWithToggle messageDialog = MessageDialogWithToggle.openYesNoQuestion(shell, + Messages.AddRepositoryAction_Add_new_query, + Messages.AddRepositoryAction_Add_a_query_to_the_Task_List, + Messages.AddRepositoryAction_Do_not_show_again, false, preferenceStore, PREF_ADD_QUERY); preferenceStore.setValue(PREF_ADD_QUERY, messageDialog.getToggleState()); if (messageDialog.getReturnCode() == IDialogConstants.YES_ID) { AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(taskRepository.getConnectorKind()); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ClearOutgoingAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ClearOutgoingAction.java index bf1b7cff8..e43a91689 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ClearOutgoingAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ClearOutgoingAction.java @@ -33,9 +33,7 @@ import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage; */ public class ClearOutgoingAction extends Action { - private static final String ACTION_NAME = "Clear outgoing"; - - public static final String ID = "org.eclipse.mylyn.tasklist.actions.mark.discard"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.mark.discard"; //$NON-NLS-1$ private final List<IRepositoryElement> selectedElements; @@ -43,8 +41,8 @@ public class ClearOutgoingAction extends Action { public ClearOutgoingAction(List<IRepositoryElement> selectedElements) { this.selectedElements = selectedElements; - setText(ACTION_NAME); - setToolTipText(ACTION_NAME); + setText(Messages.ClearOutgoingAction_Clear_outgoing); + setToolTipText(Messages.ClearOutgoingAction_Clear_outgoing); setImageDescriptor(CommonImages.CLEAR); setId(ID); if (selectedElements.size() == 1 && (selectedElements.get(0) instanceof ITask)) { @@ -78,7 +76,9 @@ public class ClearOutgoingAction extends Action { } if (toClear.size() > 0) { AbstractTask task = toClear.get(0); - boolean confirm = MessageDialog.openConfirm(null, "Confirm discard", "Discard all outgoing changes?\n\n" + boolean confirm = MessageDialog.openConfirm( + null, + Messages.ClearOutgoingAction_Confirm_discard, Messages.ClearOutgoingAction_Discard_all_outgoing_changes_ + "\n\n" //$NON-NLS-1$ + task.getSummary()); if (confirm) { if (taskEditorPage != null) { @@ -87,7 +87,8 @@ public class ClearOutgoingAction extends Action { try { TasksUi.getTaskDataManager().discardEdits(task); } catch (CoreException e) { - TasksUiInternal.displayStatus("Clear outgoing failed", e.getStatus()); + TasksUiInternal.displayStatus( + Messages.ClearOutgoingAction_Clear_outgoing_failed, e.getStatus()); } } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CloneTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CloneTaskAction.java index 241b8aa5b..0f560bdba 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CloneTaskAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CloneTaskAction.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2004, 2008 Tasktop Technologies and others. + * Copyright (c) 2004, 2008 Tasktop Technologies and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -40,14 +40,12 @@ import org.eclipse.ui.actions.BaseSelectionListenerAction; */ public class CloneTaskAction extends BaseSelectionListenerAction implements IViewActionDelegate { - private static final String LABEL = "Clone This Task"; - - private static final String ID = "org.eclipse.mylyn.tasklist.actions.clone"; + private static final String ID = "org.eclipse.mylyn.tasklist.actions.clone"; //$NON-NLS-1$ protected ISelection selection; public CloneTaskAction() { - super(LABEL); + super(Messages.CloneTaskAction_Clone_This_Task); setId(ID); setImageDescriptor(TasksUiImages.TASK_NEW); setAccelerator(SWT.MOD1 + 'd'); @@ -69,11 +67,11 @@ public class CloneTaskAction extends BaseSelectionListenerAction implements IVie if (selectedObject instanceof AbstractTask) { AbstractTask task = (AbstractTask) selectedObject; - String description = "Cloned from: " + CopyTaskDetailsAction.getTextForTask(task); + String description = Messages.CloneTaskAction_Cloned_from_ + CopyTaskDetailsAction.getTextForTask(task); if (task instanceof LocalTask) { String notes = task.getNotes(); - if (!"".equals(notes)) { - description += "\n\n" + notes; + if (!"".equals(notes)) { //$NON-NLS-1$ + description += "\n\n" + notes; //$NON-NLS-1$ } } @@ -84,7 +82,7 @@ public class CloneTaskAction extends BaseSelectionListenerAction implements IVie try { taskData = TasksUi.getTaskDataManager().getTaskData(task); } catch (CoreException e) { - TasksUiInternal.displayStatus("Clone Task Failed", e.getStatus()); + TasksUiInternal.displayStatus(Messages.CloneTaskAction_Clone_Task_Failed, e.getStatus()); continue; } @@ -92,7 +90,7 @@ public class CloneTaskAction extends BaseSelectionListenerAction implements IVie AbstractRepositoryConnector connector = TasksUi.getRepositoryConnector(taskData.getConnectorKind()); ITaskMapping mapping = connector.getTaskMapping(taskData); if (mapping.getDescription() != null) { - ((DefaultTaskMapping) taskSelection).setDescription(description + "\n\n" + ((DefaultTaskMapping) taskSelection).setDescription(description + "\n\n" //$NON-NLS-1$ + mapping.getDescription()); } mapping.merge(taskSelection); @@ -112,4 +110,4 @@ public class CloneTaskAction extends BaseSelectionListenerAction implements IVie // ignore } -}
\ No newline at end of file +} diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CollapseAllAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CollapseAllAction.java index 9c77e033f..1efec2cc2 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CollapseAllAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CollapseAllAction.java @@ -20,18 +20,16 @@ import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView; */ public class CollapseAllAction extends Action { - private static final String LABEL = "Collapse All"; - - public static final String ID = "org.eclipse.mylyn.tasklist.actions.collapse.all"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.collapse.all"; //$NON-NLS-1$ private final TaskListView taskListView; public CollapseAllAction(TaskListView taskListView) { - super(LABEL); + super(Messages.CollapseAllAction_Collapse_All); this.taskListView = taskListView; setId(ID); - setText(LABEL); - setToolTipText(LABEL); + setText(Messages.CollapseAllAction_Collapse_All); + setToolTipText(Messages.CollapseAllAction_Collapse_All); setImageDescriptor(CommonImages.COLLAPSE_ALL); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CompareAttachmentsAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CompareAttachmentsAction.java index 396bf2135..fa60a2717 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CompareAttachmentsAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CompareAttachmentsAction.java @@ -54,7 +54,7 @@ public class CompareAttachmentsAction extends BaseSelectionListenerAction implem private ISelection currentSelection; public CompareAttachmentsAction() { - super("Compare Attachments"); + super(Messages.CompareAttachmentsAction_Compare_Attachments); } protected CompareAttachmentsAction(String text) { @@ -87,7 +87,7 @@ public class CompareAttachmentsAction extends BaseSelectionListenerAction implem @Override public String getTitle() { - return "Compare (" + attachment1.getFileName() + " - " + attachment2.getFileName() + ")"; + return Messages.CompareAttachmentsAction_Compare__ + attachment1.getFileName() + " - " + attachment2.getFileName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ } @Override @@ -104,7 +104,7 @@ public class CompareAttachmentsAction extends BaseSelectionListenerAction implem } } - private static final String[] IMAGE_EXTENSIONS = { ".jpg", ".gif", ".png", ".tiff", ".tif", ".bmp" }; + private static final String[] IMAGE_EXTENSIONS = { ".jpg", ".gif", ".png", ".tiff", ".tif", ".bmp" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ private Image getImage(ITaskAttachment attachment) { if (AttachmentUtil.isContext(attachment)) { @@ -141,7 +141,7 @@ public class CompareAttachmentsAction extends BaseSelectionListenerAction implem TaskAttribute attachmentAttribute = attachment.getTaskAttribute(); if (attachmentAttribute == null) { throw new CoreException(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, - "Failed to find attachment: " + attachment.getUrl())); + Messages.CompareAttachmentsAction_Failed_to_find_attachment + attachment.getUrl())); } TaskRepository taskRepository = attachment.getTaskRepository(); ITask task = attachment.getTask(); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyTaskDetailsAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyTaskDetailsAction.java index 1cd289a57..5837175d4 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyTaskDetailsAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyTaskDetailsAction.java @@ -32,17 +32,15 @@ import org.eclipse.ui.actions.BaseSelectionListenerAction; */ public class CopyTaskDetailsAction extends BaseSelectionListenerAction { - private static final String LABEL = "Copy Details"; - - public static final String ID = "org.eclipse.mylyn.tasklist.actions.copy"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.copy"; //$NON-NLS-1$ private final Clipboard clipboard; - private static String lineSeparator = System.getProperty("line.separator", "\n"); + private static String lineSeparator = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$ public CopyTaskDetailsAction() { - super(LABEL); - setToolTipText(LABEL); + super(Messages.CopyTaskDetailsAction_Copy_Details); + setToolTipText(Messages.CopyTaskDetailsAction_Copy_Details); setId(ID); setImageDescriptor(CommonImages.COPY); // FIXME the clipboard is not disposed @@ -75,7 +73,7 @@ public class CopyTaskDetailsAction extends BaseSelectionListenerAction { AbstractTask task = (AbstractTask) object; if (task.getTaskKey() != null) { sb.append(task.getTaskKey()); - sb.append(": "); + sb.append(": "); //$NON-NLS-1$ } sb.append(task.getSummary()); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteAction.java index 0a5c0cf5c..2bd130e07 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteAction.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2004, 2008 Tasktop Technologies and others. + * Copyright (c) 2004, 2008 Tasktop Technologies and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -46,10 +46,10 @@ import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds; */ public class DeleteAction extends Action { - public static final String ID = "org.eclipse.mylyn.tasklist.actions.delete"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.delete"; //$NON-NLS-1$ public DeleteAction() { - setText("Delete"); + setText(Messages.DeleteAction_Delete); setId(ID); setImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE)); setActionDefinitionId(IWorkbenchActionDefinitionIds.DELETE); @@ -62,7 +62,7 @@ public class DeleteAction extends Action { } protected void doDelete(List<?> toDelete) { - String elements = ""; + String elements = ""; //$NON-NLS-1$ int i = 0; for (Object object : toDelete) { if (object instanceof UnmatchedTaskContainer) { @@ -73,10 +73,10 @@ public class DeleteAction extends Action { if (i < 20) { // TODO this action should be based on the action enablement and check if the container is user managed or not if (object instanceof IRepositoryElement) { - elements += " " + ((IRepositoryElement) object).getSummary() + "\n"; + elements += " " + ((IRepositoryElement) object).getSummary() + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ } } else { - elements += "..."; + elements += "..."; //$NON-NLS-1$ break; } } @@ -87,33 +87,30 @@ public class DeleteAction extends Action { Object object = toDelete.get(0); if (object instanceof ITask) { if (((AbstractTask) object).isLocal()) { - message = "Permanently delete the task listed below?"; + message = Messages.DeleteAction_Permanently_delete_the_task_listed_below; } else { - message = "Delete the planning information and context for the repository task? The server" - + " copy will not be deleted and the task will remain in queries that match it."; + message = Messages.DeleteAction_Delete_the_planning_information_and_context_for_the_repository_task; } } else if (object instanceof TaskCategory) { - message = "Permanently delete the category? Local tasks will be moved to the Uncategorized folder. Repository tasks will be moved to the Unmatched folder."; + message = Messages.DeleteAction_Permanently_delete_the_category; } else if (object instanceof IRepositoryQuery) { - message = "Permanently delete the query? Contained tasks will be moved to the Unmatched folder."; + message = Messages.DeleteAction_Permanently_delete_the_query; } else if (object instanceof UnmatchedTaskContainer) { - message = "Delete the planning information and context of all unmatched tasks? The server" - + " copy of these tasks will not be deleted and the task will remain in queries that match it."; + message = Messages.DeleteAction_Delete_the_planning_information_and_context_of_all_unmatched_tasks; } else if (object instanceof UnsubmittedTaskContainer) { - message = "Delete all of the unsubmitted tasks?"; + message = Messages.DeleteAction_Delete_all_of_the_unsubmitted_tasks; } else { - message = "Permanently delete the element listed below?"; + message = Messages.DeleteAction_Permanently_delete_the_element_listed_below; } } else { - message = "Delete the elements listed below? If categories or queries are selected contained tasks" - + " will not be deleted. Contexts will be deleted for selected tasks."; + message = Messages.DeleteAction_Delete_the_elements_listed_below; } - message += "\n\n" + elements; + message += "\n\n" + elements; //$NON-NLS-1$ boolean deleteConfirmed = MessageDialog.openQuestion(PlatformUI.getWorkbench() .getActiveWorkbenchWindow() - .getShell(), "Confirm Delete", message); + .getShell(), Messages.DeleteAction_Confirm_Delete, message); if (!deleteConfirmed) { return; } @@ -131,7 +128,7 @@ public class DeleteAction extends Action { try { TasksUiPlugin.getTaskDataManager().deleteTaskData(task); } catch (CoreException e) { - StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Failed to delete task data", + StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Failed to delete task data", //$NON-NLS-1$ e)); } ContextCore.getContextManager().deleteContext(task.getHandleIdentifier()); @@ -170,7 +167,7 @@ public class DeleteAction extends Action { } } else { MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Delete failed", "Nothing selected."); + Messages.DeleteAction_Delete_failed, Messages.DeleteAction_Nothing_selected); return; } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteTaskRepositoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteTaskRepositoryAction.java index b0a899bd2..1997f2d33 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteTaskRepositoryAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DeleteTaskRepositoryAction.java @@ -40,10 +40,10 @@ import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds; */ public class DeleteTaskRepositoryAction extends AbstractTaskRepositoryAction { - private static final String ID = "org.eclipse.mylyn.tasklist.repositories.delete"; + private static final String ID = "org.eclipse.mylyn.tasklist.repositories.delete"; //$NON-NLS-1$ public DeleteTaskRepositoryAction() { - super("Delete Repository"); + super(Messages.DeleteTaskRepositoryAction_Delete_Repository); setImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE)); setId(ID); setEnabled(false); @@ -60,7 +60,7 @@ public class DeleteTaskRepositoryAction extends AbstractTaskRepositoryAction { boolean deleteConfirmed = MessageDialog.openQuestion(PlatformUI.getWorkbench() .getActiveWorkbenchWindow() - .getShell(), "Confirm Delete", "Delete the selected task repositories?"); + .getShell(), Messages.DeleteTaskRepositoryAction_Confirm_Delete, Messages.DeleteTaskRepositoryAction_Delete_the_selected_task_repositories); if (deleteConfirmed) { IStructuredSelection selection = getStructuredSelection(); @@ -115,8 +115,8 @@ public class DeleteTaskRepositoryAction extends AbstractTaskRepositoryAction { if (repositoriesInUse.size() > 0) { MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Repository In Use", - "One or more of the selected repositories is being used by a query or a task and can not be deleted."); + Messages.DeleteTaskRepositoryAction_Repository_In_Use, + Messages.DeleteTaskRepositoryAction_Repository_In_Use_MESSAGE); } } } catch (Exception e) { diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DisconnectRepositoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DisconnectRepositoryAction.java new file mode 100644 index 000000000..63de9b731 --- /dev/null +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DisconnectRepositoryAction.java @@ -0,0 +1,72 @@ +/******************************************************************************* +* Copyright (c) 2004, 2008 Tasktop Technologies and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Tasktop Technologies - initial API and implementation + *******************************************************************************/ + +package org.eclipse.mylyn.internal.tasks.ui.actions; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin; +import org.eclipse.mylyn.internal.tasks.ui.views.Messages; +import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; +import org.eclipse.mylyn.tasks.core.TaskRepository; +import org.eclipse.mylyn.tasks.ui.TasksUi; + +/** + * @author Steffen Pingel + */ +public class DisconnectRepositoryAction extends Action implements ISelectionChangedListener { + + public static final String LABEL = Messages.DisconnectRepositoryAction_Disconnected; + + private static final String ID = "org.eclipse.mylyn.tasklist.repositories.offline"; //$NON-NLS-1$ + + private TaskRepository repository; + + public DisconnectRepositoryAction() { + super(LABEL, IAction.AS_CHECK_BOX); + setId(ID); + setEnabled(false); + } + + @Override + public void run() { + repository.setOffline(isChecked()); + TasksUiPlugin.getRepositoryManager().notifyRepositorySettingsChanged(repository); + } + + public void selectionChanged(IAction action, ISelection selection) { + } + + public void selectionChanged(SelectionChangedEvent event) { + ISelection selection = event.getSelection(); + if (selection instanceof IStructuredSelection) { + Object selectedObject = ((IStructuredSelection) selection).getFirstElement(); + if (selectedObject instanceof TaskRepository) { + AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector( + ((TaskRepository) selectedObject).getConnectorKind()); + if (connector.isUserManaged()) { + this.repository = (TaskRepository) selectedObject; + setChecked(this.repository.isOffline()); + setEnabled(true); + return; + } + } + } + this.repository = null; + setChecked(false); + setEnabled(false); + } + +} diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/EditRepositoryPropertiesAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/EditRepositoryPropertiesAction.java index 0ce071df5..4d0e63c75 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/EditRepositoryPropertiesAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/EditRepositoryPropertiesAction.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2004, 2008 Tasktop Technologies and others. + * Copyright (c) 2004, 2008 Tasktop Technologies and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -23,14 +23,12 @@ import org.eclipse.ui.IViewPart; * @author Mik Kersten * @author Steffen Pingel */ -@Deprecated -// TODO 3.1 remove class public class EditRepositoryPropertiesAction extends AbstractTaskRepositoryAction implements IViewActionDelegate { - private static final String ID = "org.eclipse.mylyn.tasklist.repositories.properties"; + private static final String ID = "org.eclipse.mylyn.tasklist.repositories.properties"; //$NON-NLS-1$ public EditRepositoryPropertiesAction() { - super("Properties"); + super(Messages.EditRepositoryPropertiesAction_Properties); setId(ID); setEnabled(false); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ExpandAllAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ExpandAllAction.java index 74465c3fe..601872225 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ExpandAllAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ExpandAllAction.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2004, 2008 Tasktop Technologies and others. + * Copyright (c) 2004, 2008 Tasktop Technologies and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -20,18 +20,15 @@ import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView; */ public class ExpandAllAction extends Action { - private static final String LABEL = "Expand All"; - - public static final String ID = "org.eclipse.mylyn.tasklist.actions.expand.all"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.expand.all"; //$NON-NLS-1$ private final TaskListView taskListView; public ExpandAllAction(TaskListView taskListView) { - super(LABEL); this.taskListView = taskListView; setId(ID); - setText(LABEL); - setToolTipText(LABEL); + setText(Messages.ExpandAllAction_Expand_All); + setToolTipText(Messages.ExpandAllAction_Expand_All); setImageDescriptor(CommonImages.EXPAND_ALL); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterCompletedTasksAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterCompletedTasksAction.java index 7edf04e48..7378a2208 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterCompletedTasksAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterCompletedTasksAction.java @@ -22,16 +22,14 @@ import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView; */ public class FilterCompletedTasksAction extends Action { - public static final String ID = "org.eclipse.mylyn.tasklist.actions.filter.completed"; - - private static final String LABEL = "Filter Completed Tasks"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.filter.completed"; //$NON-NLS-1$ private final TaskListView view; public FilterCompletedTasksAction(TaskListView view) { this.view = view; - setText(LABEL); - setToolTipText(LABEL); + setText(Messages.FilterCompletedTasksAction_Filter_Completed_Tasks); + setToolTipText(Messages.FilterCompletedTasksAction_Filter_Completed_Tasks); setId(ID); setImageDescriptor(CommonImages.FILTER_COMPLETE); setChecked(TasksUiPlugin.getDefault().getPreferenceStore().contains( diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoIntoAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoIntoAction.java index 223c6914c..4ae2e11bb 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoIntoAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoIntoAction.java @@ -24,14 +24,12 @@ import org.eclipse.ui.IViewPart; */ public class GoIntoAction extends Action implements IViewActionDelegate { - private static final String LABEL = "Go Into"; - - public static final String ID = "org.eclipse.mylyn.tasklist.actions.view.go.into"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.view.go.into"; //$NON-NLS-1$ public GoIntoAction() { setId(ID); - setText(LABEL); - setToolTipText(LABEL); + setText(Messages.GoIntoAction_Go_Into); + setToolTipText(Messages.GoIntoAction_Go_Into); setImageDescriptor(CommonImages.GO_INTO); } @@ -42,7 +40,7 @@ public class GoIntoAction extends Action implements IViewActionDelegate { @Override public void run() { if (TaskListView.getFromActivePerspective() != null) { - TaskListView.getFromActivePerspective().getFilteredTree().setFilterText(""); + TaskListView.getFromActivePerspective().getFilteredTree().setFilterText(""); //$NON-NLS-1$ TaskListView.getFromActivePerspective().goIntoCategory(); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoUpAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoUpAction.java index 0fd45d704..122c44fe7 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoUpAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoUpAction.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2004, 2008 Tasktop Technologies and others. + * Copyright (c) 2004, 2008 Tasktop Technologies and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -21,11 +21,11 @@ import org.eclipse.ui.part.DrillDownAdapter; */ public class GoUpAction extends Action { - public static final String ID = "org.eclipse.mylyn.tasklist.actions.view.go.up"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.view.go.up"; //$NON-NLS-1$ public GoUpAction(DrillDownAdapter drillDownAdapter) { - setText("Go Up To Root"); - setToolTipText("Go Up To Root"); + setText(Messages.GoUpAction_Go_Up_To_Root); + setToolTipText(Messages.GoUpAction_Go_Up_To_Root); setId(ID); setImageDescriptor(CommonImages.GO_UP); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GroupSubTasksAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GroupSubTasksAction.java index 9eb96a41a..272f5ae9a 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GroupSubTasksAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GroupSubTasksAction.java @@ -22,16 +22,14 @@ import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView; */ public class GroupSubTasksAction extends Action { - public static final String ID = "org.eclipse.mylyn.tasklist.actions.filter.subtasks"; - - private static final String LABEL = "Group Subtasks"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.filter.subtasks"; //$NON-NLS-1$ private final TaskListView view; public GroupSubTasksAction(TaskListView view) { this.view = view; - setText(LABEL); - setToolTipText(LABEL); + setText(Messages.GroupSubTasksAction_Group_Subtasks); + setToolTipText(Messages.GroupSubTasksAction_Group_Subtasks); setId(ID); // setImageDescriptor(TasksUiImages.FILTER_COMPLETE); setChecked(TasksUiPlugin.getDefault().getPreferenceStore().getBoolean( diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/LinkWithEditorAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/LinkWithEditorAction.java index 3a239d1b5..b3fa99ca6 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/LinkWithEditorAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/LinkWithEditorAction.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2004, 2008 Tasktop Technologies and others. + * Copyright (c) 2004, 2008 Tasktop Technologies and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -24,9 +24,9 @@ public class LinkWithEditorAction extends Action { private final TaskListView taskListView; public LinkWithEditorAction(TaskListView taskListView) { - super("&Link with Editor", IAction.AS_CHECK_BOX); - setImageDescriptor(CommonImages.LINK_EDITOR); + super(Messages.LinkWithEditorAction_Link_with_Editor, IAction.AS_CHECK_BOX); this.taskListView = taskListView; + setImageDescriptor(CommonImages.LINK_EDITOR); } @Override @@ -34,4 +34,4 @@ public class LinkWithEditorAction extends Action { taskListView.setLinkWithEditor(isChecked()); } -}
\ No newline at end of file +} diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/Messages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/Messages.java new file mode 100644 index 000000000..a92e04741 --- /dev/null +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/Messages.java @@ -0,0 +1,307 @@ +/******************************************************************************* + * Copyright (c) 2004, 2008 Tasktop Technologies and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Tasktop Technologies - initial API and implementation + *******************************************************************************/ + +package org.eclipse.mylyn.internal.tasks.ui.actions; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS { + private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.tasks.ui.actions.messages"; //$NON-NLS-1$ + + static { + // load message values from bundle file + reloadMessages(); + } + + public static void reloadMessages() { + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + public static String AbstractChangeCompletionAction_Mark_selected_local_tasks_X; + + public static String ActivateTaskDialogAction_Activate_Task; + + public static String ActivateTaskDialogAction_Select_a_task_to_activate__; + + public static String ActivateTaskHistoryDropDownAction_Activate_Previous_Task; + + public static String AddRepositoryAction_Add_new_query; + + public static String AddRepositoryAction_Add_a_query_to_the_Task_List; + + public static String AddRepositoryAction_Add_Repository_Query; + + public static String AddRepositoryAction_Add_Task_Repository; + + public static String AddRepositoryAction_Do_not_show_again; + + public static String AddRepositoryTaskAction_Add_an_existing_repository_task_issue; + + public static String AttachAction_Attach_; + + public static String AttachAction_Submit_changes_or_synchronize_task_before_adding_attachments; + + public static String AttachScreenshotAction_Attach_Screenshot_; + + public static String AttachScreenshotAction_Submit_changes_or_synchronize_task_before_adding_attachments; + + public static String ClearOutgoingAction_Clear_outgoing; + + public static String ClearOutgoingAction_Clear_outgoing_failed; + + public static String ClearOutgoingAction_Confirm_discard; + + public static String ClearOutgoingAction_Discard_all_outgoing_changes_; + + public static String CloneTaskAction_Clone_Task_Failed; + + public static String CloneTaskAction_Clone_This_Task; + + public static String CloneTaskAction_Cloned_from_; + + public static String CollapseAllAction_Collapse_All; + + public static String CompareAttachmentsAction_Compare__; + + public static String CompareAttachmentsAction_Compare_Attachments; + + public static String CompareAttachmentsAction_Failed_to_find_attachment; + + public static String CopyTaskDetailsAction_Copy_Details; + + public static String DeleteAction_Confirm_Delete; + + public static String DeleteAction_Delete; + + public static String DeleteAction_Delete_all_of_the_unsubmitted_tasks; + + public static String DeleteAction_Delete_the_elements_listed_below; + + public static String DeleteAction_Delete_failed; + + public static String DeleteAction_Delete_the_planning_information_and_context_for_the_repository_task; + + public static String DeleteAction_Delete_the_planning_information_and_context_of_all_unmatched_tasks; + + public static String DeleteAction_Nothing_selected; + + public static String DeleteAction_Permanently_delete_the_category; + + public static String DeleteAction_Permanently_delete_the_element_listed_below; + + public static String DeleteAction_Permanently_delete_the_query; + + public static String DeleteAction_Permanently_delete_the_task_listed_below; + + public static String DeleteTaskRepositoryAction_Confirm_Delete; + + public static String DeleteTaskRepositoryAction_Delete_Repository; + + public static String DeleteTaskRepositoryAction_Delete_the_selected_task_repositories; + + public static String DeleteTaskRepositoryAction_Repository_In_Use; + + public static String DeleteTaskRepositoryAction_Repository_In_Use_MESSAGE; + + public static String EditRepositoryPropertiesAction_Properties; + + public static String ExpandAllAction_Expand_All; + + public static String FilterArchiveContainerAction_Filter_Archives; + + public static String FilterCompletedTasksAction_Filter_Completed_Tasks; + + public static String GoIntoAction_Go_Into; + + public static String GoUpAction_Go_Up_To_Root; + + public static String GroupSubTasksAction_Group_Subtasks; + + public static String LinkWithEditorAction_Link_with_Editor; + + public static String MarkTaskCompleteAction_Complete; + + public static String MarkTaskCompleteAction_Confirm_Mark_Completed; + + public static String MarkTaskCompleteAction_Mark_; + + public static String MarkTaskIncompleteAction_Confirm_Mark_Incompleted; + + public static String MarkTaskIncompleteAction_Incomplete; + + public static String MarkTaskIncompleteAction_Mark_; + + public static String NewCategoryAction_A_category_with_this_name_already_exists; + + public static String NewCategoryAction_Enter_name; + + public static String NewCategoryAction_Enter_a_name_for_the_Category; + + public static String NewCategoryAction_New_Category; + + public static String NewCategoryAction_New_Category_; + + public static String NewCategoryAction_A_query_with_this_name_already_exists; + + public static String NewQueryAction_Add_or_modify_repository_query; + + public static String NewSubTaskAction_The_connector_does_not_support_creating_subtasks_for_this_task; + + public static String NewSubTaskAction_Could_not_initialize_sub_task_data_for_task_; + + public static String NewSubTaskAction_Could_not_retrieve_task_data_for_task_; + + public static String NewSubTaskAction_Create_a_new_subtask; + + public static String NewSubTaskAction_Failed_to_create_new_sub_task_; + + public static String NewSubTaskAction_Subtask; + + public static String NewSubTaskAction_Unable_to_create_subtask; + + public static String NewTaskFromSelectionAction_Comment_; + + public static String NewTaskFromSelectionAction____Created_from_Comment___; + + public static String NewTaskFromSelectionAction____Created_from_Task___; + + public static String NewTaskFromSelectionAction_New_Task_from_Selection; + + public static String NewTaskFromSelectionAction_Nothing_selected_to_create_task_from; + + public static String NewTaskFromSelectionAction_URL_; + + public static String OpenRepositoryTask_Could_not_find_matching_repository_task; + + public static String OpenRepositoryTask_Open_Repository_Task; + + public static String OpenRepositoryTask_Open_Task; + + public static String OpenTaskAction_Open_Task; + + public static String OpenTaskAction_Select_a_task_to_open__; + + public static String OpenTaskListElementAction_Open; + + public static String OpenTaskListElementAction_Open_Task_List_Element; + + public static String OpenTasksUiPreferencesAction_Preferences_; + + public static String OpenWithBrowserAction_Open_with_Browser; + + public static String PresentationDropDownSelectionAction_Task_Presentation; + + public static String QueryCloneAction_Clone_Query; + + public static String QueryCloneAction_Clone_Query_Failes; + + public static String QueryCloneAction_No_query_selected; + + public static String QueryCloneAction_Query_cloning_did_not_succeeded; + + public static String QueryExportAction_Confirm_File_Replace; + + public static String QueryExportAction_Could_not_export_query_because_specified_location_is_a_folder; + + public static String QueryExportAction_The_file_X_already_exists; + + public static String QueryExportAction_Query_Export_Error; + + public static String QueryImportAction_The_following_queries_were_imported_successfully; + + public static String QueryImportAction_Import_Mylyn_Query; + + public static String QueryImportAction_Mylyn_Queries; + + public static String QueryImportAction_These_queries_were_not_imported; + + public static String QueryImportAction_Query_Import_Completed; + + public static String QueryImportAction_Query_Import_Error; + + public static String QueryImportAction_The_specified_file_is_not_an_exported_query; + + public static String RefreshRepositoryTasksAction_Refresh_All_Tasks; + + public static String RemoveFromCategoryAction_Remove_From_Category; + + public static String RenameAction_Rename; + + public static String RestoreTaskListAction_Restore_Tasks_from_History; + + public static String ShowInTaskListAction_Show_In_Task_List; + + public static String SynchronizeAutomaticallyAction_Synchronize_Automatically; + + public static String SynchronizeEditorAction_Synchronize; + + public static String SynchronizeEditorAction_Synchronize_Incoming_Changes; + + public static String TaskActivateAction_Activate; + + public static String TaskDeactivateAction_Deactivate; + + public static String TaskExportAction_already_exists; + + public static String TaskExportAction_Confirm_File_Replace; + + public static String TaskExportAction_Could_not_export_task_because_specified_location_is_a_folder; + + public static String TaskExportAction_FILE; + + public static String TaskExportAction_Task_Export_Error; + + public static String TaskImportAction_Import_Mylyn_Tasks; + + public static String TaskImportAction_Mylyn_Tasks; + + public static String TaskImportAction_The_specified_file_is_not_an_exported_task; + + public static String TaskImportAction_Task_Import_Error; + + public static String TaskListSortAction_Sort_; + + public static String TaskSelectionDialog__matches; + + public static String TaskSelectionDialog_Deselect_Working_Set; + + public static String TaskSelectionDialog_Edit_Active_Working_Set_; + + public static String TaskSelectionDialog_New_Task_; + + public static String TaskSelectionDialog_Open_with_Browser; + + public static String TaskSelectionDialog_Scanning_tasks; + + public static String TaskSelectionDialog_Search_for_tasks; + + public static String TaskSelectionDialog_Select_Working_Set_; + + public static String TaskSelectionDialog_Selected_item_is_not_a_task; + + public static String TaskSelectionDialog_Show_Completed_Tasks; + + public static String TasksUiPlugin_Task_Repositories; + + public static String TaskWorkingSetAction_All; + + public static String TaskWorkingSetAction_Deselect_All; + + public static String TaskWorkingSetAction_Select_and_Edit_Working_Sets; + + public static String TaskWorkingSetAction_Sets; + + public static String ToggleAllWorkingSetsAction_Show_All; + + public static String ToggleTaskActivationAction_Activate_Task; + + public static String ToggleTaskActivationAction_Deactivate_Task; +} diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MoveTaskToRootAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MoveTaskToRootAction.java deleted file mode 100644 index ddbd35ff0..000000000 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MoveTaskToRootAction.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* -* Copyright (c) 2004, 2008 Tasktop Technologies and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Tasktop Technologies - initial API and implementation - * Ken Sueda - improvements - *******************************************************************************/ - -package org.eclipse.mylyn.internal.tasks.ui.actions; - -import org.eclipse.jface.action.Action; -import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView; - -/** - * @author Mik Kersten - * @author Ken Sueda - */ -public class MoveTaskToRootAction extends Action { - - public static final String ID = "org.eclipse.mylyn.tasklist.actions.move.toroot"; - - // private final TaskListView view; - public MoveTaskToRootAction(TaskListView view) { - // this.view = view; - setText("Move Task to Root"); - setToolTipText("Move Task to Root"); - setId(ID); - } - - @Override - public void run() { - throw new RuntimeException("unimplemented"); - } -} diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewCategoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewCategoryAction.java index 573b829f7..3242693b3 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewCategoryAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewCategoryAction.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2004, 2008 Tasktop Technologies and others. + * Copyright (c) 2004, 2008 Tasktop Technologies and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -34,11 +34,11 @@ import org.eclipse.ui.PlatformUI; */ public class NewCategoryAction extends Action implements IViewActionDelegate { - public static final String ID = "org.eclipse.mylyn.tasks.ui.actions.create.category"; + public static final String ID = "org.eclipse.mylyn.tasks.ui.actions.create.category"; //$NON-NLS-1$ public NewCategoryAction() { - setText("New Category..."); - setToolTipText("New Category..."); + setText(Messages.NewCategoryAction_New_Category_); + setToolTipText(Messages.NewCategoryAction_New_Category_); setId(ID); setImageDescriptor(TasksUiImages.CATEGORY_NEW); } @@ -57,7 +57,7 @@ public class NewCategoryAction extends Action implements IViewActionDelegate { public TaskCategory createCategory() { InputDialog dialog = new InputDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Enter name", "Enter a name for the Category: ", "", null); + Messages.NewCategoryAction_Enter_name, Messages.NewCategoryAction_Enter_a_name_for_the_Category, "", null); //$NON-NLS-1$ int dialogResult = dialog.open(); if (dialogResult == Window.OK) { String name = dialog.getValue(); @@ -67,14 +67,16 @@ public class NewCategoryAction extends Action implements IViewActionDelegate { for (AbstractTaskCategory category : categories) { if (name != null && name.equals(category.getSummary())) { MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "New Category", "A category with this name already exists, please choose another name."); + Messages.NewCategoryAction_New_Category, + Messages.NewCategoryAction_A_category_with_this_name_already_exists); return null; } } for (RepositoryQuery query : queries) { if (name != null && name.equals(query.getSummary())) { MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "New Category", "A query with this name already exists, please choose another name."); + Messages.NewCategoryAction_New_Category, + Messages.NewCategoryAction_A_query_with_this_name_already_exists); return null; } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewQueryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewQueryAction.java index 0806222cc..1ca280b7c 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewQueryAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewQueryAction.java @@ -99,7 +99,7 @@ public class NewQueryAction extends Action implements IViewActionDelegate, IExec public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException { - if ("skipFirstPage".equals(data)) { + if ("skipFirstPage".equals(data)) { //$NON-NLS-1$ this.skipRepositoryPage = true; } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java index 3a9e28265..8c8fae1fa 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewSubTaskAction.java @@ -52,17 +52,13 @@ import org.eclipse.ui.progress.IProgressService; */ public class NewSubTaskAction extends Action implements IViewActionDelegate, IExecutableExtension { - private static final String TOOLTIP = "Create a new subtask"; - - private static final String LABEL = "Subtask"; - - public static final String ID = "org.eclipse.mylyn.tasks.ui.new.subtask"; + public static final String ID = "org.eclipse.mylyn.tasks.ui.new.subtask"; //$NON-NLS-1$ private AbstractTask selectedTask; public NewSubTaskAction() { - super(LABEL); - setToolTipText(TOOLTIP); + super(Messages.NewSubTaskAction_Subtask); + setToolTipText(Messages.NewSubTaskAction_Create_a_new_subtask); setId(ID); setImageDescriptor(TasksUiImages.TASK_NEW_SUB); } @@ -76,7 +72,7 @@ public class NewSubTaskAction extends Action implements IViewActionDelegate, IEx if (selectedTask instanceof LocalTask) { // XXX code copied from NewLocalTaskWizard.performFinish() and TaskListManager.createNewLocalTask() TaskList taskList = TasksUiPlugin.getTaskList(); - LocalTask newTask = new LocalTask("" + taskList.getNextLocalTaskId(), + LocalTask newTask = new LocalTask("" + taskList.getNextLocalTaskId(), //$NON-NLS-1$ LocalRepositoryConnector.DEFAULT_SUMMARY); newTask.setPriority(PriorityLevel.P3.toString()); TasksUiPlugin.getTaskActivityManager().scheduleNewTask(newTask); @@ -92,9 +88,10 @@ public class NewSubTaskAction extends Action implements IViewActionDelegate, IEx try { TasksUiInternal.createAndOpenNewTask(taskData); } catch (CoreException e) { - StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Failed to open new sub task", e)); - TasksUiInternal.displayStatus("Unable to create subtask", new Status(IStatus.ERROR, - TasksUiPlugin.ID_PLUGIN, "Failed to create new sub task: " + e.getMessage())); + StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Failed to open new sub task", e)); //$NON-NLS-1$ + TasksUiInternal.displayStatus(Messages.NewSubTaskAction_Unable_to_create_subtask, new Status( + IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, + Messages.NewSubTaskAction_Failed_to_create_new_sub_task_ + e.getMessage())); } } } @@ -111,11 +108,12 @@ public class NewSubTaskAction extends Action implements IViewActionDelegate, IEx parentTaskData = TasksUi.getTaskDataManager().getTaskData(selectedTask); } catch (CoreException e) { StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, - "Could not retrieve task data for task: " + selectedTask.getUrl(), e)); + "Could not retrieve task data for task:" + selectedTask.getUrl(), e)); //$NON-NLS-1$ } if (parentTaskData == null) { - TasksUiInternal.displayStatus("Unable to create subtask", new Status(IStatus.WARNING, - TasksUiPlugin.ID_PLUGIN, "Could not retrieve task data for task: " + selectedTask.getUrl())); + TasksUiInternal.displayStatus(Messages.NewSubTaskAction_Unable_to_create_subtask, new Status( + IStatus.WARNING, TasksUiPlugin.ID_PLUGIN, + Messages.NewSubTaskAction_Could_not_retrieve_task_data_for_task_ + selectedTask.getUrl())); return null; } @@ -127,7 +125,7 @@ public class NewSubTaskAction extends Action implements IViewActionDelegate, IEx final TaskData selectedTaskData = parentTaskData; final TaskAttributeMapper attributeMapper = taskDataHandler.getAttributeMapper(taskRepository); final TaskData taskData = new TaskData(attributeMapper, taskRepository.getConnectorKind(), - taskRepository.getRepositoryUrl(), ""); + taskRepository.getRepositoryUrl(), ""); //$NON-NLS-1$ final boolean[] result = new boolean[1]; IProgressService service = PlatformUI.getWorkbench().getProgressService(); try { @@ -143,10 +141,12 @@ public class NewSubTaskAction extends Action implements IViewActionDelegate, IEx }); } catch (InvocationTargetException e) { if (e.getCause() instanceof CoreException) { - TasksUiInternal.displayStatus("Unable to create subtask", ((CoreException) e.getCause()).getStatus()); + TasksUiInternal.displayStatus(Messages.NewSubTaskAction_Unable_to_create_subtask, + ((CoreException) e.getCause()).getStatus()); } else { StatusHandler.fail(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, - "Could not initialize sub task data for task: " + selectedTask.getUrl(), e)); + Messages.NewSubTaskAction_Could_not_initialize_sub_task_data_for_task_ + selectedTask.getUrl(), + e)); } return null; } catch (InterruptedException e) { @@ -158,8 +158,9 @@ public class NewSubTaskAction extends Action implements IViewActionDelegate, IEx // open editor return taskData; } else { - TasksUiInternal.displayStatus("Unable to create subtask", new Status(IStatus.INFO, TasksUiPlugin.ID_PLUGIN, - "The connector does not support creating subtasks for this task")); + TasksUiInternal.displayStatus(Messages.NewSubTaskAction_Unable_to_create_subtask, new Status(IStatus.INFO, + TasksUiPlugin.ID_PLUGIN, + Messages.NewSubTaskAction_The_connector_does_not_support_creating_subtasks_for_this_task)); } return null; } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskAction.java index 2d17b65df..53f5dd0f8 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskAction.java @@ -27,7 +27,7 @@ import org.eclipse.ui.PlatformUI; */ public class NewTaskAction extends Action implements IViewActionDelegate, IExecutableExtension { - public static final String ID = "org.eclipse.mylyn.tasklist.ui.repositories.actions.create"; + public static final String ID = "org.eclipse.mylyn.tasklist.ui.repositories.actions.create"; //$NON-NLS-1$ private boolean skipRepositoryPage = false; @@ -61,10 +61,10 @@ public class NewTaskAction extends Action implements IViewActionDelegate, IExecu public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException { - if ("skipFirstPage".equals(data)) { + if ("skipFirstPage".equals(data)) { //$NON-NLS-1$ this.skipRepositoryPage = true; } - if ("local".equals(data)) { + if ("local".equals(data)) { //$NON-NLS-1$ this.localTask = true; } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskFromSelectionAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskFromSelectionAction.java index 21cdf2a9f..0d8aaab82 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskFromSelectionAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewTaskFromSelectionAction.java @@ -32,14 +32,12 @@ import org.eclipse.ui.PlatformUI; */ public class NewTaskFromSelectionAction extends Action { - private static final String LABEL = "New Task from Selection"; - - public static final String ID = "org.eclipse.mylyn.tasks.ui.actions.newTaskFromSelection"; + public static final String ID = "org.eclipse.mylyn.tasks.ui.actions.newTaskFromSelection"; //$NON-NLS-1$ private ITaskMapping taskMapping; public NewTaskFromSelectionAction() { - super(LABEL); + super(Messages.NewTaskFromSelectionAction_New_Task_from_Selection); setId(ID); setImageDescriptor(TasksUiImages.TASK_NEW); } @@ -55,7 +53,7 @@ public class NewTaskFromSelectionAction extends Action { @Override public void run() { if (taskMapping == null) { - MessageDialog.openError(null, LABEL, "Nothing selected to create task from."); + MessageDialog.openError(null, Messages.NewTaskFromSelectionAction_New_Task_from_Selection, Messages.NewTaskFromSelectionAction_Nothing_selected_to_create_task_from); return; } @@ -122,18 +120,18 @@ public class NewTaskFromSelectionAction extends Action { if (element instanceof ITaskComment) { ITaskComment comment = (ITaskComment) element; final StringBuilder sb = new StringBuilder(); - sb.append("\n-- Created from Comment --"); + sb.append("\n" + Messages.NewTaskFromSelectionAction____Created_from_Comment___); //$NON-NLS-1$ if (comment.getUrl() == null) { - sb.append("\nURL: "); + sb.append("\n" + Messages.NewTaskFromSelectionAction_URL_); //$NON-NLS-1$ sb.append(comment.getTask().getUrl()); - sb.append("\nComment: "); + sb.append("\n" + Messages.NewTaskFromSelectionAction_Comment_); //$NON-NLS-1$ sb.append(comment.getNumber()); } else { - sb.append("\nURL: "); + sb.append("\n" + Messages.NewTaskFromSelectionAction_URL_); //$NON-NLS-1$ sb.append(comment.getUrl()); } - sb.append("\n\n"); + sb.append("\n\n"); //$NON-NLS-1$ sb.append(comment.getText()); taskMapping = new TaskMapping() { @Override diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenRepositoryTask.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenRepositoryTaskAction.java index 9ccd881b3..070db876b 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenRepositoryTask.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenRepositoryTaskAction.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2004, 2008 Tasktop Technologies and others. + * Copyright (c) 2004, 2008 Tasktop Technologies and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -33,16 +33,15 @@ import org.eclipse.ui.progress.IProgressService; /** * @author Mik Kersten */ -// TODO 3.1 rename to OpenRepositoryTaskAction -public class OpenRepositoryTask extends Action implements IWorkbenchWindowActionDelegate, IViewActionDelegate { +public class OpenRepositoryTaskAction extends Action implements IWorkbenchWindowActionDelegate, IViewActionDelegate { - private static final String OPEN_REMOTE_TASK_DIALOG_DIALOG_SETTINGS = "org.eclipse.mylyn.tasks.ui.open.remote"; + private static final String OPEN_REMOTE_TASK_DIALOG_DIALOG_SETTINGS = "org.eclipse.mylyn.tasks.ui.open.remote"; //$NON-NLS-1$ public void run(IAction action) { RemoteTaskSelectionDialog dlg = new RemoteTaskSelectionDialog(PlatformUI.getWorkbench() .getActiveWorkbenchWindow() .getShell()); - dlg.setTitle("Open Repository Task"); + dlg.setTitle(Messages.OpenRepositoryTask_Open_Repository_Task); IDialogSettings settings = TasksUiPlugin.getDefault().getDialogSettings(); IDialogSettings dlgSettings = settings.getSection(OPEN_REMOTE_TASK_DIALOG_DIALOG_SETTINGS); @@ -99,7 +98,8 @@ public class OpenRepositoryTask extends Action implements IWorkbenchWindowAction } if (!openSuccessful) { MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Open Task", "Could not find matching repository task."); + Messages.OpenRepositoryTask_Open_Task, + Messages.OpenRepositoryTask_Could_not_find_matching_repository_task); } } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskAction.java index 1fec30fcf..8b8975326 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskAction.java @@ -35,8 +35,8 @@ public class OpenTaskAction extends ActionDelegate implements IWorkbenchWindowAc @Override public void run(IAction action) { TaskSelectionDialog dlg = new TaskSelectionDialog(window.getShell()); - dlg.setTitle("Open Task"); - dlg.setMessage("&Select a task to open (? = any character, * = any String):"); + dlg.setTitle(Messages.OpenTaskAction_Open_Task); + dlg.setMessage(Messages.OpenTaskAction_Select_a_task_to_open__); dlg.setShowExtendedOpeningOptions(true); if (dlg.open() != Window.OK) { diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskListElementAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskListElementAction.java index 771b1061f..314426077 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskListElementAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTaskListElementAction.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2004, 2008 Tasktop Technologies and others. + * Copyright (c) 2004, 2008 Tasktop Technologies and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -28,14 +28,14 @@ import org.eclipse.swt.widgets.Event; */ public class OpenTaskListElementAction extends Action { - public static final String ID = "org.eclipse.mylyn.tasklist.actions.open"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.open"; //$NON-NLS-1$ private final TreeViewer viewer; public OpenTaskListElementAction(TreeViewer view) { this.viewer = view; - setText("Open"); - setToolTipText("Open Task List Element"); + setText(Messages.OpenTaskListElementAction_Open); + setToolTipText(Messages.OpenTaskListElementAction_Open_Task_List_Element); setId(ID); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTasksUiPreferencesAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTasksUiPreferencesAction.java index 1c0bb77d9..0442a5f1e 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTasksUiPreferencesAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTasksUiPreferencesAction.java @@ -22,13 +22,11 @@ import org.eclipse.ui.dialogs.PreferencesUtil; */ public class OpenTasksUiPreferencesAction extends Action { - public static final String ID = "org.eclipse.mylyn.tasks.ui.actions.preferences.open"; - - private static final String LABEL = "Preferences..."; + public static final String ID = "org.eclipse.mylyn.tasks.ui.actions.preferences.open"; //$NON-NLS-1$ public OpenTasksUiPreferencesAction() { - setText(LABEL); - setToolTipText(LABEL); + setText(Messages.OpenTasksUiPreferencesAction_Preferences_); + setToolTipText(Messages.OpenTasksUiPreferencesAction_Preferences_); setId(ID); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenWithBrowserAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenWithBrowserAction.java index 845ac0a35..cd1757f69 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenWithBrowserAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenWithBrowserAction.java @@ -26,13 +26,11 @@ import org.eclipse.ui.actions.BaseSelectionListenerAction; */ public class OpenWithBrowserAction extends BaseSelectionListenerAction { - private static final String LABEL = "Open with Browser"; - - public static final String ID = "org.eclipse.mylyn.tasklist.actions.open.browser"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.open.browser"; //$NON-NLS-1$ public OpenWithBrowserAction() { - super(LABEL); - setToolTipText(LABEL); + super(Messages.OpenWithBrowserAction_Open_with_Browser); + setToolTipText(Messages.OpenWithBrowserAction_Open_with_Browser); setId(ID); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PresentationDropDownSelectionAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PresentationDropDownSelectionAction.java index 7398c71ab..52c666986 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PresentationDropDownSelectionAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PresentationDropDownSelectionAction.java @@ -28,9 +28,7 @@ import org.eclipse.swt.widgets.Menu; */ public class PresentationDropDownSelectionAction extends Action implements IMenuCreator { - private static final String LABEL_NAME = "Task Presentation"; - - public static final String ID = "org.eclipse.mylyn.tasklist.actions.presentationselection"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.presentationselection"; //$NON-NLS-1$ private final TaskListView view; @@ -40,8 +38,8 @@ public class PresentationDropDownSelectionAction extends Action implements IMenu super(); this.view = view; setMenuCreator(this); - setText(LABEL_NAME); - setToolTipText(LABEL_NAME); + setText(Messages.PresentationDropDownSelectionAction_Task_Presentation); + setToolTipText(Messages.PresentationDropDownSelectionAction_Task_Presentation); setId(ID); setEnabled(true); setImageDescriptor(CommonImages.PRESENTATION); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryCloneAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryCloneAction.java index 69d6eb3c5..e5ede9e2d 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryCloneAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryCloneAction.java @@ -75,7 +75,7 @@ public class QueryCloneAction extends Action implements IViewActionDelegate { public void run(RepositoryQuery selectedQuery) { if (selectedQuery == null) { MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Clone Query", "No query selected."); + Messages.QueryCloneAction_Clone_Query, Messages.QueryCloneAction_No_query_selected); return; } @@ -93,8 +93,8 @@ public class QueryCloneAction extends Action implements IViewActionDelegate { } } else { // cannot happen - TasksUiInternal.displayStatus("Clone Query Failes", new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, - "Query cloning did not succeeded.")); + TasksUiInternal.displayStatus(Messages.QueryCloneAction_Clone_Query_Failes, new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, + Messages.QueryCloneAction_Query_cloning_did_not_succeeded)); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryExportAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryExportAction.java index c4d1ab788..84a49c3ef 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryExportAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryExportAction.java @@ -12,6 +12,7 @@ package org.eclipse.mylyn.internal.tasks.ui.actions; import java.io.File; +import java.text.MessageFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; @@ -79,29 +80,29 @@ public class QueryExportAction extends Action implements IViewActionDelegate { public void run(List<RepositoryQuery> queries) { Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); FileDialog dialog = new FileDialog(shell, SWT.PRIMARY_MODAL | SWT.SAVE); - dialog.setFilterExtensions(new String[] { "*" + ITasksCoreConstants.FILE_EXTENSION }); + dialog.setFilterExtensions(new String[] { "*" + ITasksCoreConstants.FILE_EXTENSION }); //$NON-NLS-1$ if (queries.size() == 1) { dialog.setFileName(queries.get(0).getHandleIdentifier() + ITasksCoreConstants.FILE_EXTENSION); } else { - String fomratString = "yyyy-MM-dd"; + String fomratString = "yyyy-MM-dd"; //$NON-NLS-1$ SimpleDateFormat format = new SimpleDateFormat(fomratString, Locale.ENGLISH); String date = format.format(new Date()); - dialog.setFileName(date + "-exported-queries" + ITasksCoreConstants.FILE_EXTENSION); + dialog.setFileName(date + "-exported-queries" + ITasksCoreConstants.FILE_EXTENSION); //$NON-NLS-1$ } String path = dialog.open(); if (path != null) { File file = new File(path); if (file.isDirectory()) { - MessageDialog.openError(shell, "Query Export Error", - "Could not export query because specified location is a folder"); + MessageDialog.openError(shell, Messages.QueryExportAction_Query_Export_Error, + Messages.QueryExportAction_Could_not_export_query_because_specified_location_is_a_folder); return; } // Prompt the user to confirm if save operation will cause an overwrite if (file.exists()) { - if (!MessageDialog.openConfirm(shell, "Confirm File Replace", "The file " + file.getPath() - + " already exists. Do you want to overwrite it?")) { + if (!MessageDialog.openConfirm(shell, Messages.QueryExportAction_Confirm_File_Replace, + MessageFormat.format(Messages.QueryExportAction_The_file_X_already_exists, file.getPath()))) { return; } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryImportAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryImportAction.java index 6ae87080b..239218971 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryImportAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/QueryImportAction.java @@ -64,9 +64,10 @@ public class QueryImportAction extends Action implements IViewActionDelegate { public void run() { Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); FileDialog dialog = new FileDialog(shell); - dialog.setText("Import Mylyn Query"); + dialog.setText(Messages.QueryImportAction_Import_Mylyn_Query); dialog.setFilterExtensions(PlatformUtil.getFilterExtensions(ITasksCoreConstants.FILE_EXTENSION)); - dialog.setFilterNames(new String[] { "Mylyn Queries (*" + ITasksCoreConstants.FILE_EXTENSION + ")" }); + dialog.setFilterNames(new String[] { Messages.QueryImportAction_Mylyn_Queries + + " (*" + ITasksCoreConstants.FILE_EXTENSION + ")" }); //$NON-NLS-1$ //$NON-NLS-2$ String path = dialog.open(); if (path != null) { @@ -78,12 +79,12 @@ public class QueryImportAction extends Action implements IViewActionDelegate { if (queries.size() > 0) { importQueries(queries, repositories, shell); } else { - MessageDialog.openError(shell, "Query Import Error", - "The specified file is not an exported query. Please, check that you have provided the correct file."); + MessageDialog.openError(shell, Messages.QueryImportAction_Query_Import_Error, + Messages.QueryImportAction_The_specified_file_is_not_an_exported_query); } } catch (IOException e) { - MessageDialog.openError(shell, "Query Import Error", - "The specified file is not an exported query. Please, check that you have provided the correct file."); + MessageDialog.openError(shell, Messages.QueryImportAction_Query_Import_Error, + Messages.QueryImportAction_The_specified_file_is_not_an_exported_query); } } } @@ -100,21 +101,21 @@ public class QueryImportAction extends Action implements IViewActionDelegate { List<RepositoryQuery> badQueries = insertQueries(queries); // notify user about importing - String message = "The following queries were imported successfully: "; + String message = Messages.QueryImportAction_The_following_queries_were_imported_successfully; for (RepositoryQuery imported : queries) { if (!badQueries.contains(imported)) { - message += "\n" + imported.getHandleIdentifier(); + message += "\n" + imported.getHandleIdentifier(); //$NON-NLS-1$ } } if (badQueries.size() > 0) { - message += "\n\n These queries were not imported, since their repository was not found: "; + message += "\n\n " + Messages.QueryImportAction_These_queries_were_not_imported; //$NON-NLS-1$ for (RepositoryQuery bad : badQueries) { - message += "\n" + bad.getHandleIdentifier(); + message += "\n" + bad.getHandleIdentifier(); //$NON-NLS-1$ } } - MessageDialog.openInformation(shell, "Query Import Completed", message); + MessageDialog.openInformation(shell, Messages.QueryImportAction_Query_Import_Completed, message); } /** @@ -164,7 +165,7 @@ public class QueryImportAction extends Action implements IViewActionDelegate { * @since 2.1 */ public static String resolveIdentifiersConflict(RepositoryQuery query) { - String patternStr = "\\[(\\d+)\\]$"; // all string that end with [x], where x is a number + String patternStr = "\\[(\\d+)\\]$"; // all string that end with [x], where x is a number //$NON-NLS-1$ Pattern pattern = Pattern.compile(patternStr); // resolve name conflict @@ -184,9 +185,9 @@ public class QueryImportAction extends Action implements IViewActionDelegate { // increment index int index = Integer.parseInt(matcher.group(1)); index++; - handle = matcher.replaceAll("[" + index + "]"); + handle = matcher.replaceAll("[" + index + "]"); //$NON-NLS-1$ //$NON-NLS-2$ } else { - handle += "[1]"; + handle += "[1]"; //$NON-NLS-1$ } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RefreshRepositoryTasksAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RefreshRepositoryTasksAction.java index a240ca02a..7adad4824 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RefreshRepositoryTasksAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RefreshRepositoryTasksAction.java @@ -31,10 +31,10 @@ import org.eclipse.ui.IViewPart; */ public class RefreshRepositoryTasksAction extends AbstractTaskRepositoryAction implements IViewActionDelegate { - private static final String ID = "org.eclipse.mylyn.tasklist.repositories.refreshAllTasks"; + private static final String ID = "org.eclipse.mylyn.tasklist.repositories.refreshAllTasks"; //$NON-NLS-1$ public RefreshRepositoryTasksAction() { - super("Refresh All Tasks"); + super(Messages.RefreshRepositoryTasksAction_Refresh_All_Tasks); setId(ID); setEnabled(false); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java index 2b443a84f..c4ece0e27 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java @@ -29,15 +29,13 @@ import org.eclipse.mylyn.tasks.core.ITask; */ public class RemoveFromCategoryAction extends Action { - private static final String LABEL = "Remove From Category"; - - public static final String ID = "org.eclipse.mylyn.tasklist.actions.remove"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.remove"; //$NON-NLS-1$ private final TaskListView view; public RemoveFromCategoryAction(TaskListView view) { this.view = view; - setText(LABEL); + setText(Messages.RemoveFromCategoryAction_Remove_From_Category); setId(ID); setImageDescriptor(CommonImages.REMOVE); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RenameAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RenameAction.java index fb6457b5a..56004a9e0 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RenameAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RenameAction.java @@ -25,14 +25,12 @@ import org.eclipse.ui.actions.BaseSelectionListenerAction; */ public class RenameAction extends BaseSelectionListenerAction { - private static final String LABEL_NAME = "Rename"; - - public static final String ID = "org.eclipse.mylyn.tasklist.actions.rename"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.rename"; //$NON-NLS-1$ private final TaskListView view; public RenameAction(TaskListView view) { - super(LABEL_NAME); + super(Messages.RenameAction_Rename); this.view = view; setId(ID); setAccelerator(SWT.F2); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowInTaskListAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowInTaskListAction.java index f17e864bb..8c2967f0b 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowInTaskListAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ShowInTaskListAction.java @@ -24,7 +24,7 @@ import org.eclipse.ui.actions.BaseSelectionListenerAction; public class ShowInTaskListAction extends BaseSelectionListenerAction { public ShowInTaskListAction() { - super("&Show In Task List"); + super(Messages.ShowInTaskListAction_Show_In_Task_List); } @Override @@ -39,4 +39,4 @@ public class ShowInTaskListAction extends BaseSelectionListenerAction { } } -}
\ No newline at end of file +} diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAutomaticallyAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAutomaticallyAction.java index d66686ede..fb42f8486 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAutomaticallyAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAutomaticallyAction.java @@ -20,13 +20,11 @@ import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin; */ public class SynchronizeAutomaticallyAction extends Action { - public static final String ID = "org.eclipse.mylyn.tasks.ui.actions.synchronize.background"; - - private static final String LABEL = "Synchronize Automatically"; + public static final String ID = "org.eclipse.mylyn.tasks.ui.actions.synchronize.background"; //$NON-NLS-1$ public SynchronizeAutomaticallyAction() { - setText(LABEL); - setToolTipText(LABEL); + setText(Messages.SynchronizeAutomaticallyAction_Synchronize_Automatically); + setToolTipText(Messages.SynchronizeAutomaticallyAction_Synchronize_Automatically); setId(ID); setChecked(TasksUiPlugin.getDefault().getPreferenceStore().getBoolean( ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED)); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeEditorAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeEditorAction.java index 433d3cea2..69f7967b3 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeEditorAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeEditorAction.java @@ -29,15 +29,11 @@ import org.eclipse.ui.actions.BaseSelectionListenerAction; */ public class SynchronizeEditorAction extends BaseSelectionListenerAction { - private static final String LABEL = "Synchronize"; - - private static final String TOOLTIP = "Synchronize Incoming Changes"; - - public static final String ID = "org.eclipse.mylyn.tasklist.actions.synchronize.editor"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.synchronize.editor"; //$NON-NLS-1$ public SynchronizeEditorAction() { - super(LABEL); - setToolTipText(TOOLTIP); + super(Messages.SynchronizeEditorAction_Synchronize); + setToolTipText(Messages.SynchronizeEditorAction_Synchronize_Incoming_Changes); setId(ID); setImageDescriptor(CommonImages.REFRESH_SMALL); // setAccelerator(SWT.MOD1 + 'r'); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskActivateAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskActivateAction.java index a8b3e4c2d..8a65891d6 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskActivateAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskActivateAction.java @@ -26,11 +26,11 @@ import org.eclipse.ui.IViewPart; */ public class TaskActivateAction extends Action implements IViewActionDelegate { - public static final String ID = "org.eclipse.mylyn.tasklist.actions.context.activate"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.context.activate"; //$NON-NLS-1$ public TaskActivateAction() { setId(ID); - setText("Activate"); + setText(Messages.TaskActivateAction_Activate); setImageDescriptor(TasksUiImages.CONTEXT_ACTIVE_CENTERED); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java index 0446517bf..46fe058f3 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright (c) 2004, 2008 Tasktop Technologies and others. + * Copyright (c) 2004, 2008 Tasktop Technologies and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -26,11 +26,11 @@ import org.eclipse.mylyn.tasks.ui.TasksUiImages; */ public class TaskDeactivateAction extends Action { - public static final String ID = "org.eclipse.mylyn.tasklist.actions.context.deactivate"; + public static final String ID = "org.eclipse.mylyn.tasklist.actions.context.deactivate"; //$NON-NLS-1$ public TaskDeactivateAction() { setId(ID); - setText("Deactivate"); + setText(Messages.TaskDeactivateAction_Deactivate); setImageDescriptor(TasksUiImages.CONTEXT_INACTIVE_EMPTY); } @@ -41,7 +41,7 @@ public class TaskDeactivateAction extends Action { } } catch (Exception e) { StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, - "Closing task editor on task deactivation failed", e)); + "Closing task editor on task deactivation failed", e)); //$NON-NLS-1$ } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskEditorCopyAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskEditorCopyAction.java index 23369a0a1..93380010e 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskEditorCopyAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskEditorCopyAction.java @@ -21,7 +21,7 @@ import org.eclipse.jface.action.Action; public class TaskEditorCopyAction extends Action { public TaskEditorCopyAction() { - setText("TaskInfoEditor.copy.text"); + setText("TaskInfoEditor.copy.text"); //$NON-NLS-1$ } @Override diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskExportAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskExportAction.java index cb984600f..765f32788 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskExportAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskExportAction.java @@ -84,7 +84,7 @@ public class TaskExportAction extends Action implements IViewActionDelegate { if (tasks.size() == 1) { // open FileDialog FileDialog dialog = new FileDialog(shell, SWT.PRIMARY_MODAL | SWT.SAVE); - dialog.setFilterExtensions(new String[] { "*" + ITasksCoreConstants.FILE_EXTENSION }); + dialog.setFilterExtensions(new String[] { "*" + ITasksCoreConstants.FILE_EXTENSION }); //$NON-NLS-1$ AbstractTask task = tasks.get(0); @@ -94,8 +94,8 @@ public class TaskExportAction extends Action implements IViewActionDelegate { if (path != null) { File file = new File(path); if (file.isDirectory()) { - MessageDialog.openError(shell, "Task Export Error", - "Could not export task because specified location is a folder"); + MessageDialog.openError(shell, Messages.TaskExportAction_Task_Export_Error, + Messages.TaskExportAction_Could_not_export_task_because_specified_location_is_a_folder); return; } taskFiles.put(task, file); @@ -116,8 +116,8 @@ public class TaskExportAction extends Action implements IViewActionDelegate { // Prompt the user to confirm if save operation will cause an overwrite if (file.exists()) { - if (!MessageDialog.openQuestion(shell, "Confirm File Replace", "The file " + file.getPath() - + " already exists. Do you want to overwrite it?")) { + if (!MessageDialog.openQuestion(shell, Messages.TaskExportAction_Confirm_File_Replace, Messages.TaskExportAction_FILE + file.getPath() + + Messages.TaskExportAction_already_exists)) { continue; } } @@ -131,7 +131,7 @@ public class TaskExportAction extends Action implements IViewActionDelegate { if (fileName.length() > 50) { fileName = fileName.substring(0, 50); } - fileName = task.getTaskId() + " - " + fileName + ITasksCoreConstants.FILE_EXTENSION; + fileName = task.getTaskId() + " - " + fileName + ITasksCoreConstants.FILE_EXTENSION; //$NON-NLS-1$ return fileName; } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskImportAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskImportAction.java index 549d34f1a..ae01eb4df 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskImportAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskImportAction.java @@ -56,9 +56,10 @@ public class TaskImportAction extends Action implements IViewActionDelegate { public void run() { Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); FileDialog dialog = new FileDialog(shell); - dialog.setText("Import Mylyn Tasks"); + dialog.setText(Messages.TaskImportAction_Import_Mylyn_Tasks); dialog.setFilterExtensions(PlatformUtil.getFilterExtensions(ITasksCoreConstants.FILE_EXTENSION)); - dialog.setFilterNames(new String[] { "Mylyn Tasks (*" + ITasksCoreConstants.FILE_EXTENSION + ")" }); + dialog.setFilterNames(new String[] { Messages.TaskImportAction_Mylyn_Tasks + + " (*" + ITasksCoreConstants.FILE_EXTENSION + ")" }); //$NON-NLS-1$ //$NON-NLS-2$ String path = dialog.open(); if (path != null) { @@ -70,8 +71,8 @@ public class TaskImportAction extends Action implements IViewActionDelegate { TasksUiInternal.importTasks(readTasks, repositories, file, shell); // refreshTaskListView(); } else { - MessageDialog.openError(shell, "Task Import Error", - "The specified file is not an exported task. Please, check that you have provided the correct file."); + MessageDialog.openError(shell, Messages.TaskImportAction_Task_Import_Error, + Messages.TaskImportAction_The_specified_file_is_not_an_exported_task); return; } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskListSortAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskListSortAction.java index 207498530..4391a1818 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskListSortAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskListSortAction.java @@ -24,7 +24,7 @@ public class TaskListSortAction extends Action { private final TaskListSortDialog dialog; public TaskListSortAction(IWorkbenchPartSite site, TaskListView taskListView) { - super("Sort..."); + super(Messages.TaskListSortAction_Sort_); setEnabled(true); dialog = new TaskListSortDialog(site, taskListView); } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java index 1906a5915..f529b4c54 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskSelectionDialog.java @@ -95,7 +95,7 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog { private class DeselectWorkingSetAction extends Action { public DeselectWorkingSetAction() { - super("&Deselect Working Set", IAction.AS_PUSH_BUTTON); + super(Messages.TaskSelectionDialog_Deselect_Working_Set, IAction.AS_PUSH_BUTTON); } @Override @@ -107,7 +107,7 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog { private class EditWorkingSetAction extends Action { public EditWorkingSetAction() { - super("&Edit Active Working Set...", IAction.AS_PUSH_BUTTON); + super(Messages.TaskSelectionDialog_Edit_Active_Working_Set_, IAction.AS_PUSH_BUTTON); } @Override @@ -126,10 +126,10 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog { private final IWorkingSet workingSet; public FilterWorkingSetAction(IWorkingSet workingSet, int shortcutKeyNumber) { - super("", IAction.AS_RADIO_BUTTON); + super("", IAction.AS_RADIO_BUTTON); //$NON-NLS-1$ this.workingSet = workingSet; if (shortcutKeyNumber >= 1 && shortcutKeyNumber <= 9) { - setText("&" + String.valueOf(shortcutKeyNumber) + " " + workingSet.getLabel()); + setText("&" + String.valueOf(shortcutKeyNumber) + " " + workingSet.getLabel()); //$NON-NLS-1$ //$NON-NLS-2$ } else { setText(workingSet.getLabel()); } @@ -145,7 +145,7 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog { private class SelectWorkingSetAction extends Action { public SelectWorkingSetAction() { - super("Select &Working Set...", IAction.AS_PUSH_BUTTON); + super(Messages.TaskSelectionDialog_Select_Working_Set_, IAction.AS_PUSH_BUTTON); } @Override @@ -171,7 +171,7 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog { private class ShowCompletedTasksAction extends Action { public ShowCompletedTasksAction() { - super("Show &Completed Tasks", IAction.AS_CHECK_BOX); + super(Messages.TaskSelectionDialog_Show_Completed_Tasks, IAction.AS_CHECK_BOX); } @Override @@ -276,7 +276,7 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog { public TasksFilter(boolean showCompletedTasks, IWorkingSet selectedWorkingSet) { super(new SearchPattern()); // Little hack to force always a match inside any part of task text - patternMatcher.setPattern("*" + patternMatcher.getPattern()); + patternMatcher.setPattern("*" + patternMatcher.getPattern()); //$NON-NLS-1$ this.showCompletedTasks = showCompletedTasks; elements = new HashSet<AbstractTaskContainer>(); @@ -362,15 +362,15 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog { private static final int CREATE_ID = SEARCH_ID + 1; - private static final String IS_USING_WINDOW_WORKING_SET_SETTING = "IsUsingWindowWorkingSet"; + private static final String IS_USING_WINDOW_WORKING_SET_SETTING = "IsUsingWindowWorkingSet"; //$NON-NLS-1$ - private static final String OPEN_IN_BROWSER_SETTING = "OpenInBrowser"; + private static final String OPEN_IN_BROWSER_SETTING = "OpenInBrowser"; //$NON-NLS-1$ - private static final String SHOW_COMPLETED_TASKS_SETTING = "ShowCompletedTasks"; + private static final String SHOW_COMPLETED_TASKS_SETTING = "ShowCompletedTasks"; //$NON-NLS-1$ - private static final String TASK_SELECTION_DIALOG_SECTION = "TaskSelectionDialogSection"; + private static final String TASK_SELECTION_DIALOG_SECTION = "TaskSelectionDialogSection"; //$NON-NLS-1$ - private static final String WORKING_SET_NAME_SETTING = "WorkingSetName"; + private static final String WORKING_SET_NAME_SETTING = "WorkingSetName"; //$NON-NLS-1$ /** * Caches all tasks; populated at first access @@ -443,7 +443,7 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog { // .getDecoratorManager() // .getLabelDecorator())); setDetailsLabelProvider(new TaskDetailLabelProvider()); - setSeparatorLabel(TaskListView.LABEL_VIEW + " matches"); + setSeparatorLabel(TaskListView.LABEL_VIEW + Messages.TaskSelectionDialog__matches); // If there is a text selection, use it as the initial filter IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); @@ -491,7 +491,7 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog { createHelpControl(composite); } if (needsCreateTask) { - createTaskButton = createButton(composite, CREATE_ID, "&New Task...", true); + createTaskButton = createButton(composite, CREATE_ID, Messages.TaskSelectionDialog_New_Task_, true); createTaskButton.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent e) { @@ -524,7 +524,7 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog { composite.setLayoutData(GridDataFactory.fillDefaults().create()); openInBrowserCheck = new Button(composite, SWT.CHECK); - openInBrowserCheck.setText("Open with &Browser"); + openInBrowserCheck.setText(Messages.TaskSelectionDialog_Open_with_Browser); openInBrowserCheck.setSelection(openInBrowser); ImageHyperlink openHyperlink = new ImageHyperlink(composite, SWT.NONE); @@ -552,7 +552,7 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog { @Override protected void fillContentProvider(AbstractContentProvider contentProvider, ItemsFilter itemsFilter, IProgressMonitor progressMonitor) throws CoreException { - progressMonitor.beginTask("Search for tasks", 100); + progressMonitor.beginTask(Messages.TaskSelectionDialog_Search_for_tasks, 100); if (allTasks == null) { allTasks = new HashSet<AbstractTask>(); @@ -562,7 +562,7 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog { progressMonitor.worked(10); SubProgressMonitor subMonitor = new SubProgressMonitor(progressMonitor, 90); - subMonitor.beginTask("Scanning tasks", allTasks.size()); + subMonitor.beginTask(Messages.TaskSelectionDialog_Scanning_tasks, allTasks.size()); for (ITask task : allTasks) { contentProvider.add(task, itemsFilter); subMonitor.worked(1); @@ -584,7 +584,7 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog { menuManager.add(deselectAction); final EditWorkingSetAction editAction = new EditWorkingSetAction(); menuManager.add(editAction); - menuManager.add(new Separator("lruActions")); + menuManager.add(new Separator("lruActions")); //$NON-NLS-1$ final FilterWorkingSetAction windowWorkingSetAction = new FilterWorkingSetAction(windowWorkingSet, 1); menuManager.add(windowWorkingSetAction); @@ -614,7 +614,7 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog { } ActionContributionItem ci = new ActionContributionItem(action); lruActions.add(ci); - manager.appendToGroup("lruActions", ci); + manager.appendToGroup("lruActions", ci); //$NON-NLS-1$ } } windowWorkingSetAction.setChecked(windowWorkingSet.equals(selectedWorkingSet)); @@ -632,7 +632,7 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog { section.put(OPEN_IN_BROWSER_SETTING, false); section.put(SHOW_COMPLETED_TASKS_SETTING, true); section.put(IS_USING_WINDOW_WORKING_SET_SETTING, true); - section.put(WORKING_SET_NAME_SETTING, ""); + section.put(WORKING_SET_NAME_SETTING, ""); //$NON-NLS-1$ } return section; } @@ -710,7 +710,7 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog { settings.put(SHOW_COMPLETED_TASKS_SETTING, showCompletedTasks); settings.put(IS_USING_WINDOW_WORKING_SET_SETTING, selectedWorkingSet == windowWorkingSet); if (selectedWorkingSet == null) { - settings.put(WORKING_SET_NAME_SETTING, ""); + settings.put(WORKING_SET_NAME_SETTING, ""); //$NON-NLS-1$ } else { settings.put(WORKING_SET_NAME_SETTING, selectedWorkingSet.getName()); } @@ -722,7 +722,7 @@ public class TaskSelectionDialog extends FilteredItemsSelectionDialog { if (item instanceof ITask) { return Status.OK_STATUS; } - return new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, "Selected item is not a task"); + return new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, Messages.TaskSelectionDialog_Selected_item_is_not_a_task); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskWorkingSetAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskWorkingSetAction.java index fadf3ea58..860859e41 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskWorkingSetAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskWorkingSetAction.java @@ -45,7 +45,6 @@ import org.eclipse.ui.IWorkingSet; import org.eclipse.ui.IWorkingSetManager; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.dialogs.IWorkingSetEditWizard; -import org.eclipse.ui.internal.WorkbenchMessages; import org.eclipse.ui.internal.WorkbenchPlugin; import org.eclipse.ui.internal.WorkingSetComparator; import org.eclipse.ui.internal.dialogs.WorkingSetFilter; @@ -59,16 +58,13 @@ import org.eclipse.ui.internal.dialogs.WorkingSetLabelProvider; */ public class TaskWorkingSetAction extends Action implements IMenuCreator { - public static final String LABEL_SETS_NONE = "All"; + public static final String LABEL_SETS_NONE = Messages.TaskWorkingSetAction_All; - public static String TASK_WORKING_SET_TEXT_LABEL = "Select and Edit Working Sets"; - - private Menu dropDownMenu = null; + private Menu dropDownMenu; public TaskWorkingSetAction() { - super(); - setText("Sets"); - setToolTipText(TASK_WORKING_SET_TEXT_LABEL); + setText(Messages.TaskWorkingSetAction_Sets); + setToolTipText(Messages.TaskWorkingSetAction_Select_and_Edit_Working_Sets); setImageDescriptor(TasksUiImages.TASK_WORKING_SET); setEnabled(true); setMenuCreator(this); @@ -174,7 +170,7 @@ public class TaskWorkingSetAction extends Action implements IMenuCreator { private class ManageWorkingSetsAction extends Action { ManageWorkingSetsAction() { - super(WorkbenchMessages.Edit); + super(""); //$NON-NLS-1$ } @Override @@ -187,7 +183,7 @@ public class TaskWorkingSetAction extends Action implements IMenuCreator { protected class ToggleEnableAllSetsAction extends Action { ToggleEnableAllSetsAction() { - super("Deselect All", IAction.AS_CHECK_BOX); + super(Messages.TaskWorkingSetAction_Deselect_All, IAction.AS_CHECK_BOX); // setImageDescriptor(TasksUiImages.TASK_WORKING_SET); // setChecked(!areAllTaskWorkingSetsEnabled()); } @@ -240,8 +236,8 @@ public class TaskWorkingSetAction extends Action implements IMenuCreator { setShellStyle(getShellStyle() | SWT.RESIZE); this.window = window; //setTitle(WorkbenchMessages.WorkingSetSelectionDialog_title_multiSelect); - setTitle(TASK_WORKING_SET_TEXT_LABEL); - setMessage(WorkbenchMessages.WorkingSetSelectionDialog_message_multiSelect); + setTitle(Messages.TaskWorkingSetAction_Select_and_Edit_Working_Sets); + setMessage(""); //$NON-NLS-1$ if (workingSetIds == null || workingSetIds.length == 0) { taskWorkingSetIds = null; diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleAllWorkingSetsAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleAllWorkingSetsAction.java index 1a2a727c6..9fece12e3 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleAllWorkingSetsAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleAllWorkingSetsAction.java @@ -31,7 +31,7 @@ public class ToggleAllWorkingSetsAction extends Action { private final IWorkbenchWindow window; public ToggleAllWorkingSetsAction(IWorkbenchWindow window) { - super("Show All", IAction.AS_CHECK_BOX); + super(Messages.ToggleAllWorkingSetsAction_Show_All, IAction.AS_CHECK_BOX); super.setChecked(TaskWorkingSetUpdater.areNoTaskWorkingSetsEnabled()); this.window = window; } @@ -57,4 +57,4 @@ public class ToggleAllWorkingSetsAction extends Action { public void runWithEvent(Event event) { run(); } -}
\ No newline at end of file +} diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleTaskActivationAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleTaskActivationAction.java index 52a6b80fe..d5c04d8f0 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleTaskActivationAction.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ToggleTaskActivationAction.java @@ -23,11 +23,7 @@ import org.eclipse.mylyn.tasks.ui.TasksUiImages; */ public class ToggleTaskActivationAction extends Action implements ITaskActivationListener { - public static final String ID = "org.eclipse.mylyn.tasks.ui.actions.task.activation.toggle"; - - private static final String LABEL_ACTIVATE = "Activate Task"; - - private static final String LABEL_DEACTIVATE = "Deactivate Task"; + public static final String ID = "org.eclipse.mylyn.tasks.ui.actions.task.activation.toggle"; //$NON-NLS-1$ private final ITask task; @@ -53,11 +49,11 @@ public class ToggleTaskActivationAction extends Action implements ITaskActivatio private void update() { setChecked(task.isActive()); if (task.isActive()) { - setText(LABEL_DEACTIVATE); - setToolTipText(LABEL_DEACTIVATE); + setText(Messages.ToggleTaskActivationAction_Deactivate_Task); + setToolTipText(Messages.ToggleTaskActivationAction_Deactivate_Task); } else { - setText(LABEL_ACTIVATE); - setToolTipText(LABEL_ACTIVATE); + setText(Messages.ToggleTaskActivationAction_Activate_Task); + setToolTipText(Messages.ToggleTaskActivationAction_Activate_Task); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/messages.properties b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/messages.properties new file mode 100644 index 000000000..cd003f6ae --- /dev/null +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/messages.properties @@ -0,0 +1,193 @@ +AbstractChangeCompletionAction_Mark_selected_local_tasks_X=Mark selected local tasks {0}? +ActivateTaskDialogAction_Activate_Task=Activate Task +ActivateTaskDialogAction_Select_a_task_to_activate__=&Select a task to activate (? = any character, * = any String): + +ActivateTaskHistoryDropDownAction_Activate_Previous_Task=Activate Previous Task + +AddRepositoryAction_Add_new_query=Add new query + +AddRepositoryAction_Add_a_query_to_the_Task_List=Would you like to add a query to the Task List for this repository? +AddRepositoryAction_Add_Repository_Query=Add Repository Query +AddRepositoryAction_Add_Task_Repository=Add Task Repository +AddRepositoryAction_Do_not_show_again=Do not show again + +AddRepositoryTaskAction_Add_an_existing_repository_task_issue=Add an existing repository task/issue + +AttachAction_Attach_=Attach... +AttachAction_Submit_changes_or_synchronize_task_before_adding_attachments=Submit changes or synchronize task before adding attachments. + +AttachScreenshotAction_Attach_Screenshot_=Attach Screenshot... +AttachScreenshotAction_Submit_changes_or_synchronize_task_before_adding_attachments=Submit changes or synchronize task before adding attachments. + +ClearOutgoingAction_Clear_outgoing=Clear outgoing +ClearOutgoingAction_Clear_outgoing_failed=Clear outgoing failed +ClearOutgoingAction_Confirm_discard=Confirm discard +ClearOutgoingAction_Discard_all_outgoing_changes_=Discard all outgoing changes? + +CloneTaskAction_Clone_Task_Failed=Clone Task Failed +CloneTaskAction_Clone_This_Task=Clone This Task +CloneTaskAction_Cloned_from_=Cloned from\:\ + +CollapseAllAction_Collapse_All=Collapse All + +CompareAttachmentsAction_Compare__=Compare ( +CompareAttachmentsAction_Compare_Attachments=Compare Attachments +CompareAttachmentsAction_Failed_to_find_attachment=Failed to find attachment\:\ + +CopyTaskDetailsAction_Copy_Details=Copy Details + +DeleteAction_Confirm_Delete=Confirm Delete +DeleteAction_Delete=Delete +DeleteAction_Delete_all_of_the_unsubmitted_tasks=Delete all of the unsubmitted tasks? +DeleteAction_Delete_the_elements_listed_below=Delete the elements listed below? If categories or queries are selected contained tasks will not be deleted. Contexts will be deleted for selected tasks. +DeleteAction_Delete_failed=Delete failed +DeleteAction_Delete_the_planning_information_and_context_for_the_repository_task=Delete the planning information and context for the repository task? The server copy will not be deleted and the task will remain in queries that match it. +DeleteAction_Delete_the_planning_information_and_context_of_all_unmatched_tasks=Delete the planning information and context of all unmatched tasks? The server copy of these tasks will not be deleted and the task will remain in queries that match it. +DeleteAction_Nothing_selected=Nothing selected. +DeleteAction_Permanently_delete_the_category=Permanently delete the category? Local tasks will be moved to the Uncategorized folder. Repository tasks will be moved to the Unmatched folder. +DeleteAction_Permanently_delete_the_element_listed_below=Permanently delete the element listed below? +DeleteAction_Permanently_delete_the_query=Permanently delete the query? Contained tasks will be moved to the Unmatched folder. +DeleteAction_Permanently_delete_the_task_listed_below=Permanently delete the task listed below? + +DeleteTaskRepositoryAction_Confirm_Delete=Confirm Delete +DeleteTaskRepositoryAction_Delete_Repository=Delete Repository +DeleteTaskRepositoryAction_Delete_the_selected_task_repositories=Delete the selected task repositories? +DeleteTaskRepositoryAction_Repository_In_Use=Repository In Use +DeleteTaskRepositoryAction_Repository_In_Use_MESSAGE=One or more of the selected repositories is being used by a query or a task and can not be deleted. + +EditRepositoryPropertiesAction_Properties=Properties + +ExpandAllAction_Expand_All=Expand All + +FilterArchiveContainerAction_Filter_Archives=Filter Archives + +FilterCompletedTasksAction_Filter_Completed_Tasks=Filter Completed Tasks + +GoIntoAction_Go_Into=Go Into + +GoUpAction_Go_Up_To_Root=Go Up To Root + +GroupSubTasksAction_Group_Subtasks=Group Subtasks + +LinkWithEditorAction_Link_with_Editor=&Link with Editor + +MarkTaskCompleteAction_Complete=Complete +MarkTaskCompleteAction_Confirm_Mark_Completed=Confirm Mark Completed +MarkTaskCompleteAction_Mark_=Mark\ + +MarkTaskIncompleteAction_Confirm_Mark_Incompleted=Confirm Mark Incompleted +MarkTaskIncompleteAction_Incomplete=Incomplete +MarkTaskIncompleteAction_Mark_=Mark\ + +NewCategoryAction_A_category_with_this_name_already_exists=A category with this name already exists, please choose another name. +NewCategoryAction_Enter_name=Enter name +NewCategoryAction_Enter_a_name_for_the_Category=Enter a name for the Category\:\ +NewCategoryAction_New_Category=New Category +NewCategoryAction_New_Category_=New Category... +NewCategoryAction_A_query_with_this_name_already_exists=A query with this name already exists, please choose another name. + +NewQueryAction_Add_or_modify_repository_query=Add or modify repository query + +NewSubTaskAction_The_connector_does_not_support_creating_subtasks_for_this_task=The connector does not support creating subtasks for this task +NewSubTaskAction_Could_not_initialize_sub_task_data_for_task_=Could not initialize sub task data for task\:\ +NewSubTaskAction_Could_not_retrieve_task_data_for_task_=Could not retrieve task data for task: +NewSubTaskAction_Create_a_new_subtask=Create a new subtask +NewSubTaskAction_Failed_to_create_new_sub_task_=Failed to create new sub task: +NewSubTaskAction_Subtask=Subtask +NewSubTaskAction_Unable_to_create_subtask=Unable to create subtask + +NewTaskFromSelectionAction_Comment_=Comment\:\ +NewTaskFromSelectionAction____Created_from_Comment___=-- Created from Comment -- +NewTaskFromSelectionAction____Created_from_Task___=-- Created from Task -- +NewTaskFromSelectionAction_New_Task_from_Selection=New Task from Selection +NewTaskFromSelectionAction_Nothing_selected_to_create_task_from=Nothing selected to create task from. +NewTaskFromSelectionAction_URL_=URL\:\ + +OpenRepositoryTask_Could_not_find_matching_repository_task=Could not find matching repository task. +OpenRepositoryTask_Open_Repository_Task=Open Repository Task +OpenRepositoryTask_Open_Task=Open Task + +OpenTaskAction_Open_Task=Open Task +OpenTaskAction_Select_a_task_to_open__=&Select a task to open (? = any character, * = any String)\: + +OpenTaskListElementAction_Open=Open +OpenTaskListElementAction_Open_Task_List_Element=Open Task List Element + +OpenTasksUiPreferencesAction_Preferences_=Preferences... + +OpenWithBrowserAction_Open_with_Browser=Open with Browser + +PresentationDropDownSelectionAction_Task_Presentation=Task Presentation + +QueryCloneAction_Clone_Query=Clone Query +QueryCloneAction_Clone_Query_Failes=Clone Query Failes +QueryCloneAction_No_query_selected=No query selected. +QueryCloneAction_Query_cloning_did_not_succeeded=Query cloning did not succeeded. + +QueryExportAction_Confirm_File_Replace=Confirm File Replace +QueryExportAction_Could_not_export_query_because_specified_location_is_a_folder=Could not export query because specified location is a folder +QueryExportAction_The_file_X_already_exists=The file {0} already exists. Do you want to overwrite it? +QueryExportAction_Query_Export_Error=Query Export Error + +QueryImportAction_The_following_queries_were_imported_successfully=The following queries were imported successfully\:\ +QueryImportAction_Import_Mylyn_Query=Import Mylyn Query +QueryImportAction_Mylyn_Queries=Mylyn Queries +QueryImportAction_These_queries_were_not_imported=These queries were not imported, since their repository was not found\:\ +QueryImportAction_Query_Import_Completed=Query Import Completed +QueryImportAction_Query_Import_Error=Query Import Error +QueryImportAction_The_specified_file_is_not_an_exported_query=The specified file is not an exported query. Please, check that you have provided the correct file. + +RefreshRepositoryTasksAction_Refresh_All_Tasks=Refresh All Tasks + +RemoveFromCategoryAction_Remove_From_Category=Remove From Category + +RenameAction_Rename=Rename + +RestoreTaskListAction_Restore_Tasks_from_History=Restore Tasks from History + +ShowInTaskListAction_Show_In_Task_List=&Show In Task List + +SynchronizeAutomaticallyAction_Synchronize_Automatically=Synchronize Automatically + +SynchronizeEditorAction_Synchronize=Synchronize +SynchronizeEditorAction_Synchronize_Incoming_Changes=Synchronize Incoming Changes + +TaskActivateAction_Activate=Activate + +TaskDeactivateAction_Deactivate=Deactivate +#TaskDeactivateAction.DEACTIVATION_FAILED=Closing task editor on task deactivation failed + +TaskExportAction_already_exists=\ already exists. Do you want to overwrite it? +TaskExportAction_Confirm_File_Replace=Confirm File Replace +TaskExportAction_Could_not_export_task_because_specified_location_is_a_folder=Could not export task because specified location is a folder +TaskExportAction_FILE=The file +TaskExportAction_Task_Export_Error=Task Export Error + +TaskImportAction_Import_Mylyn_Tasks=Import Mylyn Tasks +TaskImportAction_Mylyn_Tasks=Mylyn Tasks +TaskImportAction_The_specified_file_is_not_an_exported_task=The specified file is not an exported task. Please, check that you have provided the correct file. +TaskImportAction_Task_Import_Error=Task Import Error + +TaskListSortAction_Sort_=Sort... + +TaskSelectionDialog__matches=\ matches +TaskSelectionDialog_Deselect_Working_Set=&Deselect Working Set +TaskSelectionDialog_Edit_Active_Working_Set_=&Edit Active Working Set... +TaskSelectionDialog_New_Task_=&New Task... +TaskSelectionDialog_Open_with_Browser=Open with &Browser +TaskSelectionDialog_Scanning_tasks=Scanning tasks +TaskSelectionDialog_Search_for_tasks=Search for tasks +TaskSelectionDialog_Select_Working_Set_=Select &Working Set... +TaskSelectionDialog_Selected_item_is_not_a_task=Selected item is not a task +TaskSelectionDialog_Show_Completed_Tasks=Show &Completed Tasks + +TasksUiPlugin_Task_Repositories=Task Repositories +TaskWorkingSetAction_All=All +TaskWorkingSetAction_Deselect_All=Deselect All +TaskWorkingSetAction_Select_and_Edit_Working_Sets=Select and Edit Working Sets +TaskWorkingSetAction_Sets=Sets + +ToggleAllWorkingSetsAction_Show_All=Show All + +ToggleTaskActivationAction_Activate_Task=Activate Task +ToggleTaskActivationAction_Deactivate_Task=Deactivate Task diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenRepositoryTaskHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenRepositoryTaskHandler.java index 89e1b2086..6334a9d9a 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenRepositoryTaskHandler.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/commands/OpenRepositoryTaskHandler.java @@ -14,7 +14,7 @@ package org.eclipse.mylyn.internal.tasks.ui.commands; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; -import org.eclipse.mylyn.internal.tasks.ui.actions.OpenRepositoryTask; +import org.eclipse.mylyn.internal.tasks.ui.actions.OpenRepositoryTaskAction; /** * @author Steffen Pingel @@ -22,7 +22,7 @@ import org.eclipse.mylyn.internal.tasks.ui.actions.OpenRepositoryTask; public class OpenRepositoryTaskHandler extends AbstractHandler { public Object execute(ExecutionEvent event) throws ExecutionException { - new OpenRepositoryTask().run(null); + new OpenRepositoryTaskAction().run(null); return null; } |