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 - reformatting a part of wrongly formatted document is absolute
Summary: reformatting a part of wrongly formatted document is absolute
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomasz Slota
URL:
Keywords:
Depends on:
Blocks: 118615
  Show dependency tree
 
Reported: 2007-10-11 21:40 UTC by Tomasz Slota
Modified: 2007-10-11 22:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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