Bug 192230 - WST XML editor folding gets confused when using multiple editors for single file
Summary: WST XML editor folding gets confused when using multiple editors for single file
Status: RESOLVED DUPLICATE of bug 281380
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 4.0   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords: ui
Depends on:
Blocks:
 
Reported: 2007-06-12 11:45 EDT by Arjan van Bentem CLA
Modified: 2009-06-29 22:03 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arjan van Bentem CLA 2007-06-12 11:45:12 EDT
Build ID: I20070608-1718 (Eclipse 3.3 RC4)

Steps To Reproduce:
1. Create a new file with some simple XML snippet, such as

<?xml version="1.0" encoding="UTF-8"?>
<myelement>
    <mychild>
        <mygrandchild>hello world</mygrandchild>
    </mychild>
</myelement>

2. Choose Window|New Editor

3. In one of the editor windows collapse the <mychild> element

4. The other editor window gets confused:
- it might show Ellipsis after elements that are actually not collapsed/folded in this very editor window
- it might show a "+" icon to expand the element that is not folded in this very editor window
- it might show a "-" icon to collapse elements that are already folded
- after some random copy/paste action it might show any "-" nor "+" icon for some elements at all


More information:
- When showing both editors simultaneously one can see the icons change on mouse hover. For example: one line 3 in the first window collapse an element; the gutter will show the "+" icon, but it will still be the "-" icon in the second window. Now when hovering the mouse over the "-" icon in the second window, it will also change into a "+" (which it should not do).

- Java code folding does not suffer this behavior

- Line numbering is correct

- I have WTP 2.0RC2 installed as well.
Comment 1 Arjan van Bentem CLA 2007-06-13 05:22:28 EDT
(altered product: the XML editor is part of WST; WTP 2.0.RC2)
Comment 2 Arjan van Bentem CLA 2007-06-13 06:08:59 EDT
The same behavior using the Wed, 13 Jun 2007 -- 06:11 (UTC) continuous build in a fresh Eclipse 3.3RC4, with the following dependencies downloaded from http://download.eclipse.org/webtools/committers/drops/R2.0/S-2.0RC3-200706130611/

wtp-S-2.0RC3-200706130611
emf-sdo-xsd-SDK-I200706061821
GEF-SDK-I20070606-1442
dtp-sdk_1.5RC2 
Comment 3 Nitin Dahyabhai CLA 2007-06-13 13:01:09 EDT
Amy, I take it that this is a limitation of the adapter-based approach?
Comment 4 Amy Wu CLA 2007-06-18 14:23:18 EDT
(In reply to comment #3)
> Amy, I take it that this is a limitation of the adapter-based approach?
> 
Yes it is.  We are storing the folded-unfolded information in an adapter and that 1 adapter is used by all editors on the same model.
Comment 5 Arjan van Bentem CLA 2007-06-20 03:30:33 EDT
Not implying anything, but just in case it helps: the EPIC Perl editor supports folding as well, but does not get confused; http://e-p-i-c.sourceforge.net/
Comment 6 Amy Wu CLA 2008-02-04 12:58:23 EST
mass reassignment of my bugs to xml-inbox
Comment 7 Nitin Dahyabhai CLA 2009-06-29 22:03:26 EDT
Marking as dupe of bug 281380, where code folding is being rewritten.

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