Configuration changes event ?
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Configuration changes event ?
Hi Vincent,
We do not have such callbacks, does the client change the HTTP proxy configuration from inside Oxygen or from the operating system?
Regards,
Radu
We do not have such callbacks, does the client change the HTTP proxy configuration from inside Oxygen or from the operating system?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 64
- Joined: Wed Dec 03, 2014 11:25 am
Re: Configuration changes event ?
Hi Radu,
Our plugin load the HTTP proxy configuration from inside Oxygen.
If the settings are modified from preferences pages, we need to restart oXygen to force rebuild the HTTP client and load the new settings.
If an event or callback was sent, we could intercept it to rebuild the client without restarting oXygen.
Thx
Our plugin load the HTTP proxy configuration from inside Oxygen.
If the settings are modified from preferences pages, we need to restart oXygen to force rebuild the HTTP client and load the new settings.
If an event or callback was sent, we could intercept it to rebuild the client without restarting oXygen.
Thx
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Configuration changes event ?
Hi,
Maybe you can try something like:
Regards,
Radu
Maybe you can try something like:
Code: Select all
PluginWorkspaceProvider.getPluginWorkspace().addGlobalOptionListener(new OptionListener() {
@Override
public void optionValueChanged(OptionChangedEvent event) {
if(event.getOptionKey() != null && event.getOptionKey().startsWith("http.proxy")) {
//Proxy setting changed
}
}
});
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Configuration changes event ?
Hi,
Could you tell me exactly what setting you changed in the Oxygen Preferences->"Network Connection Settings / Proxy" page to see if change events are received in the plugin? I could try to test this on my side.
Regards,
Radu
Could you tell me exactly what setting you changed in the Oxygen Preferences->"Network Connection Settings / Proxy" page to see if change events are received in the plugin? I could try to test this on my side.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Configuration changes event ?
Hi Vincent,
I tested on my side and the code should look something like this:
So you need to add a separate option listener for each Oxygen specific option key related to the proxy.
If you change multiple fields in the preferences, you will receive notifications for each of the changed values.
Regards,
Radu
I tested on my side and the code should look something like this:
Code: Select all
String[] proxyKeys = new String[] {
"http.proxy.direct",
"http.proxy.system",
"http.proxy.set",
"http.proxy.manual",
"http.proxy.port",
"http.proxy.host",
"http.proxy.user",
"http.proxy.password",
};
for (int i = 0; i < proxyKeys.length; i++) {
PluginWorkspaceProvider.getPluginWorkspace().addGlobalOptionListener(new OptionListener(proxyKeys[i]) {
@Override
public void optionValueChanged(OptionChangedEvent event) {
System.err.println(event.getOptionKey());
}
});
}
If you change multiple fields in the preferences, you will receive notifications for each of the changed values.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service