Bug 232354 - [clean up] Remove block does not handle labeled statements
Summary: [clean up] Remove block does not handle labeled statements
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-15 13:13 EDT by Benno Baumgartner CLA
Modified: 2022-08-05 13:19 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benno Baumgartner CLA 2008-05-15 13:13:00 EDT
I20080513-2000

Given:
class Bug {
	void first() {
		if (false) {
			foo: if (true) {
				
			}
		} else
			System.out.println("HERE");
	}
}
1. Source > Clean Up...
2. Remove blocks
Is:
 class Bug {
	void first() {
		if (false)
			foo: if (true) {
				
			}
		else
			System.out.println("HERE");
	}
}
Should:
 No change (else is now part of second if statement)
Comment 1 Benno Baumgartner CLA 2008-05-19 03:16:48 EDT
See comment #5 of bug 229734:

"Smells like a requirement of a util method. Maybe something like:
ASTNodes.substituteNeedsBlock(Statement, Statement)
(we already have ASTNodes.substituteMustBeParenthesized(Expression, Expression)"
Comment 2 Eclipse Genie CLA 2020-06-19 14:20:34 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.

If you have further information on the current state of the bug, please add it. 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.
Comment 3 Eclipse Genie CLA 2022-08-05 13:19:22 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.

If you have further information on the current state of the bug, please add it. 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.