vscode-java icon indicating copy to clipboard operation
vscode-java copied to clipboard

No quick actions available when targetting class name in ctor invocation

Open Nightenom opened this issue 3 years ago • 4 comments

Given a short (static/nonstatic, probably visibility independent) method with just return statement and ctor call there are no quick actions available. Log is empty - no stacktraces nor errors. High reproducibility (will try to provide 100% repro case if this is not enough) image

Current Result

Only lower method has quick actions.

Expected Result

Both methods have quick actions.

Environment
  • Operating System: Windows_NT x64 10.0.19044
  • JDK version: OpenJDK Temurin-17.0.2+8 (build 17.0.2+8)
  • Visual Studio Code version: 1.68.1
  • Java extension version: 1.7.0

Nightenom avatar Jun 25 '22 14:06 Nightenom

Also another thing which seems heavily related, might be even the same bug.

Working states: Targeting method: image Targeting whole statement using text selection: image Targeting the "new" keyword: image

Broken state: Targeting the the class name: image

Nightenom avatar Jun 25 '22 14:06 Nightenom

@CsCherrYY You can test it with File f = new File(new String());, and try to peek code actions when the cursor is in new or in String

jdneo avatar Jun 27 '22 01:06 jdneo