History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-17622
Type: Bug Bug
Status: Open Open
Assignee: Maxim Shafirov
Reporter: Serge Baranov
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

Code auto-format for try/catch

Created: 03 Apr 08 12:45   Updated: 03 Apr 08 14:43
Component/s: Code Formatting and Code Style

Build: 7,757
Severity: Medium


 Description  « Hide
Support feedback:

In IntelliJ v4, this used to work correctly, but ever since v5 (I think) it's been broken. It's basically just an annoyance, but I figured I'd report it since I've been expecting it to be fixed now for the past three versions and it hasn't been...

Basically, I've gotten into the habit of always completing my braces before I populate any nested code (this is so I don't lose track of where braces need to go...)

Here's a description of the issue (where you see <enter>, it means hit the enter key, where you see <cursor> is where the cursor ends up after hitting the enter key):

//
   try {<enter>

This produces:

//
    try {
        <cursor>
    }

So far, so good. Then I do this:

//
    try {
        
    } catch () {<enter>

Here's where the formatting problem occurs. I end up with this:

//
        try {
            
        } catch () {
        <cursor>        
    }

Like I said, it's more an annoyance than anything else, but since try/catch is a very commonly used construct, always having to fix this is really a pain.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.