Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362514 - [Tree] Not well refreshed/redrawn when content is changed from a different perspective in IE
Summary: [Tree] Not well refreshed/redrawn when content is changed from a different pe...
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: JFace (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 1.5 M3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 363682 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-31 12:49 EDT by Seif Gouta CLA
Modified: 2011-11-14 06:27 EST (History)
2 users (show)

See Also:


Attachments
Before deleting the node zzz (16.80 KB, image/png)
2011-10-31 13:05 EDT, Seif Gouta CLA
no flags Details
After deleting node in content provider from Admin perspective then switching to Perspective 1 (16.72 KB, image/png)
2011-10-31 13:07 EDT, Seif Gouta CLA
no flags Details
A simple 2 perspective application - From a modified version of the RAP mailbox demo (76.98 MB, application/x-zip-compressed)
2011-11-01 12:50 EDT, Seif Gouta CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Seif Gouta CLA 2011-10-31 12:49:57 EDT
We have 2 perspectives, one first perspective and one Admin perspective from where the tree view content provider of the first perspective data can be edited.
If you delete an element in the content provider of the treeviewer of the first perspective FROM admin perspective, the icons are not well redrawn, the removed node icon and any previous selection are still present even though the node label is removed.

The refresh in the 
viewer.setInput(createViewInput());
viewer.refresh(); 

Running on Windows 7 64 bit

It works in Google Chrome and RCP 
It does not work on in Eclipse RAP nor IE9.

-- Configuration Details --
Product: Eclipse 1.4.0.20110609-1120 (org.eclipse.epp.package.rcp.product)
Installed Features:
 org.eclipse.platform 3.7.0.v20110530-9gF7UHNFFt4cwE-pkZDJ7oz-mj4OSEIlu9SEv0f
Comment 1 Seif Gouta CLA 2011-10-31 13:05:46 EDT
Created attachment 206226 [details]
Before deleting the node zzz

Both views in perspective 1 and Adnmin perspective are using the same content provider. One node is removed from the content provider in Admin perspective. When going back to perspective 1 the node is gone but the icon remains there.
Comment 2 Seif Gouta CLA 2011-10-31 13:07:42 EDT
Created attachment 206228 [details]
After deleting node in content provider from Admin perspective then switching to Perspective 1

The node is gone but the icon remains, you cannot click on that node, it's a redraw failure.
Comment 3 Ivan Furnadjiev CLA 2011-10-31 13:11:02 EDT
Could you provide a complete self-running snippet/project that demonstrate the issue?
Comment 4 Ivan Furnadjiev CLA 2011-10-31 13:13:55 EDT
BTW... It does not work *only* in IE and internal Eclipse browser (which uses IE core too under Windows). Isn't it? Chrome and Firefox work fine?
Comment 5 Seif Gouta CLA 2011-10-31 13:24:14 EDT
Yes for the last question, the only place it works on are Chrome and Firefox, (since they use the same core than it explains why they are not running). I hope I will be able to reproduce it in a smaller code snippet/project.
Comment 6 Ivan Furnadjiev CLA 2011-11-01 05:28:11 EDT
Could you try to run your code against the latest nightly build? We switched IE9 to use "standard" rendering instead of "quirks" - see bug 270397. Does it make any difference?
Comment 7 Seif Gouta CLA 2011-11-01 12:50:29 EDT
Created attachment 206276 [details]
A simple 2 perspective application - From a modified version of the RAP mailbox demo

When application starts it will show the RAP perspective. Go to "My perspective", click the big button to update tree views with a new smaller data. Notive how the tree item "Send" will be removed. Go back to RAP perspective and the "Send" tree item will be gone but the icon will remain, it's a rendering issue, you won't be able to click on the icon.
Comment 8 Seif Gouta CLA 2011-11-01 12:51:21 EDT
Hello Ivan! I have tried and the problem persisted. Thanks
(In reply to comment #6)
> Could you try to run your code against the latest nightly build? We switched
> IE9 to use "standard" rendering instead of "quirks" - see bug 270397. Does it
> make any difference?
Comment 9 Seif Gouta CLA 2011-11-01 12:58:07 EDT
Comment on attachment 206276 [details]
A simple 2 perspective application - From a modified version of the RAP mailbox demo

NavigationView2 in the second perspective has a button that modifies the data for the treeviewers in both perspectives. It also refreshes the treeviewers. DataManager is a singleton that holds the first treeviewer and 2 models just as a means to communicate between the two perspectives.
Comment 10 Tim Buschtoens CLA 2011-11-02 13:05:20 EDT
In RAP 1.5 it seems to work.
Comment 11 Ivan Furnadjiev CLA 2011-11-03 02:20:48 EDT
(In reply to comment #8)
> Hello Ivan! I have tried and the problem persisted. Thanks
Same as Tim, I can't reproduce it with the latest nightly build (CVS HEAD). Tested both external IE9 and internal Eclipse browser. Could you check it again?
Comment 12 Seif Gouta CLA 2011-11-03 09:47:22 EDT
Ok, I tried today's Composite Artifact Repository - http://download.eclipse.org/rt/rap/1.5/runtime and it still didn't work because I thought it was the latest build, but as you said Ivan the latest night build solves the problem, I found the link in wiki. Thank you very much!
Comment 13 Ivan Furnadjiev CLA 2011-11-03 10:09:57 EDT
OK... this means that "standard" rendering in IE9 fixes the problem. Nevertheless, the problem is still reproducible by me with IE8 (Windows XP).
Comment 14 Tim Buschtoens CLA 2011-11-04 05:53:01 EDT
Fixed in CVS HEAD, TreeRow.js#_ieFixLayoutOnAppear.
Comment 15 Ivan Furnadjiev CLA 2011-11-14 04:44:41 EST
*** Bug 363682 has been marked as a duplicate of this bug. ***
Comment 16 Yury CLA 2011-11-14 04:58:31 EST
These fixes are applied for RAP 1.5. Is there any way to port them into RAP 1.4?

Regards,
Yury.
Comment 17 Yury CLA 2011-11-14 05:36:39 EST
Check this fix in RAP 1.4:

    TreeRow.js#_hideRemainingElements : function() {
      var node = this._getTargetNode();
      for( var i = this._usedNodes; i < node.childNodes.length; i++ ) {
      	node.childNodes[ i ].style.display = "";
        node.childNodes[ i ].style.display = "none";
      }
    }

It works in FF8.0 and IE9.

Regards,
Yury.
Comment 18 Ivan Furnadjiev CLA 2011-11-14 06:27:52 EST
*** Bug 363682 has been marked as a duplicate of this bug. ***