diff options
author | Tomasz Zarna | 2011-01-10 12:00:53 +0000 |
---|---|---|
committer | Tomasz Zarna | 2011-01-10 12:00:53 +0000 |
commit | d4b8fc4685ecb5438f8fd0a3da9c152ae77de4a5 (patch) | |
tree | 1edc4b882d24a48ae62ec2b376f73a813d097c87 | |
parent | a2f709414c0ad5d447974868bf1318d0bcadac37 (diff) | |
download | eclipse.platform.team-d4b8fc4685ecb5438f8fd0a3da9c152ae77de4a5.tar.gz eclipse.platform.team-d4b8fc4685ecb5438f8fd0a3da9c152ae77de4a5.tar.xz eclipse.platform.team-d4b8fc4685ecb5438f8fd0a3da9c152ae77de4a5.zip |
bug 333812: CVS Commit dialog uses wrong comment after spelling quick fix
-rw-r--r-- | bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java index 2f44962fa..e13ffd5ec 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2011 IBM Corporation 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 @@ -221,6 +221,13 @@ public class CommitCommentArea extends DialogArea { // Hyperlink coloring to work. (Presenter needs document object up front) sourceViewer.configure(new TextSourceViewerConfiguration(EditorsUI.getPreferenceStore())); sourceViewer.setDocument(document, annotationModel); + document.addDocumentListener(new IDocumentListener() { + public void documentAboutToBeChanged(DocumentEvent event) { + } + public void documentChanged(DocumentEvent event) { + modifyText(null); + } + }); fTextField.addTraverseListener(this); fTextField.addModifyListener(this); @@ -272,7 +279,8 @@ public class CommitCommentArea extends DialogArea { public void modifyText(ModifyEvent e) { final String old = fText; fText = fTextField.getText(); - firePropertyChangeChange(COMMENT_MODIFIED, old, fText); + if (!fText.equals(old)) + firePropertyChangeChange(COMMENT_MODIFIED, old, fText); } public void keyTraversed(TraverseEvent e) { |