From: Robin Rosenberg <robin.rosenberg@dewire.com>
To: spearce@spearce.org
Cc: git@vger.kernel.org, Robin Rosenberg <robin.rosenberg@dewire.com>
Subject: [EGIT PATCH] Make SHA-1 selectable using double-click in the commit message viewer.
Date: Sat, 10 Jan 2009 18:20:53 +0100 [thread overview]
Message-ID: <1231608053-25866-1-git-send-email-robin.rosenberg@dewire.com> (raw)
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
reply other threads:[~2009-01-10 17:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1231608053-25866-1-git-send-email-robin.rosenberg@dewire.com \
--to=robin.rosenberg@dewire.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).