From: Eric M. L. <er...@si...> - 2007-07-04 21:22:05
|
Hi Klaus (& rest) When this first came up, I was surprised it was not an overloadable function. I haven't taken an action on this item yet because there is a behavior funneling problem here where lots of format functions call this one routine, but each upper level function expects (by way of what it is supposed to do) something slightly different. Something just like the below implementation could be the end result, but I suspect it might be better to have the below routine return a list of tags, which forces non-tags into the tag format. Once that is done, then the upper level format routine could call itself, or a routine of it's choosing on those tags, knowing that said routine won't blow up on the random stuff that might be in the a argument list. Or, as you suggest, an override method and languages that don't support tags as arguments must override it. Or... I dunno. It's an interesting problem though. Thanks Eric >>> <kla...@sd...> seems to think that: >Currently not, because all formating stuff is done by semantic.... See here for possible format-functions: >`semantic-format-tag-functions' and >how to customize ECB for this: option `ecb-tag-display-function' > >But the same topic has been discussed some weeks ago in the cedet-list.... someone has posted the following function: > >(defun semantic--format-tag-arguments (args formatter color) > "Format the argument list ARGS with FORMATTER. >FORMATTER is a function used to format a tag. >COLOR specifies if color should be used." > (let ((out nil)) > (while args > (push (if (semantic-tag-p (car args)) > (unless (equal (semantic-tag-type (car args)) "void") > (semantic-format-tag-prototype (car args) nil color)) > (semantic-format-tag-name-from-anything (car args) nil color > 'variable)) > out) > (setq args (cdr args))) > (mapconcat 'identity (nreverse out) semantic-function-argument-separator) > )) > >which is a replacement of the original function `semantic--format-tag-arguments'... I have tested it - seems to work... > >Just store this function somewhere in your .emacs AFTER(!!) loading cedet... then this will overload the original function-def of cedet... > >@Eric: would it not better, if semantic--format-tag-arguments would be overloadable by the overload-mechanism of cedet?? > >Ciao, >Klaus > >Chris Britton wrote: >> Is there any way to display parameter types in the methods buffer >> instead of the parameter names? That is, display >> >> myMethod(String, Integer) : boolean >> >> instead of >> >> myMethod(name, age) : boolean >> >> Thanks. > -- Eric Ludlam: za...@gn..., er...@si... Home: http://www.ludlam.net Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net GNU: www.gnu.org |