selection plugin results to result pane?

Hi there, In a recent discussion with fellow TEI encoders who use oXygen as one of their XML editors, as one of the reasons *nat* to use oXygen was mentioned that in oXygen one can not use a selection to, for example trigger a database lookup with a result displayed in a result panel. Now, pondering this question, I was looking at the plugin types and wondered, if the SelectionPlugin could be used to develop something like this. However, according to the documentation, apparently the results of the Selection Plugin always go back and replace the selection, which is unwanted in this case. Also, it is not clear to me, if actions taken in the plugin could show their results in the result pane? Best, Christian -- Christian Wittern Institute for Research in Humanities, Kyoto University 47 Higashiogura-cho, Kitashirakawa, Sakyo-ku, Kyoto 606-8265, JAPAN

Hi Cristian, There is no support for triggering something in the result pane from a selection plugin. However, it is possible to have an external tool output in a specified format that will result in an entry in the result pane. We are considering also extending the plugin support in oXygen to allow more complex interactions between plugins and oXygen. It will be great if you can provide more details about the use case, what you actually want to solve, that will help us make sure that the extensions will cover also this. It may be possible also to solve easily your use case with other functionality currently provided by oXygen. For example if what you want the lookup for is to providing content completion proposals then that can be implemented as a content completion filter that receives the proposals oXygen want to present, the context and returns back an updated list of proposals. Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Christian Wittern wrote:
Hi there,
In a recent discussion with fellow TEI encoders who use oXygen as one of their XML editors, as one of the reasons *nat* to use oXygen was mentioned that in oXygen one can not use a selection to, for example trigger a database lookup with a result displayed in a result panel. Now, pondering this question, I was looking at the plugin types and wondered, if the SelectionPlugin could be used to develop something like this. However, according to the documentation, apparently the results of the Selection Plugin always go back and replace the selection, which is unwanted in this case. Also, it is not clear to me, if actions taken in the plugin could show their results in the result pane?
Best, Christian

Hi Cristian,
There is no support for triggering something in the result pane from a selection plugin. However, it is possible to have an external tool output in a specified format that will result in an entry in the result pane. But I guess in this case, I could not trigger this tool in a way that
Hi George, Thank you for your answer. George Cristian Bina wrote: the tool has access to the selection?
We are considering also extending the plugin support in oXygen to allow more complex interactions between plugins and oXygen. It will be great if you can provide more details about the use case, what you actually want to solve, that will help us make sure that the extensions will cover also this.
I think the classic use case is for a dictionary lookup. If somebody is translating something, or simply needs to look something up in a dictionary for the tagging, I would like to look this up in, for example an eXist database, with the result popping into the result pane. Of course, more complex interactions could be desirable, for example, what if I see a problem in the dictionary entry that is displayed there and would like to edit it?
It may be possible also to solve easily your use case with other functionality currently provided by oXygen. For example if what you want the lookup for is to providing content completion proposals then that can be implemented as a content completion filter that receives the proposals oXygen want to present, the context and returns back an updated list of proposals. I had thought about that, because another use case that prompted my question was the lookup of xml:id targets for a reference. In this case, the problem was that if I include the dictionary or reference list into the file and make it so available to oXygen, a simple list of targets is not useful without annotation, thus the idea to have the results show in the result pane. In this case, the follow up action would likely be to insert it into an attribute value, so maybe a completion would be more useful? But then one would need to think about how to provide the annotation and filtering there.
All the best, Christian -- Christian Wittern Institute for Research in Humanities, Kyoto University 47 Higashiogura-cho, Kitashirakawa, Sakyo-ku, Kyoto 606-8265, JAPAN

