ro.sync.ecss.extensions.api.AuthorAccess in the ro.sync.ecss.extensions.api.StylesFilter

<oXygen/> general issues.
SSC
Posts: 206
Location: Hamburg, Germany

ro.sync.ecss.extensions.api.AuthorAccess in the ro.sync.ecss.extensions.api.StylesFilter

Tue Mar 05, 2013 4:35 pm

Hello,

in our Eclipse embedded ro.sync.ecss.extensions.api.StylesFilter we use the localization mechanism of Eclipse.
Now we also got customers, who use the standalone version of the oXygen Author and should also use our custom StyleFilter, where some localization is necessary.
In this case we came up with the idea to use your localization mechnism, but in order to gain access to it we need AuthorAccess or something similar.

Is it somehow possible to gain access to the AuthorAccess instance inside a StylesFilter?
Or do you have any other suggestions?

Best regards,

Simon
Simon Scholz
vogella GmbH
http://www.vogella.com
Radu
Posts: 5749

Re: ro.sync.ecss.extensions.api.AuthorAccess in the ro.sync.ecss.extensions.api.StylesFilter

Tue Mar 05, 2013 5:34 pm

Hi Simon,

Adding some connection between the StylesFilter and the AuthorAccess is already logged in as an improvement request (after our discussion at the Frankfurt Oxygen Users Meeting) but I could not find a decent way to operate the change. We'll keep digging and if we manage to come up with a fix I'll update this forum post.

What you could do from the StylesFilter would be to gain static access to the PluginWorkspace like:

Code: Select all

ro.sync.exml.workspace.api.PluginWorkspaceProvider.getPluginWorkspace()


Then you could check if the standalone or eclipse version is running for example:

Code: Select all

ro.sync.exml.workspace.api.Workspace.isStandalone()


or you could look where the frameworks folder is located:

Code: Select all

ro.sync.exml.workspace.api.util.UtilAccess.expandEditorVariables("${frameworksDir}", null)


You could use it and the name of your custom framework to construct a file path which leads to the XML file which translates the messages, parse the XML and build your own map of translations.
This should be done only once because the StylesFilter gets called a lot.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 5749

Re: ro.sync.ecss.extensions.api.AuthorAccess in the ro.sync.

Fri Dec 06, 2013 10:28 am

Hi Simon,

In Oxygen 15.2 which we plan to release at the beginning of 2014 we plan to offer a feature which should fix this localization problem you previously had.
Basically all the static text (including the text you set via the styles filter) will be passed through our localization support. So if from the StylesFilter side you set a StringContent with text like ${i18n(delete.table.column_description)}, Oxygen will take the text value and try expand the delete.table.column_description key to a value mapped in the translation XML file located at framework level. So Oxygen will render in the Author visual mode the expanded value of the static text.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 5749

Re: ro.sync.ecss.extensions.api.AuthorAccess in the ro.sync.ecss.extensions.api.StylesFilter

Thu Apr 06, 2017 2:53 pm

Hi,

Just to update this thread, with Oxygen 19, if your StylesFilter implementation implements also ro.sync.ecss.extensions.api.AuthorExtensionStateListener, our code will automatically pass the AuthorAccess to it.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “Other Issues”

Who is online

Users browsing this forum: No registered users and 1 guest