Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 131136 - Unindent when pasting a comment line
Summary: Unindent when pasting a comment line
Status: RESOLVED DUPLICATE of bug 65841
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.1.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-09 12:28 EST by cdtogea CLA
Modified: 2006-03-13 09:15 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cdtogea CLA 2006-03-09 12:28:42 EST
I want to paste a comment line inside a loop of some kind. Consider this scenario:

class A {
    ...
    private void method1() {
        ...
        while (...) {
            <do-something>
        }
    }

    private void method2() {
        ...
        while (...) {
            // a comment
            <do-something>
        }
    }
}

What I want to do is to copy the comment line from method2 into method1 as well
so I mark the comment and do a Ctrl+C. Note that I marke only this text "// a comment", that is no white-space before or after the comment. I place the cursor at the write place inside method1 and do a Ctrl+C. I expect this:

    private void method1() {
        // a comment
        ...
        while (...) {
            <do-something>
        }
    }

but I get this:

    private void method1() {
//      a comment
        ...
        while (...) {
            <do-something>
        }
    }

It's very annoying.
Comment 1 Dani Megert CLA 2006-03-13 09:15:42 EST

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