You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No quick actions available when targetting class name in ctor invocation #2531
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)
changed the title [-]No quick actions available for certain method types[/-][+]No quick actions available when targetting class name in ctor invocation[/+]on Jun 25, 2022
Activity
[-]No quick actions available for certain method types[/-][+]No quick actions available when targetting class name in ctor invocation[/+]Nightenom commentedon Jun 25, 2022
Also another thing which seems heavily related, might be even the same bug.
Working states:



Targeting method:
Targeting whole statement using text selection:
Targeting the "new" keyword:
Broken state:

Targeting the the class name:
jdneo commentedon Jun 27, 2022
@CsCherrYY You can test it with
File f = new File(new String());, and try to peek code actions when the cursor is innewor inStringNightenom commentedon May 26, 2024
This is still an issue after 2 yrs
rgrunber commentedon Aug 22, 2024
I think the issue is with the
ExtractTempRefactoringAPI in JDT. It relies on the selection being an expression and it seems to fail to retrieve it under certain circumstances : https://github.com/eclipse-jdt/eclipse.jdt.ui/blob/b83ffe1bbcad393d4e35874d1ecc6af59f90874f/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractTempRefactoring.java#L1058-L1063 .