question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possibility to restrict "Show method parameter names" to primitives

See original GitHub issue

I’d like to have a possiblity to restrict “Show method parameter names” in a way that the names are only displayed on primitives (boolean,int,long…) and strings.

I think mostly by passing complex objects one can derive their meaning from the type. Assume the following editor-view:

File dir = new File(pathname: "/tmp/test/");
doSomething(directory: dir, create: true);

The “directory:” parameter-name does not provide any useful additional information but uses a lot of space. With the suggested feature enabled it would look like:

File dir = new File(pathname: "/tmp/test/");
doSomething(dir, create: true);

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
angelozerrcommented, Jul 5, 2018

@nuessgens @vogella please reinstall JDT CodeMining, now you have a new preference Show parameter only for literal which is enabled by default. Here a little demo:

showparameteronlyforliteral

I have enabled by default, because I agree with @gayanper comment https://github.com/angelozerr/jdt-codemining/issues/53#issuecomment-402507576

0reactions
angelozerrcommented, Jul 23, 2018

Thanks for your feedback @nuessgens

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to restrict class-scoped type parameter to primitive ...
You cannot do that with type parameters; if they do allow to have multiple bounds (as in T extends A & B etc),...
Read more >
Don't show parameter name if variable name is the same than ...
Alternative idea: Only show the parameter name if the passed in value is a literal or the method takes multiple parameters of the...
Read more >
Java method - parameters, hiding, overriding - ZetCode
Java method tutorial covers methods - reusable blocks of code in Java. We talk about method parameters, hiding and overriding method.
Read more >
Viewing method parameter information | WebStorm ... - JetBrains
Open the Settings/Preferences dialog ( Ctrl+Alt+S ) and go to Editor | Inlay Hints. Expand <required language> under Parameter names.
Read more >
Writing Classes and Javadoc
Generally, We call a method by writing its name, followed in parentheses by its arguments (one for each parameter in the method's header)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found