Get path from DITAExtensionsBundle
Oxygen general issues.
-
- Posts: 18
- Joined: Wed May 23, 2012 8:53 am
- Location: Portland, Oregon
Get path from DITAExtensionsBundle
Hi,
We have our own DITAExtensionsBundle, which creates a DITAUniqueAttributesRecognizer, and thus generates IDs for us.
I want to let the ID depend on the project that is opened.
Is there any way, inside above classes (childs thereof) to obtain a handle to any such information; either the project file, or the currently opened documents file name or something like that.
I see I have an authorAccess field, but that seems not to helpful as of yet.
Thanks for your help, kind regards, Sander.
We have our own DITAExtensionsBundle, which creates a DITAUniqueAttributesRecognizer, and thus generates IDs for us.
I want to let the ID depend on the project that is opened.
Is there any way, inside above classes (childs thereof) to obtain a handle to any such information; either the project file, or the currently opened documents file name or something like that.
I see I have an authorAccess field, but that seems not to helpful as of yet.
Thanks for your help, kind regards, Sander.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Get path from DITAExtensionsBundle
Post by sorin_ristache »
Hi Sander,
In any point of your extension class you can find the URL of the current project by calling ro.sync.util.editorvars.EditorVariables.getCurrentProjectURL().
Other option is getting the current project name, or the current project directory or the current project URL by calling EditorVariables.expandEditorVariables(variable, authorAccess.getEditorAccess().getEditorLocation()), where variable can be one of the constants:
Other option is getting the list of URLs of all currently opened documents with a call authorAccess.getWorkspaceAccess().getAllEditorLocations().
Regards,
Sorin
In any point of your extension class you can find the URL of the current project by calling ro.sync.util.editorvars.EditorVariables.getCurrentProjectURL().
Other option is getting the current project name, or the current project directory or the current project URL by calling EditorVariables.expandEditorVariables(variable, authorAccess.getEditorAccess().getEditorLocation()), where variable can be one of the constants:
- EditorVariables.PROJECT_NAME
- EditorVariables.PROJECT_DIRECTORY
- EditorVariables.PROJECT_DIRECTORY_URL
Other option is getting the list of URLs of all currently opened documents with a call authorAccess.getWorkspaceAccess().getAllEditorLocations().
Regards,
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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