Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[code mining] Extra spaces when showing method parameter name hints #1797

Open
JanecekPetr opened this issue Nov 13, 2024 · 5 comments
Open
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@JanecekPetr
Copy link

JanecekPetr commented Nov 13, 2024

A fresh workspace, a fresh installation of Eclipse for Java,

Version: 2024-09 (4.33.0)
Build id: 20240905-0614
Eclipse Java Development Tools: 3.19.600.v20240903-0240

Parameter name hints enabled:
{F146FF7C-2D84-4292-B1FA-6262628D1C30}

There are two extra spaces after the parameter name:
{9D91F000-D0E1-4675-9A69-CE708299BECF}

I have no idea where the extra spaces are coming from as the code itself seems to only add one:

Windows 11 in Czech locale, Java 23

@jukzi jukzi added bug Something isn't working good first issue Good for newcomers labels Nov 13, 2024
@jukzi
Copy link
Contributor

jukzi commented Nov 13, 2024

Feel free to propose a fix.

@jannisCode
Copy link
Contributor

jannisCode commented Nov 25, 2024

@JanecekPetr I am currently trying to replicate your findings, but even when using the exact version, build id etc, i can´t seem to get your results. Is it possible for you to show me more details about the code you wrote and the settings?
When I try it it looks like this:
image
(the settings are also just like yours)

@JanecekPetr
Copy link
Author

JanecekPetr commented Nov 25, 2024

The code is really minimal,

public class Playground {
    public static void main(String... args) {
        Car car = new Car(5);
    }
}

record Car(int size) {}

the point really was to just show any parameter name hint, as all of them behave the same. If you can get any parameter hint anywhere, that should get the same result.

{434D80F7-C5FA-4AAB-B892-B35C160436CA}

and here's the whole Code mining page:
{AE3E861D-25DB-49BB-9D50-A07AFDF649E7}

This is on my regular every-day instance and my regular workspace, but I could do it with a fresh installation and a fresh workspace again, too, if you wanted. The only configuration change I did was to enable code minings and parameter hints.

@jannisCode
Copy link
Contributor

jannisCode commented Nov 25, 2024

@JanecekPetr Thank you for the quick answer! After testing and looking at the code, i found out that there is some weird behavior going on when checking if the method parameter name should be displayed. (Thats a different issue though)
Anyways, on my machine, with the same eclipse (newly installed) it works just fine. Maybe try reinstalling it, and if it still does not work I can take a closer look at it.
image

@JanecekPetr
Copy link
Author

JanecekPetr commented Nov 27, 2024

Okay, I tried another computer, the problem goes away. Interesting.

I tried ruling out a DPI issue (unplugged my monitors, restarted eclipse), the issue remained. I tried switching to a different font, the issue remained. I have absolutely no idea what else this particular machines has that the others don't. If you have any guesses or things for me to try, fire away!

If I ever find it, I'll report back. Until then I think it's safe to close this as unreproducable, or freeze it until someone else comes here with more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants