Oxygen API to check whether file saved or not
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 168
- Joined: Fri Feb 28, 2020 4:02 pm
Oxygen API to check whether file saved or not
Post by vishwavaranasi »
Hello Team , We have a requirement , wanted to check that if a file opened inside the editor saved the changes or not , want to achive this from a plugin
any API that can be used for this purpose ,
expecting some API like below we used for preventing editing read only files. pluginWorkspaceAccess.setGlobalObjectProperty(APIAccessibleOptionTags.CAN_EDIT_READ_ONLY_FILES, Boolean.FALSE);
thanks much.
any API that can be used for this purpose ,
expecting some API like below we used for preventing editing read only files. pluginWorkspaceAccess.setGlobalObjectProperty(APIAccessibleOptionTags.CAN_EDIT_READ_ONLY_FILES, Boolean.FALSE);
thanks much.
Thanks,
vishwa
vishwa
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Oxygen API to check whether file saved or not
Hi,
Sure, we have API to check if an opened document is modified:
https://www.oxygenxml.com/InstData/Edit ... Modified--
Regards,
Radu
Sure, we have API to check if an opened document is modified:
Code: Select all
PluginWorkspace pluginWorkspace = PluginWorkspaceProvider.getPluginWorkspace();
URL[] allOpenedEditorLocations = pluginWorkspace.getAllEditorLocations(PluginWorkspace.MAIN_EDITING_AREA);
for (int i = 0; i < allOpenedEditorLocations.length; i++) {
WSEditor openedEditor = pluginWorkspace.getEditorAccess(allOpenedEditorLocations[i], PluginWorkspace.MAIN_EDITING_AREA);
boolean modified = openedEditor.isModified();
}
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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