Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 369621

Summary: explorer selection jumps around when using multi-page editor with 'link with editor' enabled
Product: [Eclipse Project] PDE Reporter: David Williams <david_williams>
Component: UIAssignee: Dani Megert <daniel_megert>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, markus.kell.r, remy.suen
Version: 3.8   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description David Williams CLA 2012-01-25 01:53:13 EST
I have trouble reproducing this in a simple way, but thought I'd report what I see. 

I was testing 4.2 I20120123-2200 based build (with WTP also installed ... WTP from  
http://build.eclipse.org/webtools/committers/wtp4x-R3.4.0-I/20120124034642/I-3.4.0-20120124034642/

In a large workspace (several hundred projects) occasionally when I'd click on a file to open MANIFEST.MF file, the project explorer selection would "jump to" the plugin.xml file (even though, main page of the multipage editor would be on "overview"). This only happened in project explorer, not resource view. 

This would not happen for all projects, but seemed to consistently for some projects, such as org.eclipse.wst.sse.ui. But ... if I tried a fresh workspace, and imported just org.eclipse.wst.sse.ui (hoping to have an easy to demonstrate case) then it would no longer happen. 

So, not sure if related to having many projects in workspace ... or some more random thing. And, could always be related to something in WTP for all I know. 

Thought I'd report as a "warning" for others to test also, if possible.
Comment 1 Dani Megert CLA 2012-01-25 03:37:36 EST
- The summary says "Package explorer"
- comment 0 says: "This only happened in project explorer, not resource view. "

This is contradictory and there is no "resource" view (at least not in the SDK). Maybe you meant 'Navigator' view?


Having said that, I can easily reproduce this in all three views:
1. enable 'Link with Editor' in the view
2. double click on plugin.xml of a bundle
3. double click on 'MANIFEST.MF' of the same bundle
==> view selection jumps to 'plugin.xml'


I suspect a bug in the PDE editor or even MultiPageEditorPart. In addition, I think those editors store the LRU page and open on that one.

Need to take a closer look and test whether this is a regression.
Comment 2 David Williams CLA 2012-01-25 08:45:54 EST
(In reply to comment #1)
> - The summary says "Package explorer"
> - comment 0 says: "This only happened in project explorer, not resource view. "
> 
> This is contradictory and there is no "resource" view (at least not in the
> SDK). Maybe you meant 'Navigator' view?
> 

Yes, sorry, I meant Package Explorer in Java Perspective, and Project Explorer in Resource Perspective. 

> 
> Having said that, I can easily reproduce this in all three views:
> 1. enable 'Link with Editor' in the view
> 2. double click on plugin.xml of a bundle
> 3. double click on 'MANIFEST.MF' of the same bundle
> ==> view selection jumps to 'plugin.xml'
> 
> 

Confirmed these steps.

> I suspect a bug in the PDE editor or even MultiPageEditorPart. In addition, I
> think those editors store the LRU page and open on that one.
> 
> Need to take a closer look and test whether this is a regression.

I have now checked 3.8 build (I20120123-1800) and occurs there, so not related to "compatibility layer".

And now just check 3.7.1 release and it also occurs there, so is not a regression. Guess I normally have "link with Editor" turned off so haven't noticed before.
Comment 3 Dani Megert CLA 2012-01-25 08:59:56 EST
Thanks for checking David.
Comment 4 Dani Megert CLA 2012-03-27 09:40:51 EDT
The initially opened file is treated as the editor's input and that file name is also reflected in the editor tab. From that perspective the jumpy switching makes sense. If we'd want to change that behavior we'd also have to auto-update the editor tab when we switch the pages. Also, a single page might use more than one file as its input. This change could either go into PDE or the framework, but I think it's best if we leave this bug alone.