Community
Participate
Working Groups
JDT has the great feature that if you press CTRL+Q it jumps to the last editor and the last edited position. Would be great if the XML editor would support the same feature. I'm not sure how JDT implements this functionality, maybe it is easy to reuse that feature.
cc Dani, maybe he can share some infos about the jump to last edited position feature.
This feature is in the platform and works out of the box for textual editors (AbstractTextEditor). It even works in the PDE editors (text pages only). If you're not using that infrastructure, you'll have a hard time to hook into this.
We are, but as a page of a MultiPageEditorPart
(In reply to comment #3) > We are, but as a page of a MultiPageEditorPart Then it should probably just work, except maybe the action is not enabled. I suggest to start debugging around org.eclipse.ui.texteditor.GotoLastEditPositionAction.
Using Eclipse 4.3.0 I20130430-2000 I have seen that I can navigate to the Last Edit Location from the PDE editors if the destination is not within a PDE editor. This is the same for the XML editor. There's a PartInitException thrown when the last edit position is within a text PDE editor or the XML editor.
(In reply to comment #5) > Using Eclipse 4.3.0 I20130430-2000 I have seen that I can navigate to the > Last Edit Location from the PDE editors if the destination is not within a > PDE editor. Can you provide exact steps using the Plug-in Manifest Editor? > This is the same for the XML editor. There's a PartInitException > thrown when the last edit position is within a text PDE editor or the XML > editor. PartInitException sounds strange. Steps for that would also be good.
(In reply to comment #6) > (In reply to comment #5) > > Using Eclipse 4.3.0 I20130430-2000 I have seen that I can navigate to the > > Last Edit Location from the PDE editors if the destination is not within a > > PDE editor. > > Can you provide exact steps using the Plug-in Manifest Editor? > On the plugin.xml source tab, I added some spaces somewhere in the middle of the document. I then placed my cursor at the beginning of the document. I pressed Ctrl+Q, and the cursor stayed at the beginning of the document. > > > This is the same for the XML editor. There's a PartInitException > > thrown when the last edit position is within a text PDE editor or the XML > > editor. > > PartInitException sounds strange. Steps for that would also be good. Following the steps I've provided, WorkbenchPage#busyOpenEditor() tries to find the editor matching editorId. For both the PDE and XML editors, a null EditorDescriptor is returned. Because it is null, a PartInitException is thrown. That exception is caught, and the GoToLastEditPosition action just returns at that point.
(In reply to comment #7) > (In reply to comment #6) > > (In reply to comment #5) > > > Using Eclipse 4.3.0 I20130430-2000 I have seen that I can navigate to the > > > Last Edit Location from the PDE editors if the destination is not within a > > > PDE editor. > > > > Can you provide exact steps using the Plug-in Manifest Editor? > > > On the plugin.xml source tab, I added some spaces somewhere in the middle of > the document. I then placed my cursor at the beginning of the document. I > pressed Ctrl+Q, and the cursor stayed at the beginning of the document. This works fine for me using 4.3 RC2: http://download.eclipse.org/eclipse/downloads/drops4/S-4.3RC2-201305231400/ Note that there are issues when e.g. the editor gets closed, or the page changed. See bug 32214 for those issues.
(In reply to comment #8) > (In reply to comment #7) > > (In reply to comment #6) > > > (In reply to comment #5) > > > > Using Eclipse 4.3.0 I20130430-2000 I have seen that I can navigate to the > > > > Last Edit Location from the PDE editors if the destination is not within a > > > > PDE editor. > > > > > > Can you provide exact steps using the Plug-in Manifest Editor? > > > > > On the plugin.xml source tab, I added some spaces somewhere in the middle of > > the document. I then placed my cursor at the beginning of the document. I > > pressed Ctrl+Q, and the cursor stayed at the beginning of the document. > > This works fine for me using 4.3 RC2: > http://download.eclipse.org/eclipse/downloads/drops4/S-4.3RC2-201305231400/ Sorry, I was running on 3.8.2. It works there, but is broken in 4.x, see bug 392414. *** This bug has been marked as a duplicate of bug 392414 ***