git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [EGIT PATCH] Make SHA-1 selectable using double-click in the commit message viewer.
@ 2009-01-10 17:20 Robin Rosenberg
  0 siblings, 0 replies; only message in thread
From: Robin Rosenberg @ 2009-01-10 17:20 UTC (permalink / raw)
  To: spearce; +Cc: git, Robin Rosenberg

The default behaviour does not consider a sequence of numbers and letters
to be a word. Installing the DefaultTextDoubleClickStrategy and activating
"plugins" in the textviewer solves the problem.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../ui/internal/history/CommitMessageViewer.java   |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/CommitMessageViewer.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/CommitMessageViewer.java
index 76d57bd..d21555c 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/CommitMessageViewer.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/CommitMessageViewer.java
@@ -15,7 +15,9 @@
 import java.util.regex.Pattern;
 
 import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.jface.text.DefaultTextDoubleClickStrategy;
 import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
 import org.eclipse.jface.text.TextViewer;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.StyleRange;
@@ -98,6 +100,9 @@ public void mouseDown(final MouseEvent e) {
 				}
 			}
 		});
+		setTextDoubleClickStrategy(new DefaultTextDoubleClickStrategy(),
+				IDocument.DEFAULT_CONTENT_TYPE);
+		activatePlugins();
 	}
 
 	void addCommitNavigationListener(final CommitNavigationListener l) {
-- 
1.6.1.rc3.56.gd0306

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-10 17:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-10 17:20 [EGIT PATCH] Make SHA-1 selectable using double-click in the commit message viewer Robin Rosenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).