access project history from wsaccess plugin

Post here questions and problems related to oXygen frameworks/document types.
bk-one
Posts: 13
Joined: Mon Oct 23, 2017 3:42 pm

access project history from wsaccess plugin

Post by bk-one »

hi again,

another question regarding wsaccess plugins:
is it possible to access the project history displayed in the project view?
i guess it would be a method in the ProjectController Interface (https://www.oxygenxml.com/InstData/Edit ... lugin.html)

best wishes,
barbara
Radu
Posts: 9058
Joined: Fri Jul 09, 2004 5:18 pm

Re: access project history from wsaccess plugin

Post by Radu »

Hi Barbara,

So you want access to the last set of opened project resources? I'm afraid we don't have this API.
Can you give me more details about your use case?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bk-one
Posts: 13
Joined: Mon Oct 23, 2017 3:42 pm

Re: access project history from wsaccess plugin

Post by bk-one »

hi radu,

thanks for your response. no problem. i guess it's rather curiosity while exploring the plugin possibilities than an actual need :-)

the use case would be allowing users to set plugin options from a custom preferences page for multiple projects that they are constantly using.
it would be similiar to the Data Sources Preferences (something like Projects Preferences).

best wishes,
barbara
Radu
Posts: 9058
Joined: Fri Jul 09, 2004 5:18 pm

Re: access project history from wsaccess plugin

Post by Radu »

Hi Barbara,

One thing which may help with this use case would be to use this API:

https://www.oxygenxml.com/InstData/Edit ... a.net.URL-

to expand the "${pd}" editor variable and find out what the current opened project is.
In this way, when you want to use a certain setting, you can find out what the current project is and maybe obtain the setting which was saved mapped to the current project file location.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bk-one
Posts: 13
Joined: Mon Oct 23, 2017 3:42 pm

Re: access project history from wsaccess plugin

Post by bk-one »

thanks radu,

is there some listener i can use if the editorvariables are changing i.e. if a new project is selected?

best wishes,
barbara
sorin_carbunaru
Posts: 402
Joined: Mon May 09, 2016 9:37 am

Re: access project history from wsaccess plugin

Post by sorin_carbunaru »

Hello Barbara,

No, we don't have that kind of API yet, but I've just added a feature request on our side (EXM-42688, for reference purposes).

Could you tell us some more details about what you are trying to do if you detect that the current project has changed? Perhaps we can find a workaround :).

All the best wishes,
Sorin Carbunaru
oXygen XML
sorin_carbunaru
Posts: 402
Joined: Mon May 09, 2016 9:37 am

Re: access project history from wsaccess plugin

Post by sorin_carbunaru »

Hello,

Just wanted to let you all know that oXygen 21.1 was just released a few hours ago and we added the following API methods:
- ro.sync.exml.workspace.api.standalone.project.ProjectChangeListener (that has a "void projectChanged(URL oldProjectURL, URL newProjectURL)" method)
- ro.sync.exml.workspace.api.standalone.project.ProjectController.addProjectChangeListener(ProjectChangeListener)
- ro.sync.exml.workspace.api.standalone.project.ProjectController.removeProjectChangeListener(ProjectChangeListener)
- ro.sync.exml.workspace.api.standalone.project.ProjectController.getCurrentProjectURL()

Best wishes,
Sorin Carbunaru
oXygen XML
Post Reply