Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335085

Summary: [typing] Copy/paste of comment lines removes leading space
Product: [Eclipse Project] JDT Reporter: Mark Sederqvist <ms>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: minor    
Priority: P3 CC: deepakazad
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

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 ***