Bug 27511 - [typing] Java auto-indent strategy could insert SPACE in several places
Summary: [typing] Java auto-indent strategy could insert SPACE in several places
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-02 13:06 EST by Randy Hudson CLA
Modified: 2004-09-07 11:53 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 Randy Hudson CLA 2002-12-02 13:06:33 EST
The Java source editor should insert whitespace more often, to correlate with 
my "format" settings.  For example:

"if(condition)"
should become
"if (condition)"

"void foo(){"
should become
"void foo() {"

"}else{"
should become
"} else {"

"new Rectangle(0,0,l+r,t+b)"
should become
"new Rectangle(0, 0, l + r, t + b)"

I believe these are simple cases. It would be too aggressive to apply every 
format option as you type (especially newlines), but a single space is often 
useful.
Comment 1 Randy Hudson CLA 2003-02-14 10:11:45 EST
Please consider for 2.1.  The hardest part about this change would be naming 
the preference.  Maybe there is already an existing preference that this fall 
under.
Comment 2 Randy Hudson CLA 2004-09-07 11:40:22 EDT
I have a patch which implements this functionality but without looking at 
formatting preferences.  It assumes the standard preferences are enabled.  It 
handles operators like "++" and "+=".  The only case I have handled yet is "-" 
used to negate.  So you get "y = x * - z".

Changing status from ASSIGNED since JDT-INBOX is not a person
Comment 3 Dani Megert CLA 2004-09-07 11:53:01 EDT
ASSIGNED means we looked at the bug and it now waits to be assigned to some
developer. NEW means we did not yet look at the bug or did not yet accept it.

Most of our typing functionality consults the formatter preferences. The same
should be true for your patch.

To me this looks like a *Format while typing" feature.