create new file with assigned url?
Post here questions and problems related to oXygen frameworks/document types.
create new file with assigned url?
My requirement for a specific AuthorOperation is that i want to ensure that a specific file is opened in oXygen editor. (I will access it through the URIResolver.)
Currently, when the file is not existing I create the content, write it to disk and then open it.
Even better would be if I could create a new document with a specific URL assigned to it. This way there is no side-effect until the user saves the file.
I found a method to create a new file (Workspace.createNewEditor()) but I could not find a way to set a specific URL without explicitly saving it to disk!?
Thanks and regards,
Patrik
Currently, when the file is not existing I create the content, write it to disk and then open it.
Even better would be if I could create a new document with a specific URL assigned to it. This way there is no side-effect until the user saves the file.
I found a method to create a new file (Workspace.createNewEditor()) but I could not find a way to set a specific URL without explicitly saving it to disk!?
Thanks and regards,
Patrik
Re: create new file with assigned url?
Hi Patrik,
Sorry but we do not have such an API. I added an internal issue for this.
What you could do would be to create the file on disk, open it in Oxygen, mark the opened editor as modified (WSEditor.setModified(true)) and then remove if from disk.
This will probably not work that well when Oxygen 19.1 will be released because Oxygen 19.1 will detect the underlining file does not exist anymore and will show a dialog asking you what to do about it.
Regards,
Radu
Sorry but we do not have such an API. I added an internal issue for this.
What you could do would be to create the file on disk, open it in Oxygen, mark the opened editor as modified (WSEditor.setModified(true)) and then remove if from disk.
This will probably not work that well when Oxygen 19.1 will be released because Oxygen 19.1 will detect the underlining file does not exist anymore and will show a dialog asking you what to do about it.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: create new file with assigned url?
Thanks. It's not that urgent anyway since the current behavior is good enough...
Regards,
Patrik
Regards,
Patrik
Return to “SDK-API, Frameworks - Document Types”
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