Title of the XML editor in Eclipse version
Oxygen general issues.
Title of the XML editor in Eclipse version
Hello,
To open the Oxygen XML editor in Eclipse RCP I inherited a class from the org.eclipse.ui.ide.FileStoreEditorInput and have overridden the getName() method so that the XML Editor has a more informative title than the actual filename of the XML document.
This works well for the session in which the editor is opened with the EditorInput. But when I close the client and restart it, only the filename of the XML document is shown as the editor´s title.
Is there maybe a differend approach to store the title between client sessions?
To open the Oxygen XML editor in Eclipse RCP I inherited a class from the org.eclipse.ui.ide.FileStoreEditorInput and have overridden the getName() method so that the XML Editor has a more informative title than the actual filename of the XML document.
This works well for the session in which the editor is opened with the EditorInput. But when I close the client and restart it, only the filename of the XML document is shown as the editor´s title.
Is there maybe a differend approach to store the title between client sessions?
Simon Scholz
vogella GmbH
http://www.vogella.com
vogella GmbH
http://www.vogella.com
Re: Title of the XML editor in Eclipse version
Hi Simon,
The Oxygen plugin does not alter the functionality of displaying the tab title in any way.
So I do not know what suggestion to give you.
Possible when Eclipse is closed, it uses the:
org.eclipse.ui.ide.FileStoreEditorInput.getPersistable()
to save the path to the file in its options, and then when reopened it will create a regular FileStoreEditorInput for it.
Eclipse also has this lazy way of re-opening files, it just shows the tab text there and only when clicked will actually initialize the editor.
Same behavior could probably be reproduced without re-starting Eclipse, just by using the File menu to Reopen the last closed editor.
Maybe you could call:
org.eclipse.ui.part.EditorPart.setPartName(String)
after the editor is opened. The method is protected but maybe you could call it by using reflection.
Regards,
Radu
The Oxygen plugin does not alter the functionality of displaying the tab title in any way.
So I do not know what suggestion to give you.
Possible when Eclipse is closed, it uses the:
org.eclipse.ui.ide.FileStoreEditorInput.getPersistable()
to save the path to the file in its options, and then when reopened it will create a regular FileStoreEditorInput for it.
Eclipse also has this lazy way of re-opening files, it just shows the tab text there and only when clicked will actually initialize the editor.
Same behavior could probably be reproduced without re-starting Eclipse, just by using the File menu to Reopen the last closed editor.
Maybe you could call:
org.eclipse.ui.part.EditorPart.setPartName(String)
after the editor is opened. The method is protected but maybe you could call it by using reflection.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Title of the XML editor in Eclipse version
Hi Radu,
thanks for the hint concerning the getPersistable() method.
The org.eclipse.ui.ide.FileStoreEditorInputFactory just stores the uri of the file, so I´ve created my own FileStoreEditorInputFactory which also stores the name of the IEditorInput to an IMemento instance.
So the issue is solved.
thanks for the hint concerning the getPersistable() method.
The org.eclipse.ui.ide.FileStoreEditorInputFactory just stores the uri of the file, so I´ve created my own FileStoreEditorInputFactory which also stores the name of the IEditorInput to an IMemento instance.
So the issue is solved.
Simon Scholz
vogella GmbH
http://www.vogella.com
vogella GmbH
http://www.vogella.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service