Bug 574609

Summary: [content assist] Template modifies text incorrectly
Product: [Eclipse Project] JDT Reporter: Luke Hutchison <luke.hutch>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: kalyan_prasad
Version: 4.20   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug
Attachments:
Description Flags
Recording of the problem none

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.