[autocomplete] 50/143: Make AutoCompletion#insertCompletion() protected.

Benjamin Mesing ben at alioth.debian.org
Sat Oct 19 12:53:16 UTC 2013


This is an automated email from the git hooks/post-receive script.

ben pushed a commit to branch master
in repository autocomplete.

commit 376543890e998fd9037ddb3fa7e26ffd28f11aff
Author: bobbylight <robert at fifesoft.com>
Date:   Mon Aug 9 02:55:32 2010 +0000

    Make AutoCompletion#insertCompletion() protected.
---
 src/org/fife/ui/autocomplete/AutoCompletion.java |   18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/src/org/fife/ui/autocomplete/AutoCompletion.java b/src/org/fife/ui/autocomplete/AutoCompletion.java
index f9948f9..c0d58c7 100644
--- a/src/org/fife/ui/autocomplete/AutoCompletion.java
+++ b/src/org/fife/ui/autocomplete/AutoCompletion.java
@@ -418,7 +418,7 @@ public class AutoCompletion {
 
 
 	/**
-	 * Returns the text component for which autocompletion is enabled.
+	 * Returns the text component for which auto-completion is enabled.
 	 *
 	 * @return The text component, or <code>null</code> if this
 	 *         {@link AutoCompletion} is not installed on any text component.
@@ -519,7 +519,7 @@ public class AutoCompletion {
 	 *
 	 * @param c A completion to insert.  This cannot be <code>null</code>.
 	 */
-	void insertCompletion(Completion c) {
+	protected void insertCompletion(Completion c) {
 
 		JTextComponent textComp = getTextComponent();
 		String alreadyEntered = c.getAlreadyEntered(textComp);
@@ -535,18 +535,6 @@ public class AutoCompletion {
 		caret.setDot(start);
 		caret.moveDot(dot);
 		textComp.replaceSelection(replacement);
-		/*
-		Document doc = textComp.getDocument();
-try {
-		if (doc instanceof AbstractDocument) {
-			((AbstractDocument)doc).replace(start, len, replacement, null);
-		}
-		else {
-			doc.remove(start, len);
-			doc.insertString(start, replacement, null);
-		}
-} catch (javax.swing.text.BadLocationException ble) { ble.printStackTrace(); }
-*/
 
 		if (isParameterAssistanceEnabled() &&
 				(c instanceof ParameterizedCompletion)) {
@@ -558,7 +546,7 @@ try {
 
 
 	/**
-	 * Installs this autocompletion on a text component.  If this
+	 * Installs this auto-completion on a text component.  If this
 	 * {@link AutoCompletion} is already installed on another text component,
 	 * it is uninstalled first.
 	 *

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/autocomplete.git



More information about the pkg-java-commits mailing list