Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 275425 - ProjectionViewer unnecessarily expands folded regions
Summary: ProjectionViewer unnecessarily expands folded regions
Status: RESOLVED DUPLICATE of bug 178203
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-08 04:00 EDT by Anton Leherbauer CLA
Modified: 2009-05-08 04:04 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 Anton Leherbauer CLA 2009-05-08 04:00:41 EDT
When deleting multiple lines of text, subsequent folded regions might get expanded.

E.g.

public class Foo {
    static void m1() {
        // delete me
        // delete me
        // delete me
        // delete me
        // delete me
        // delete me
    }
    static void m2() {
        // fold me
    }
    static void m3() {
        // fold me
    }
    static void m4() {
        // fold me
    }
}

Fold methods m2-m4 and then delete the comments in m1. Methods m2-m4 get expanded.

The culprit seems to be ProjectionViewer.handleVisibleDocumentChanged() where in case of a delete with multiple lines, the complete range of the (now deleted) text is expanded.
Comment 1 Dani Megert CLA 2009-05-08 04:04:02 EDT

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