Hi Christian, Sorry for the delay but I hesitated to get into this. Probably I am more comfortable working on a more concrete task. You are right, an external tool will not see the selection. A selection plugin can display any GUI he wants. What would be the advantage of having those in the results pane versus a plugin provided window or dialog? If the plugin is implemented to allow the user to modify the information it presents I see no problem to allow the user to change some of the entries from the database - beu this needs to be implemented by that plugin. You may look for example at the Conversion plugin (contextual menu->Plugins->Conversion). That displays a dialog and allows the user to select different units of measure. Imagine that presents entries from an eXist database and it allows to also make changes in the database. A content completion filter is an interesting extension and it can provide also annotations to the offered values. The annotations are presented next to the content completion window when a value is selected. This filter class receives the context the content completion is invoked in and the list of proposals oXygen is about to display. It should return the same or an updated list of proposals (adding, modifying or deleting entries). Each proposal is represented by a content completion item that contains mainly what will be inserted in the document, what will be rendered in the content completion window and the annotations that will be rendered next to a selected proposal. You can use this extension to provide ID values as what will be inserted, then you can either provide also the values as what will be rendered in the completion list or some short descriptions if you have such info, then as annotations provide the complete descriptions of the entries. Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Christian Wittern wrote:
Hi George,
Thank you for your answer.
Hi Cristian,
There is no support for triggering something in the result pane from a selection plugin. However, it is possible to have an external tool output in a specified format that will result in an entry in the result pane. But I guess in this case, I could not trigger this tool in a way that
George Cristian Bina wrote: the tool has access to the selection?
We are considering also extending the plugin support in oXygen to allow more complex interactions between plugins and oXygen. It will be great if you can provide more details about the use case, what you actually want to solve, that will help us make sure that the extensions will cover also this.
I think the classic use case is for a dictionary lookup. If somebody is translating something, or simply needs to look something up in a dictionary for the tagging, I would like to look this up in, for example an eXist database, with the result popping into the result pane. Of course, more complex interactions could be desirable, for example, what if I see a problem in the dictionary entry that is displayed there and would like to edit it?
It may be possible also to solve easily your use case with other functionality currently provided by oXygen. For example if what you want the lookup for is to providing content completion proposals then that can be implemented as a content completion filter that receives the proposals oXygen want to present, the context and returns back an updated list of proposals. I had thought about that, because another use case that prompted my question was the lookup of xml:id targets for a reference. In this case, the problem was that if I include the dictionary or reference list into the file and make it so available to oXygen, a simple list of targets is not useful without annotation, thus the idea to have the results show in the result pane. In this case, the follow up action would likely be to insert it into an attribute value, so maybe a completion would be more useful? But then one would need to think about how to provide the annotation and filtering there.
All the best,
Christian

Dear George, Thanks for your answer anyway. George Cristian Bina wrote:
A selection plugin can display any GUI he wants. What would be the advantage of having those in the results pane versus a plugin provided window or dialog? If the plugin is implemented to allow the user to modify the information it presents I see no problem to allow the user to change some of the entries from the database - beu this needs to be implemented by that plugin. I guess the main reason to re-use the result pane would be that it is working so well and a Oxygen user is used to it. But I agree that a separate GUI window could also work. I have to give it some thought.
A content completion filter is an interesting extension and it can provide also annotations to the offered values. The annotations are presented next to the content completion window when a value is selected. This filter class receives the context the content completion is invoked in and the list of proposals oXygen is about to display. It should return the same or an updated list of proposals (adding, modifying or deleting entries). Each proposal is represented by a content completion item that contains mainly what will be inserted in the document, what will be rendered in the content completion window and the annotations that will be rendered next to a selected proposal. You can use this extension to provide ID values as what will be inserted, then you can either provide also the values as what will be rendered in the completion list or some short descriptions if you have such info, then as annotations provide the complete descriptions of the entries. This would be a useful extension to the current way, I think. Are there plans to actually implement this?
Christian -- Christian Wittern Institute for Research in Humanities, Kyoto University 47 Higashiogura-cho, Kitashirakawa, Sakyo-ku, Kyoto 606-8265, JAPAN

Dear Christian, The content completion filter extension is already implemented as I described it below. Sorry if that was not clear. The starting point for development resources is http://www.oxygenxml.com/developer.html You need to get the oXygen Author SDK: http://www.oxygenxml.com/InstData/Editor/Developer/oxygenAuthorSDK.zip There you have the API including the source code and a sample framework that shows implementations of the API, also with the source code. The interface for this extension is SchemaManagerFilter. Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Christian Wittern wrote:
Dear George,
Thanks for your answer anyway. George Cristian Bina wrote:
A selection plugin can display any GUI he wants. What would be the advantage of having those in the results pane versus a plugin provided window or dialog? If the plugin is implemented to allow the user to modify the information it presents I see no problem to allow the user to change some of the entries from the database - beu this needs to be implemented by that plugin. I guess the main reason to re-use the result pane would be that it is working so well and a Oxygen user is used to it. But I agree that a separate GUI window could also work. I have to give it some thought.
A content completion filter is an interesting extension and it can provide also annotations to the offered values. The annotations are presented next to the content completion window when a value is selected. This filter class receives the context the content completion is invoked in and the list of proposals oXygen is about to display. It should return the same or an updated list of proposals (adding, modifying or deleting entries). Each proposal is represented by a content completion item that contains mainly what will be inserted in the document, what will be rendered in the content completion window and the annotations that will be rendered next to a selected proposal. You can use this extension to provide ID values as what will be inserted, then you can either provide also the values as what will be rendered in the completion list or some short descriptions if you have such info, then as annotations provide the complete descriptions of the entries. This would be a useful extension to the current way, I think. Are there plans to actually implement this?
Christian
participants (2)
-
Christian Wittern
-
George Cristian Bina