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 118620

Summary: reformatting a part of wrongly formatted document is absolute
Product: javaee Reporter: Tomasz Slota <tslota>
Component: JSPAssignee: Tomasz Slota <tslota>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 118615    

Description Tomasz Slota 2007-10-11 21:40:26 UTC
In case a part of a wrongly formatted document is being reformatted the new formatting is absolute - it should take into account the bias of the previous 
line instead. Note that this issue affects the new line indentation as well.

example 1:

reformatting the following document:

<tag>
wrongly formatted text
*selection*
</tag>

results in 

<tag>
wrongly formatted text
        *selection*
</tag>

while in this case it should stay untouched.

example 2:

    <tag>
*selection*
</tag>

results in 

    <tag>
    *selection*
</tag>

instead of 

    <tag>
        *selection*
</tag>
Comment 1 Tomasz Slota 2007-10-11 22:16:04 UTC
Fixed.

Checking in TagBasedLexerFormatter.java;
/cvs/xml/tageditorsupport/src/org/netbeans/modules/editor/structure/formatting/TagBasedLexerFormatter.java,v  <--  TagBasedLexerFormatter.java
new revision: 1.23; previous revision: 1.22