This is an automated email from the git hooks/post-receive script. ben pushed a commit to branch master in repository autocomplete.
commit 5c629e160d984a429f62ec739d546f5cdc7597f6 Author: bobbylight <[email protected]> Date: Fri Jan 21 04:47:41 2011 +0000 RSTALanguageSupport: Major work towards generics completion support! May still be super buggy. --- .../ParameterizedCompletionDescriptionToolTip.java | 31 +++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/org/fife/ui/autocomplete/ParameterizedCompletionDescriptionToolTip.java b/src/org/fife/ui/autocomplete/ParameterizedCompletionDescriptionToolTip.java index 61f4534..d795b76 100644 --- a/src/org/fife/ui/autocomplete/ParameterizedCompletionDescriptionToolTip.java +++ b/src/org/fife/ui/autocomplete/ParameterizedCompletionDescriptionToolTip.java @@ -696,16 +696,45 @@ class ParameterizedCompletionDescriptionToolTip { StringBuffer sb = new StringBuffer("<html>"); int paramCount = pc.getParamCount(); for (int i=0; i<paramCount; i++) { + if (i==selectedParam) { sb.append("<b>"); } - sb.append(pc.getParam(i).toString()); + + // Some parameter types may have chars in them unfriendly to HTML + // (such as type parameters in Java). We need to take care to + // escape these. + String temp = pc.getParam(i).toString(); + int lt = temp.indexOf('<'); + if (lt>-1) { + sb.append(temp.substring(0, lt)); + sb.append("<"); + for (int j=lt+1; j<temp.length(); j++) { + char ch = temp.charAt(j); + switch (ch) { + case '<': + sb.append("<"); + break; + case '>': + sb.append(">"); + break; + default: + sb.append(ch); + break; + } + } + } + else { + sb.append(temp); + } + if (i==selectedParam) { sb.append("</b>"); } if (i<paramCount-1) { sb.append(pc.getProvider().getParameterListSeparator()); } + } if (selectedParam>=0 && selectedParam<paramCount) { -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/autocomplete.git _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

