Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335085 - [typing] Copy/paste of comment lines removes leading space
Summary: [typing] Copy/paste of comment lines removes leading space
Status: CLOSED DUPLICATE of bug 332737
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-22 05:14 EST by Mark Sederqvist CLA
Modified: 2011-01-22 06:47 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Sederqvist CLA 2011-01-22 05:14:46 EST
Build Identifier: 20100917-0705

In the Java code editor, when copy/pasting a comment line which has a leading space (e.g. "// My comment") then the paste operation strips the leading space (so what is inserted is f.ex. "//My comment").

This only seems to happen with comments that are outside the class definition, f.ex. between the import statements and the class declaration. The problem has existed since at least Eclipse 3.4.

Reproducible: Always

Steps to Reproduce:
1. Create a new class
2. Create a comment before the class definition (public class ...), which has a leading space (f.ex. "// My comment")
3.Copy and then paste the comment anywhere before the class definition, f.ex. in the same location. The leading space will be removed.
Comment 1 Deepak Azad CLA 2011-01-22 06:47:58 EST

*** This bug has been marked as a duplicate of bug 332737 ***