Bug 542439 - Discrepancy in quickfix in equivalent scenario in java 11
Summary: Discrepancy in quickfix in equivalent scenario in java 11
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.10   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-05 11:12 EST by Vikas Chandra CLA
Modified: 2023-01-09 15:48 EST (History)
2 users (show)

See Also:


Attachments
See image (117.19 KB, image/jpeg)
2018-12-05 11:12 EST, Vikas Chandra CLA
no flags Details
attached project (4.19 KB, application/octet-stream)
2018-12-05 11:13 EST, Vikas Chandra CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vikas Chandra CLA 2018-12-05 11:12:24 EST
Created attachment 276833 [details]
See image

See image attached.

With 2 equivalent selection before pressing Control+1, I get different results.
Comment 1 Vikas Chandra CLA 2018-12-05 11:13:32 EST
Created attachment 276834 [details]
attached project

You can use this project.( open class VarLambda)
Comment 2 Noopur Gupta CLA 2018-12-06 04:58:33 EST
Selecting with space returns the LambdaExpression node whereas selecting without the space return the SingleVariableDeclaration node. You can see this in the AST View. Moving to JDT Core.
Comment 3 Stephan Herrmann CLA 2018-12-06 08:26:43 EST
(In reply to Noopur Gupta from comment #2)
> Selecting with space returns the LambdaExpression node whereas selecting
> without the space return the SingleVariableDeclaration node. You can see
> this in the AST View. Moving to JDT Core.

This sounds reasonable to me. We always report the smallest *enclosing* node, right? The space is outside the SingleVariableDeclaration, so the SingleVariableDeclaration is no longer enclosing the selection.

Any reasons why / how we should change this?
Comment 4 Eclipse Genie CLA 2020-11-30 05:29:38 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Eclipse Genie CLA 2023-01-09 15:48:55 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.