From: Chris B. <br...@te...> - 2007-06-27 15:19:00
|
Excellent! Just what I was looking for. I made a slight change so that only the type of the argument is displayed. Not the name of the argument or any type modifiers. Here's my modified code: (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-tag-type (car args))) (semantic-format-tag-name-from-anything (car args) nil color 'variable)) out) (setq args (cdr args))) (mapconcat 'identity (nreverse out) semantic-function-argument-separator) )) Thanks again. -- Chris Britton br...@te... -----Original Message----- From: kla...@sd... [mailto:kla...@sd...] Sent: Wednesday, June 27, 2007 8:54 AM To: br...@te...; ecb...@li... Cc: ced...@li...; er...@si... Subject: RE: [ECB-list] Display Parameter Types in Methods Buffer 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. |