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

Quick-fix import not working #77273

Closed
Slywire opened this issue Jul 12, 2019 · 18 comments
Closed

Quick-fix import not working #77273

Slywire opened this issue Jul 12, 2019 · 18 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) javascript JavaScript support issues

Comments

@Slywire
Copy link

Slywire commented Jul 12, 2019

After my VSCode updated to 1.36, my quick fix to add imports for Java files in a maven project is not working. Not sure if this is in VSCode, or on the Java extension side.
image
The menu pops up, and I can click it, but nothing happens. No import line is added to the top of the file.

VSCode about
Version: 1.36.1 (user setup)
Commit: 2213894
Date: 2019-07-08T22:59:35.033Z
Electron: 4.2.5
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362

@vscodebot vscodebot bot added the javascript JavaScript support issues label Jul 12, 2019
@charliedua
Copy link

Can you please include a list of Extensions (related to java and maven) you are currently using, this could just be the extension malfunctioning with the new release 1.36.1

@Slywire
Copy link
Author

Slywire commented Jul 12, 2019

I have the following extensions installed:
Debugger for Java (vscjava.vscode-java-debug 0.20.0)
Java Dependency Viewer (vscjava.vscode-java-dependency 0.5.1)
Java Extension Pack (vscjava.vscode-java-pack 0.7.1)
Java Test Runner (vscjava.vscode-java-test 0.18.1)
Language Support for Java(TM) by Red Hat (redhat.java 0.46.0)
Lombok Annotations Support for VS Code (gabrielbb.vscode-lombok 0.9.8)
Maven for Java (vscjava.vscode-maven 0.18.0)
Spring Boot Dashboard (vscjava.vscode-spring-boot-dashboard 0.1.5)
Spring Boot Extension Pack (pivotal.vscode-boot-dev-pack 0.0.8)
Spring Boot Tools (pivotal.vscode-spring-boot 1.9.0)
Spring Initializr Java Support (vscjava.vscode-spring-initializr 0.4.5)
Visual Studio IntelliCode (visualstudioexptteam.vscodeintellicode 1.1.7)

I did not realize there were this many additional packages installed.

@Slywire
Copy link
Author

Slywire commented Jul 12, 2019

I have disabled all extensions and reloaded VSCode, but the problem persists.
The only plugin remaining is: Language Support for Java(TM) by Red Hat (redhat.java 0.46.0), which is needed for the quick fix function to pick up the missing package.

@Slywire
Copy link
Author

Slywire commented Jul 12, 2019

Another note, when selecting the lightbulb in the PROBLEMS window and issuing the same instruction, it works perfectly.

@charliedua
Copy link

So I tried to reproduce the issue mentioned here, however in my case everything was working perfect and all the imports were added.

Issue isn't reproducable.
System used in reproducing the issue: 18.04.1-Ubuntu

@Slywire
Copy link
Author

Slywire commented Jul 12, 2019

So I tried to reproduce the issue mentioned here, however in my case everything was working perfect and all the imports were added.

Issue isn't reproducable.
System used in reproducing the issue: 18.04.1-Ubuntu

Thanks for trying on Ubuntu's version. Possibly only on Windows 10?
Seems to only be on the pop-up menu that this is not working. None of the quick fix options do anything.

@charliedua
Copy link

@bpasero can you please add the question label so that vscodebot redirects the user to Stackoverflow.

@mjbvz
Copy link
Contributor

mjbvz commented Jul 12, 2019

How are you triggering quick fixes?

@mjbvz mjbvz added the info-needed Issue requires more information from poster label Jul 12, 2019
@Slywire
Copy link
Author

Slywire commented Jul 14, 2019

Quick fixes triggered by clicking on the lichtbulb icon seem to work 100%, but when hovering over a red squigle, and selecting quick fix from the tooltip that pops up is not working. Pressing ctrl+. and selecting for example the import missing reference works as well. It's just the hover popup that is not responding.

@minamax1994
Copy link

same problem here

@v0l
Copy link

v0l commented Jul 15, 2019

Same issue here, Dart-Code/Dart-Code#1860

@Slywire
Copy link
Author

Slywire commented Jul 15, 2019

Same issue here, Dart-Code/Dart-Code#1860

Definitely seems like the same issue. Thanks. Will be following that thread.

@DanTup
Copy link
Contributor

DanTup commented Jul 15, 2019

@mjbvz I made a test build for @v0l that has some hard-coded fixes:

const title2 = "Jump to line 1";
const action2 = new vs.CodeAction(title2, vs.CodeActionKind.QuickFix);
action2.command = {
	arguments: [{ lineNumber: 0, at: "top" }],
	command: "revealLine",
	title: title2,
};

return [action, action2];

This didn't work either (I can't reproduce it myself though). It seems like the command is never being invoked when the item is clicked.

@DanTup
Copy link
Contributor

DanTup commented Jul 16, 2019

Looks like this came up before, and was expected to be fixed? #76851

@Slywire
Copy link
Author

Slywire commented Jul 17, 2019

Anything else I can do to assist in finding the issue from my side?
Just to summarize the experience:

  • Hover over error and wait for the popup to appear, click Quick Fix, select import xxxx by clicking, does nothing
  • Hover over error and wait for the popup to appear, click Quick Fix, select import xxxx by using arrows and enter keys, does nothing
  • Click on error, press ctrl+. select import xxxx - works and import is added
  • Click on error and wait for light-bulb to appear, click on that and select import xxxx - works and import is added

Seems to be an interface bug as the functionality is still there and working, but it does not seem like clicking on the menu opened by the mouse hover event triggers the functions to execute the quick fix, but rather just closes the frame.

@Slywire
Copy link
Author

Slywire commented Jul 17, 2019

Another update. Installed VS Code on another windows machine, running Windows 7. Same problem, only here, none of the options for quick fix seems to work.

@kcheeeung
Copy link

Quick fixes triggered by clicking on the lichtbulb icon seem to work 100%, but when hovering over a red squigle, and selecting quick fix from the tooltip that pops up is not working. Pressing ctrl+. and selecting for example the import missing reference works as well. It's just the hover popup that is not responding.

Same problem as commented here. Clicking the lightbulb appears to fix, but hovering over a squiggle and clicking on the popup does nothing.
I have the same Java extensions and use Windows 10.
Version: 1.36.1 (user setup)
Commit: 2213894
Date: 2019-07-08T22:59:35.033Z
Electron: 4.2.5
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.17134

@mjbvz
Copy link
Contributor

mjbvz commented Jul 18, 2019

Duplicate of #77018

@mjbvz mjbvz marked this as a duplicate of #77018 Jul 18, 2019
@mjbvz mjbvz closed this as completed Jul 18, 2019
@mjbvz mjbvz added *duplicate Issue identified as a duplicate of another issue(s) and removed info-needed Issue requires more information from poster labels Jul 18, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) javascript JavaScript support issues
Projects
None yet
Development

No branches or pull requests

7 participants