Creating a plugin
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 3
- Joined: Thu Aug 07, 2014 3:17 pm
Creating a plugin
Hi,
I am not sure if this is the best place to ask this question. I am creating a plugin by implementing the GeneralPluginExtension class. My question is, how do I access the file path of the current document? I dont see a property or method that will return the current document's path.
I am not sure if this is the best place to ask this question. I am creating a plugin by implementing the GeneralPluginExtension class. My question is, how do I access the file path of the current document? I dont see a property or method that will return the current document's path.
Code: Select all
public class GeneralExampleExtention implements GeneralPluginExtension{
@Override
public void process(GeneralPluginContext gpc) {
}
}
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Creating a plugin
Hi,
You can use API like:
This general plugin type is useful only for modifying content in the Text editing mode (the plugin will appear as a new action when you right click in the text editing mode). If you also want to modify content in the Author visual editing mode you could create a plugin of type Workspace Access which is more flexible.
Regards,
Radu
You can use API like:
Code: Select all
WSEditor currentOpenedDocument = gpc.getPluginWorkspace().getCurrentEditorAccess(PluginWorkspace.MAIN_EDITING_AREA);
URL editorLocation = currentOpenedDocument.getEditorLocation();
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “General XML Questions”
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