summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-07-18 07:06:01 (EDT)
committerSteffen Pingel2012-07-20 06:59:32 (EDT)
commit5da36345c09d30ed4e51f3e6ac7cbf09dd0c0dcf (patch)
treef569f7b51376240f32d8f807cc76f4384428b0f4
parent802ae56db328d8adb4c1c1c77f2003d81bbf27fe (diff)
downloadorg.eclipse.mylyn.tasks-5da36345c09d30ed4e51f3e6ac7cbf09dd0c0dcf.zip
org.eclipse.mylyn.tasks-5da36345c09d30ed4e51f3e6ac7cbf09dd0c0dcf.tar.gz
org.eclipse.mylyn.tasks-5da36345c09d30ed4e51f3e6ac7cbf09dd0c0dcf.tar.bz2
NEW - bug 382415: AbstractTaskEditorPart should escape partname
https://bugs.eclipse.org/bugs/show_bug.cgi?id=382415 Change-Id: Iac4074846502b3d5f24788ad983ffe3b67b435f7
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java9
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPart.java3
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 8d0cc7d..bbc8b2a 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 48053af..b1c45ba 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;
}