get applied document filter

Post here questions and problems related to oXygen frameworks/document types.
cditcher
Posts: 29
Joined: Thu Jun 21, 2012 6:47 pm
Location: Victoria BC, Canada

get applied document filter

Post by cditcher »

Is there a way to retrieve a reference to an applied Document Filter?

For example I have applied a filter as such:

Code: Select all

AuthorAccess.getDocumentController().setDocumentFilter(new MyDocumentFilter());
Let's say that in my implementation of DocumentFilter I have added some type of getter / setter methods that I would like to use (This is hypothetical at this point). Is there a method somewhere that I can retrieve my filter after it has been set, something like

Code: Select all

AuthorAccess.getDocumentController().getDocumentFilter();
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: get applied document filter

Post by Radu »

Hi,

We do not have the getter function for this I'm afraid, but we'll consider adding it.
As workarounds if those methods are utility methods you can make them static. Or you can keep a reference on your side of the code to the filter you have created and set.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
cditcher
Posts: 29
Joined: Thu Jun 21, 2012 6:47 pm
Location: Victoria BC, Canada

Re: get applied document filter

Post by cditcher »

Thanks again for the advice Radu. I have kept a reference on my side as you suggested, so I guess a getter method would be handy, but not entirely necessary.
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: get applied document filter

Post by Radu »

Hi,

Based on your feedback we added this getter method and it will be available in Oxygen 15.2 (probably beginning of 2014).

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
cditcher
Posts: 29
Joined: Thu Jun 21, 2012 6:47 pm
Location: Victoria BC, Canada

Re: get applied document filter

Post by cditcher »

Great, thanks Radu!
Post Reply