Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2011-07-28 16:11:54 -0400
committerSteffen Pingel2011-07-28 16:11:54 -0400
commit4e53919957b4067f5e356b9baa40a3f71df635ba (patch)
tree055502dad40c05a3262b83d177dfb7a80fe079af
parent1e29fc4431a1110fba182926c7080bc887ae978a (diff)
downloadorg.eclipse.mylyn.tasks-4e53919957b4067f5e356b9baa40a3f71df635ba.tar.gz
org.eclipse.mylyn.tasks-4e53919957b4067f5e356b9baa40a3f71df635ba.tar.xz
org.eclipse.mylyn.tasks-4e53919957b4067f5e356b9baa40a3f71df635ba.zip
NEW - bug 350561: [editor] text appears backwards when using large text
box https://bugs.eclipse.org/bugs/show_bug.cgi?id=350561 Conflicts: org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor.java
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor.java23
1 files changed, 19 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor.java
index 2210a5cbc..724052024 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor.java
@@ -36,6 +36,10 @@ public class LongTextAttributeEditor extends AbstractAttributeEditor {
private SourceViewer viewer;
+ boolean ignoreNotification;
+
+ boolean suppressRefresh;
+
public LongTextAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute) {
super(manager, taskAttribute);
setLayoutHint(new LayoutHint(RowSpan.MULTIPLE, ColumnSpan.MULTIPLE));
@@ -66,8 +70,13 @@ public class LongTextAttributeEditor extends AbstractAttributeEditor {
text.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TREE_BORDER);
text.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- setValue(text.getText());
- CommonFormUtil.ensureVisible(text);
+ try {
+ suppressRefresh = true;
+ setValue(text.getText());
+ CommonFormUtil.ensureVisible(text);
+ } finally {
+ suppressRefresh = false;
+ }
}
});
}
@@ -87,12 +96,18 @@ public class LongTextAttributeEditor extends AbstractAttributeEditor {
@Override
public void refresh() {
if (viewer.getTextWidget() != null && !viewer.getTextWidget().isDisposed()) {
- viewer.getDocument().set(getValue());
+ try {
+ ignoreNotification = true;
+ viewer.getDocument().set(getValue());
+ } finally {
+ ignoreNotification = false;
+ }
}
}
@Override
public boolean shouldAutoRefresh() {
- return true;
+ return !suppressRefresh;
}
+
}

Back to the top