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

Bug 348757

Summary: [CommonNavigator] [Linux] Double click on certain files in the Project Explorer doesn't open the editor, or doesn't activate the editor if it is already opened
Product: [Eclipse Project] Platform Reporter: Keith Chong <keith.chong.ca>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: francisu, ivanc, pwebster, remy.suen
Version: 3.4.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Keith Chong CLA 2011-06-08 10:38:46 EDT
Snce double click seems to work fine for other files, like text files and java files, to reproduce, you must first set up the environment to get the appropriate files.  I can reproduce using a GEF sample file.  Other files are WSDL and XSD files.

1. Grab several of the GEF sample plugins from
   dev.eclipse.org/cvsroot/tools, 
   /org.eclipse.gef/examples/org.eclipse.gef.examples.flow
   /org.eclipse.gef/examples/org.eclipse.gef.examples.shapes
   /org.eclipse.gef/examples/org.eclipse.gef.examples.logic

   Or grab one of their builds and extract it to your target
2. Launch workbench
3. Create a simple project
4. File->New->Examples->GEF and create 3 of the samples
5. Double click on one of the sample files you've just created
--> It should open in the editor
6. Double click on another sample file
--> It won't open
7. If you can't reproduce the problem, try double-clicking on a file that is already opened in the editor -> It won't activate the editor
8. If you still can't reproduce the problem, close all editors, and start over ;-) but you should be able to reproduce this quite easily

Other Notes:
1. OS: Linux (I was using Ubuntu 10.04, but this problem also occurs on SLES and RHEL).
2. Problem occurs using Eclipse 3.4.2.
3. I debugged this for a bit, and found that in org.eclipse.ui.actions.RetargetAction's run method, the handler is null, so the handler isn't 'run'.  In cases where the editor opens, the handler is
org.eclipse.jdt.internal.ui.navigator.OpenAndExpand.
4. If you get into that state where double click doesn't work, click on one of the opened editors, to set focus, then go back to the explorer view.  Double clicking a file will then open the editor/activate the editor.
Comment 1 Francis Upton IV CLA 2011-06-08 10:43:54 EDT
Eclipse 3.4.2 is pretty ancient, have you been able to make this happen with 3.6.2?
Comment 2 Keith Chong CLA 2011-06-13 10:52:48 EDT
It doesn't happen in 3.6.2.
Comment 3 Francis Upton IV CLA 2011-06-13 10:55:38 EDT
Thanks Keith, we won't be doing anything about this as we don't have a means of fixing releases that are that old.
Comment 4 Keith Chong CLA 2011-07-29 13:37:42 EDT
Hi Francis,

Could you find the patch that fixes this problem and attach it to this bugzilla?
Comment 5 Francis Upton IV CLA 2011-08-01 11:17:43 EDT
(In reply to comment #4)
> Hi Francis,
> 
> Could you find the patch that fixes this problem and attach it to this
> bugzilla?
Sorry, I really have no idea what fixed this, or even if the fix is in the Common Navigator. 

Just off the top of my head, I think that it's possible this is related to a CNF problem that was not properly finding parents of elements that were found when using the Link With Editor functionality. That is, you would expose some element in the navigator using Link With Editor and it would not be able to hook up properly (I don't remember the details). Does this sound like it might be applicable?

(we can keep talking on the bug report without you reopening it)
Comment 6 Keith Chong CLA 2011-09-21 11:43:15 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > Hi Francis,
> > 
> > Could you find the patch that fixes this problem and attach it to this
> > bugzilla?
> Sorry, I really have no idea what fixed this, or even if the fix is in the
> Common Navigator. 
> Just off the top of my head, I think that it's possible this is related to a
> CNF problem that was not properly finding parents of elements that were found
> when using the Link With Editor functionality. That is, you would expose some
> element in the navigator using Link With Editor and it would not be able to
> hook up properly (I don't remember the details). Does this sound like it might
> be applicable?
> (we can keep talking on the bug report without you reopening it)

Hi Francis, I'm not sure, since I'm not familiar with that function.  But, if I recall correctly, the Link With Editor button was turned off, if that helps. Any other thoughts?