Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 145937 - Code paste suppresses white space in line comments that preceede a method declaration
Summary: Code paste suppresses white space in line comments that preceede a method dec...
Status: RESOLVED DUPLICATE of bug 65841
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-08 02:38 EDT by Maxime Daniel CLA
Modified: 2006-06-08 03:03 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Daniel CLA 2006-06-08 02:38:20 EDT
Version: 3.2.0
Build id: I20060602-1317

Here are the results of a copy paste of the four lines that comprise the first comment and foo's definition, using different preferences:

// Foo comment
void foo() {
	
}
// pasting with Java/Editor/Typing/When pasting/Adjust indentation on:
//Foo comment
void bar() {
	
}
// pasting with Java/Editor/Typing/When pasting/Adjust indentation off:
// Foo comment
void foobar() {
	
}

I do not want the white space to be suppressed (as in the first case). Switching Ajust indentation off is a workaround, but this is quite a bit annoying, since it also disactivates the formatting of the code. 
I searched a bit for an option that would let me tell the formatter if I want to keep the leading white space in line comments or not, but I could not find it.
If no such option exists, I would suggest that the paste preserve the leading white space in line comments (if any), regardless of the 'Adjust indentation' preference.
Comment 1 Dani Megert CLA 2006-06-08 03:03:06 EDT

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