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

Bug 392414

Summary: Last edit location doesn't work
Product: [Eclipse Project] Platform Reporter: Régis <webredjo+eclipse>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: alain.pannetier, bugs.eclipse.org, daniel.rolka, daniel_megert, Lars.Vogel, nsand.dev, pwebster
Version: 3.4.1   
Target Milestone: 4.3.1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Régis CLA 2012-10-19 04:38:32 EDT
Hi,

Since juno release (Eclipse 4), "last edit location" button or shortcut (CRTL+Q) doesn't work for xml files (Eclipse XML Editors and Tools Version: 3.4.1).

It works fine with Indigo (Eclipse XML Editors and Tools Version: 3.3.1).


Steps To Reproduce:
- open xml file (or create a new one) in a project with XML editor
- write something
- switch on an other file
- try to go on "last edit location" with button or shortcut
Comment 1 Nick Sandonato CLA 2012-10-19 17:25:53 EDT
Something seems to have changed in the platform's editor opening code and how it handles MultiPageEditorParts with a TextEditor as a page. I can reproduce the same issue with PDE's manifest editor in Juno, but it also worked fine with Indigo. It looks like it fails in WorkbenchPage#busyOpenEditor when trying to find the editor by its ID, where these embedded editors may not have the same ID as the editor to match the input with.
Comment 2 Dani Megert CLA 2012-10-22 06:17:02 EDT
There were always problems with that (see bug 32214) but now it is much worse:

1. open plugin.xml
2. type some text
3. place caret somewhere else
==> 'Last Edit Location' does not work (via menu, shortcut or toolbar button)

This works in 3.8.1 but not 4.2.1.
Comment 3 Alain Pannetier CLA 2013-05-27 06:38:58 EDT
Also here on Mint 14/Gnome 3
Comment 4 Dani Megert CLA 2013-05-27 06:56:21 EDT
*** Bug 407978 has been marked as a duplicate of this bug. ***
Comment 5 Dani Megert CLA 2013-05-27 06:57:44 EDT
We should take a look at this for 4.3.1.
Comment 6 Daniel Rolka CLA 2013-07-22 06:38:20 EDT
The partial fix for the issue has been sent to Gerrit - http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=45da172f9be96e7b031dfeb9d17930bb38b64858 

It doesn't solve the entire 'last edit location' functionality - see other bugs related to it, the #413430 one in particular

Daniel
Comment 7 Dani Megert CLA 2013-07-22 10:43:54 EDT
(In reply to comment #6)
> The partial fix for the issue has been sent to Gerrit -
> http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/
> ?id=45da172f9be96e7b031dfeb9d17930bb38b64858 

https://git.eclipse.org/r/#/c/14739/ that is. The fix is not good. See comment in Gerrit change.
Comment 8 Dani Megert CLA 2013-07-25 06:28:03 EDT
The change in the Platform is OK, but it surfaces the wrong/missing editor id. The correct fix is to set the correct editor id.

I verified that the fix from bug 413430 also fixes the XML editor.

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