This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 189810 - 'else' is not auto-indented correctly.
Summary: 'else' is not auto-indented correctly.
Status: RESOLVED DUPLICATE of bug 188112
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Dusan Balek
Depends on:
Reported: 2010-08-24 15:19 UTC by peterhull90
Modified: 2010-10-15 16:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description peterhull90 2010-08-24 15:19:38 UTC
Product Version = NetBeans IDE 6.9 (Build 201006101454)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.6.0_18
Runtime = Java HotSpot(TM) Client VM 16.0-b13

When typing java code containing if...else..., the 'else' is indented close to the left margin and not under the 'if'. I think this is new in 6.9.

public class Dummy {
	public Dummy() {
		if (true) {
The caret is at ^. 
Type the final e of else and the word jumps to the left margin
public class Dummy {
	public Dummy() {
		if (true) {
Complete the structure and choose Source|Format. The code is indented 'correctly'
public class Dummy {

	public Dummy() {
		if (true) {
		} else {


Reproducible always.
Comment 1 Dusan Balek 2010-10-15 16:39:56 UTC
Should be already fixed in the current dev build.

*** This bug has been marked as a duplicate of bug 188112 ***