Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 390448

Summary: [1.7][formatter] Placement of left curly brace cannot be configured with try-with-resource
Product: [Eclipse Project] JDT Reporter: Carsten Otto <eclipse>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 3.8   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Carsten Otto CLA 2012-09-26 10:35:02 EDT
Hi,

For the following code the formatter does not offer "Next line on wrap" although I'd like to see this option to have consistent code.

try (
AVeryLongType aVeryLongName = new AVeryLongImplementation(aVeryLongParameter);
AVeryLongType aVeryLongName = new AVeryLongImplementation(aVeryLongParameter);) {
    ...
}

I'd like to see "Next line on wrap" for "try-with-resource" statements in the formatter options (Braces). Then the formatter should produce the following code:

try (
AVeryLongType aVeryLongName = new AVeryLongImplementation(aVeryLongParameter);
AVeryLongType aVeryLongName = new AVeryLongImplementation(aVeryLongParameter);)
{
    ...
}


This may be related to bugs #349396, #49351 and #349008.
Comment 1 Eclipse Genie CLA 2020-04-01 14:01:12 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.