[oXygen-sdk] JTextArea#replaceRange in the editor does not seem to work
Adam Retter
adam.retter at googlemail.com
Thu Apr 7 23:32:41 CDT 2016
We have created a plugin for Oxygen that provides suggestions for the
values of various attributes.
However we want the ability to add a new value to our list of
suggestions from within the UI. I have been able to do this, by making
one of the suggested attribute values in the CIValue list "Add New..."
and then displaying a dialog box to the user when they select this
(i.e. detecting when it is written into the attribute value in the
document).
However, I then want to replace the attribute value (currently "Add
New...") with the actual value they entered into the document, I
believe that I am doing this correctly by calling
JTextArea#replaceRange, however after that call the attribute value in
the Oxygen editor window does not seem to change.
Here is the code where I call `replaceRange`:
https://github.com/adamretter/TEI-Authorizer/blob/master/src/main/java/org/humanistika/oxygen/tei/authorizer/TeiAuthorizer.java#L150
Any ideas why replaceRange doesn't work, or if there is a different
API I should be using to do this?
Cheers Adam.
--
Adam Retter
skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk
More information about the oXygen-sdk
mailing list