Eclipse 3.4 adding remote infocenter [message #620074] |
Fri, 10 October 2008 19:11 |
David Kyle Messages: 125 Registered: July 2009 |
Senior Member |
|
|
Hi,
Our RCP application needs to add a dynamic remote infocenter, we have to use
an existing configuration system hence the calls to CfgInfo (our code).
Our current method is:
// accessing a discouraged internal class
Preferences preferences =
HelpBasePlugin.getDefault().getPluginPreferences();
try {
preferences.setDefault(IHelpBaseConstants.P_KEY_REMOTE_HELP_ ON,
true);
preferences.setDefault(IHelpBaseConstants.P_KEY_REMOTE_HELP_ DEFAULT_PORT,
false);
preferences.setDefault(IHelpBaseConstants.P_KEY_REMOTE_HELP_ HOST,
CfgInfo.getValue(ICfgInfoConstants.SECTION_IPE,
ICfgInfoConstants.TAG_REMOTE_HELP_HOST));
preferences.setDefault(IHelpBaseConstants.P_KEY_REMOTE_HELP_ PATH,
CfgInfo.getValue(ICfgInfoConstants.SECTION_IPE,
ICfgInfoConstants.TAG_REMOTE_HELP_PATH));
preferences.setDefault(IHelpBaseConstants.P_KEY_REMOTE_HELP_ PORT,
CfgInfo.getValue(ICfgInfoConstants.SECTION_IPE,
ICfgInfoConstants.TAG_REMOTE_HELP_PORT));
preferences.setValue(IHelpBaseConstants.P_KEY_REMOTE_HELP_ON ,
true);
preferences.setValue(IHelpBaseConstants.P_KEY_REMOTE_HELP_DE FAULT_PORT,
false);
preferences.setValue(IHelpBaseConstants.P_KEY_REMOTE_HELP_IC Enabled,
true);
preferences.setValue(IHelpBaseConstants.P_KEY_REMOTE_HELP_HO ST,
CfgInfo.getValue(ICfgInfoConstants.SECTION_IPE,
ICfgInfoConstants.TAG_REMOTE_HELP_HOST));
preferences.setValue(IHelpBaseConstants.P_KEY_REMOTE_HELP_PA TH,
CfgInfo.getValue(ICfgInfoConstants.SECTION_IPE,
ICfgInfoConstants.TAG_REMOTE_HELP_PATH));
preferences.setValue(IHelpBaseConstants.P_KEY_REMOTE_HELP_PO RT,
CfgInfo.getValue(ICfgInfoConstants.SECTION_IPE,
ICfgInfoConstants.TAG_REMOTE_HELP_PORT));
} catch (Exception e) {
log.error(e.getMessage(), e);
}
Not pretty but it works in Eclipse 3.3 and it appears to work in Eclipse
3.4. Now that Eclipse 3.4 can handle multiple remote infocenters is there a
way to add one programmatically?
Thanks,
David Kyle
|
|
|
Powered by
FUDForum. Page generated in 0.03044 seconds