diff options
author | Steffen Pingel | 2012-07-18 11:06:01 +0000 |
---|---|---|
committer | Steffen Pingel | 2012-07-18 11:06:01 +0000 |
commit | 34aeb873ba5c0a230341dbcabdcedf6cc8cee9ea (patch) | |
tree | f3e6d2c3440298da038465213c07b0e378bd92d5 | |
parent | 8656df7283f3a48a0dd7bab06c4b2cfb969df572 (diff) | |
download | org.eclipse.mylyn.tasks-34aeb873ba5c0a230341dbcabdcedf6cc8cee9ea.tar.gz org.eclipse.mylyn.tasks-34aeb873ba5c0a230341dbcabdcedf6cc8cee9ea.tar.xz org.eclipse.mylyn.tasks-34aeb873ba5c0a230341dbcabdcedf6cc8cee9ea.zip |
NEW - bug 382415: AbstractTaskEditorPart should escape partname
https://bugs.eclipse.org/bugs/show_bug.cgi?id=382415
Change-Id: Iac4074846502b3d5f24788ad983ffe3b67b435f7
2 files changed, 7 insertions, 5 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java index 8d0cc7d04..bbc8b2a4a 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java @@ -24,6 +24,7 @@ import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.LegacyActionTools; import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.action.ToolBarManager; import org.eclipse.jface.layout.GridDataFactory; @@ -268,7 +269,7 @@ public class TaskEditorAttachmentPart extends AbstractTaskEditorPart { initialize(); section = createSection(parent, toolkit, hasIncoming); - section.setText(getPartName() + " (" + attachmentAttributes.size() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ + updateSectionTitle(); if (hasIncoming) { expandSection(toolkit, section); } else { @@ -376,10 +377,10 @@ public class TaskEditorAttachmentPart extends AbstractTaskEditorPart { private void updateSectionTitle() { if (tableFilter.isFilterDeprecatedEnabled()) { section.setText(NLS.bind(Messages.TaskEditorAttachmentPart_Attachment_Section_Title_X_of_Y, new Object[] { - getPartName(), nonDeprecatedCount, attachmentAttributes.size() })); + LegacyActionTools.escapeMnemonics(getPartName()), nonDeprecatedCount, attachmentAttributes.size() })); } else { - section.setText(NLS.bind(Messages.TaskEditorAttachmentPart_Attachment_Section_Title_X, getPartName(), - attachmentAttributes.size())); + section.setText(NLS.bind(Messages.TaskEditorAttachmentPart_Attachment_Section_Title_X, + LegacyActionTools.escapeMnemonics(getPartName()), attachmentAttributes.size())); } } diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPart.java index 48053afa8..b1c45ba8e 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPart.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPart.java @@ -12,6 +12,7 @@ package org.eclipse.mylyn.tasks.ui.editors; import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.LegacyActionTools; import org.eclipse.jface.action.ToolBarManager; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.jface.viewers.ISelection; @@ -79,7 +80,7 @@ public abstract class AbstractTaskEditorPart extends AbstractFormPart { protected Section createSection(Composite parent, FormToolkit toolkit, int style) { Section section = toolkit.createSection(parent, style); - section.setText(getPartName()); + section.setText(LegacyActionTools.escapeMnemonics(getPartName())); return section; } |