Adding to the code completion pop-up via a plugin
Oxygen general issues.
-
- Posts: 3
- Joined: Sun Mar 24, 2013 9:33 pm
Adding to the code completion pop-up via a plugin
Hi
I am tying to add my own custom code-completion pop-up suggestions (the ones that show up via ctrl+space) via a plugin on the standalone version of Oxygen. I know this can be done through an XSD, but I would like to do it programmatically through a plugin. Is this possible?
I have seen some references to a pop-up customizer but this only seems to be for the Author view, and I want to be in Text view.
Please advise on if this is possible and if so which APIs i should be looking at.
Thanks
I am tying to add my own custom code-completion pop-up suggestions (the ones that show up via ctrl+space) via a plugin on the standalone version of Oxygen. I know this can be done through an XSD, but I would like to do it programmatically through a plugin. Is this possible?
I have seen some references to a pop-up customizer but this only seems to be for the Author view, and I want to be in Text view.
Please advise on if this is possible and if so which APIs i should be looking at.
Thanks
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Adding to the code completion pop-up via a plugin
Hi,
This is possible only in the Author mode (you can define custom actions and add them to the content completion window).
Could you elaborate a little bit? If you add to the content completion window elements which are not defined in the schema, the XML will not be valid after they are inserted.
Regards,
Radu
Let me see if I understand. You want to add additional entries to the usual content completion window which appears when Ctrl-Space is pressed.I am tying to add my own custom code-completion pop-up suggestions (the ones that show up via ctrl+space) via a plugin on the standalone version of Oxygen. I know this can be done through an XSD, but I would like to do it programmatically through a plugin. Is this possible?
This is possible only in the Author mode (you can define custom actions and add them to the content completion window).
Could you elaborate a little bit? If you add to the content completion window elements which are not defined in the schema, the XML will not be valid after they are inserted.
The pop-up customizer is used in the Author mode for the pop-up menu which appears when you right click in the Author page.I have seen some references to a pop-up customizer but this only seems to be for the Author view, and I want to be in Text view.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 3
- Joined: Sun Mar 24, 2013 9:33 pm
Re: Adding to the code completion pop-up via a plugin
Hi Radu.
Yes you understood correctly. This code completion suggestions would mainly be used for providing attribute names, based on other attributes in the document.(Not adding new invalid elements)
For example when specifying a reference to an elements 'id' attribute, the auto-complete would suggest the id's of previously defined elements. Ideally the plugin would then be extended to give suggestions based on other documents not open in the editor.
However it seems this is not possible, so I will see what can be done through XSD's.
Thanks
Yes you understood correctly. This code completion suggestions would mainly be used for providing attribute names, based on other attributes in the document.(Not adding new invalid elements)
For example when specifying a reference to an elements 'id' attribute, the auto-complete would suggest the id's of previously defined elements. Ideally the plugin would then be extended to give suggestions based on other documents not open in the editor.
However it seems this is not possible, so I will see what can be done through XSD's.
Thanks
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Adding to the code completion pop-up via a plugin
Hi,
So you have an attribute let's say called idref for which you want to propose values from other editors as well, right?
This can be done if you have a custom Document Type Association for your type of XML documents (and you probably have done this already).
http://www.oxygenxml.com/doc/ug-oxygen/ ... orial.html
In the Oxygen Preferences->"Document Type Association" if you edit the document type association, in the Extensions tab you can see a Content completion handler extension.
Such an implementation needs to be an extension of ro.sync.contentcompletion.xml.SchemaManagerFilter.
Such a filter can add to the list of possible values that will be presented for a certain attribute name.
Our Author SDK should have an example of this:
http://www.oxygenxml.com/oxygen_sdk.htm ... horing_SDK
Regards,
Radu
So you have an attribute let's say called idref for which you want to propose values from other editors as well, right?
This can be done if you have a custom Document Type Association for your type of XML documents (and you probably have done this already).
http://www.oxygenxml.com/doc/ug-oxygen/ ... orial.html
In the Oxygen Preferences->"Document Type Association" if you edit the document type association, in the Extensions tab you can see a Content completion handler extension.
Such an implementation needs to be an extension of ro.sync.contentcompletion.xml.SchemaManagerFilter.
Such a filter can add to the list of possible values that will be presented for a certain attribute name.
Our Author SDK should have an example of this:
http://www.oxygenxml.com/oxygen_sdk.htm ... horing_SDK
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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