java - Eclipse-generated method parameters having unreasonable names -


i running in problem when use eclipse function add/generate methods of interface want implement parameter names of these methods "too generic".

so, if string parameter named paramstring, if int called paramint , forth - instead of being called expresses parameters' semantics.

for instance, implementing javax.portlet.portletsession interface (part of jsr 286 spec.; need custom implementation).

methods carry parameters these:

public void setattribute(string paramstring, object paramobject) public void setattribute(string paramstring, object paramobject, int paramint) 

what have sth this:

public void setattribute(string key, object value) public void setattribute(string key, object value, int scope) 

sometimes generation of methods works way want, sometimes, time, doesn't. assume has way import library holding interface want implement, maybe can explain behavior in bit more detail?

maybe can give explaination along concrete example: how have import jsr 286 spec, how generate methods want?

thank much!

simply rename parameters yourself. suspect parameter names generated based on information eclipse has work - if parameter name isn't present in jar file, can't provide it. if there's debug version of portlet jar file, or if can tell eclipse javadoc is, might help... ultimately, it's simple enough rename them manually, of time.

just test, suspect if declare variable of type portletsession , try use auto-complete, this:

portletsession session = null; // doesn't matter session.set <hit ctrl-space here> 

my guess won't include parameter names in auto-complete... whereas in situations auto-implement works, will. it's how information eclipse has work with.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -