[autocomplete] 37/143: SearchEngine bug fixes for replaceAll() with regex and match case/whole word enabled. Adding tests to SearchEngineTest. Improved perl completion support - error highlighting, etc. Miscellaneous fixes.
Benjamin Mesing
ben at alioth.debian.org
Sat Oct 19 12:53:13 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 83d1890018d800681496eac890e7c88c5e6f5707
Author: bobbylight <robert at fifesoft.com>
Date: Thu May 13 03:24:59 2010 +0000
SearchEngine bug fixes for replaceAll() with regex and match case/whole word enabled.
Adding tests to SearchEngineTest.
Improved perl completion support - error highlighting, etc.
Miscellaneous fixes.
---
src/org/fife/ui/autocomplete/CompletionCellRenderer.java | 12 ++++++++++--
src/org/fife/ui/autocomplete/CompletionXMLParser.java | 9 +++++++--
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/src/org/fife/ui/autocomplete/CompletionCellRenderer.java b/src/org/fife/ui/autocomplete/CompletionCellRenderer.java
index 0ed3bc8..61a4345 100644
--- a/src/org/fife/ui/autocomplete/CompletionCellRenderer.java
+++ b/src/org/fife/ui/autocomplete/CompletionCellRenderer.java
@@ -234,7 +234,11 @@ this.realBG = altBG!=null && (index&1)==0 ? altBG : list.getBackground();
StringBuffer sb = new StringBuffer(PREFIX);
sb.append(fc.getName());
- sb.append(fc.getProvider().getParameterListStart());
+ char paramListStart = fc.getProvider().getParameterListStart();
+ if (paramListStart!=0) { // 0 => no start char
+ sb.append(paramListStart);
+ }
+
int paramCount = fc.getParamCount();
for (int i=0; i<paramCount; i++) {
FunctionCompletion.Parameter param = fc.getParam(i);
@@ -259,7 +263,11 @@ this.realBG = altBG!=null && (index&1)==0 ? altBG : list.getBackground();
sb.append(fc.getProvider().getParameterListSeparator());
}
}
- sb.append(fc.getProvider().getParameterListEnd());
+
+ char paramListEnd = fc.getProvider().getParameterListEnd();
+ if (paramListEnd!=0) { // 0 => No parameter list end char
+ sb.append(paramListEnd);
+ }
if (getShowTypes() && fc.getType()!=null) {
sb.append(" : ");
diff --git a/src/org/fife/ui/autocomplete/CompletionXMLParser.java b/src/org/fife/ui/autocomplete/CompletionXMLParser.java
index 226d4da..3451c1d 100644
--- a/src/org/fife/ui/autocomplete/CompletionXMLParser.java
+++ b/src/org/fife/ui/autocomplete/CompletionXMLParser.java
@@ -298,6 +298,11 @@ public class CompletionXMLParser extends DefaultHandler {
}
+ private static final char getSingleChar(String str) {
+ return str.length()==1 ? str.charAt(0) : 0;
+ }
+
+
/**
* Resets this parser to grab more completions.
*
@@ -355,8 +360,8 @@ public class CompletionXMLParser extends DefaultHandler {
}
}
else if ("environment".equals(qName)) {
- paramStartChar = attrs.getValue("paramStartChar").charAt(0);
- paramEndChar = attrs.getValue("paramEndChar").charAt(0);
+ paramStartChar = getSingleChar(attrs.getValue("paramStartChar"));
+ paramEndChar = getSingleChar(attrs.getValue("paramEndChar"));
paramSeparator = attrs.getValue("paramSeparator");
//paramTerminal = attrs.getValua("terminal");
}
--
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