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.
Get path from DITAExtensionsBundle
-
- Posts: 4144
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Get path from DITAExtensionsBundle
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
Re: Get path from DITAExtensionsBundle
I decided using this one:
Thanks a lot!authorAccess.getEditorAccess().getEditorLocation()