Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CommitCommentArea.java12
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) {

Back to the top