Bug 574609 - [content assist] Template modifies text incorrectly
Summary: [content assist] Template modifies text incorrectly
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.20   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-02 00:10 EDT by Luke Hutchison CLA
Modified: 2023-06-23 11:59 EDT (History)
1 user (show)

See Also:


Attachments
Recording of the problem (455.64 KB, video/mp4)
2021-07-02 00:10 EDT, Luke Hutchison CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Hutchison CLA 2021-07-02 00:10:11 EDT
Created attachment 286713 [details]
Recording of the problem

Code before:

        {
            var jsonGenerator = new JSONGenerator();
            for (int i = 0; i < numIter; i++) {
                var json = jsonGenerator.generateJSON(maxDepth);
                timeSquirrel += BenchmarkJSONParsing.benchmarkSquirrel_JSON(json);
            }
        }


Insert new line before "timeSquirrel += ..."

type "syso"; Hit Ctrl + Space; select "System.out.println"

This affects the previous line, and the editing is incorrect:

        {
            var jsonGenerator = new JSONGenerator();
            for (int i = 0; i < numIter; i++) {
                var json = System.out.println(jsonGenerator.generateJSON(maxDepth);
               );
                timeSquirrel += BenchmarkJSONParsing.benchmarkSquirrel_JSON(json);
            }
        }

I reset all the code assistance settings to default; no effect.

Version: 2021-09 (4.21)
Build id: I20210625-1800
Comment 1 Eclipse Genie CLA 2023-06-23 11:59:27 EDT
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.