Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325962 - [projection] Code folding behaves in unexpected ways in presence of syntax errors
Summary: [projection] Code folding behaves in unexpected ways in presence of syntax er...
Status: CLOSED DUPLICATE of bug 104373
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-22 09:38 EDT by jules CLA
Modified: 2010-09-22 09:53 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 jules CLA 2010-09-22 09:38:00 EDT
Build Identifier: 20090621-0832

When editing code with sections folded, transient syntax errors (e.g. because an declaration has been partially written but not completed) immediately above the folded area can cause the editor to behave in illogical ways, e.g. moving the code that is being actively edited inside a folded region.

The editor should probably avoid changing the start and end locations of a folded region when there is a syntax error in the immediate vicinity.  Moving code that the user is actively editing inside a folded region is *very* confusing.

Reproducible: Always

Steps to Reproduce:
1. Create a class and add a public method to it.
2. Fold the method
3. Place the cursor before the folded method and type "public", as if you were about to add a new public declaration.
4. Wait for about a second.
5. The new "public" keyword disappears; if you open the folded region you will see that it is now inside the region.
Comment 1 Dani Megert CLA 2010-09-22 09:53:26 EDT

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