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

The similar options 'Create xxx' in code actions show in different place #2940

Closed
v-yuyul opened this issue Feb 16, 2023 · 1 comment · Fixed by eclipse-jdtls/eclipse.jdt.ls#2551

Comments

@v-yuyul
Copy link

v-yuyul commented Feb 16, 2023

Environment
  • Operating System: Mac
  • JDK version: 17.0.6
  • Visual Studio Code version: 1.75.1
  • Java extension version: 1.15.0
Steps To Reproduce
  1. Open a java project, like https://github.com/redhat-developer/vscode-java/tree/master/test/resources/projects/eclipse/simple-app
  2. Type the code File f = new File("demo.txt"); in a main method > Code Actions

image

Current Result

The similar options 'Create xxx' show in different place.

Expected Result

It's better to put all the 'Create xxx' options together.

@rgrunber
Copy link
Member

Just as an additional note, I found that similar issue through a different code action at https://github.com/eclipse/eclipse.jdt.ls/blob/31ebe0280a4d96c46f46245b8acbcd456b4f258a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corrections/proposals/UnresolvedElementsSubProcessor.java#L243-L247 .

This happens through https://github.com/eclipse/eclipse.jdt.ls/blob/31ebe0280a4d96c46f46245b8acbcd456b4f258a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corrections/QuickFixProcessor.java#L156 . (as opposed to through UndefinedType).

image

the actions that create separate source files seem intermixed with those that only create elements in the existing source file.

@rgrunber rgrunber added this to the Early April 2023 milestone Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants