Reputation: 385
Today I noticed that now when I Ctrl+/ one or more lines in Eclipse (.java files) it does comment them with //, but now moves the text over. However, testing this with older projects currently in the workspace, it acts as before - the line remains at the same indentation. For instance:
What I want:
public Test()
{
_handler = new Handler();
}
Becomes
public Test()
{
// _handler = new Handler();
}
What happens:
public Test()
{
_handler = new Handler();
}
Becomes
public Test()
{
// _handler = new Handler();
}
I tried making a new Java project, and a new Android project (the two I use), and both had the problem. They do not have project-specific settings enabled. I also use a custom Formatter profile, but using any of the three built-in ones did the same thing.
Does anyone know how to fix this so it keeps the line at the same indentation?
Thanks, Amy
Extra Info:
Eclipse version Indigo, build id 20110916-0149
Android SDK R15 installed
Upvotes: 0
Views: 556
Reputation: 7937
Your problem could be tabs versus spaces in the two projects. Tabs may absorb the extra characters for commenting, whereas all-spaces for indenting does not absorb the comment characters.
Upvotes: 1