Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Eclipse 3.4 adding remote infocenter
Eclipse 3.4 adding remote infocenter [message #474608] Fri, 10 October 2008 19:11 Go to next message
David Kyle is currently offline David KyleFriend
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
Re: Eclipse 3.4 adding remote infocenter [message #474610 is a reply to message #474608] Fri, 10 October 2008 20:16 Go to previous message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
Yes you could do that - with multiple remote infocenters the preferences
are comma separated, see
org.eclipse.help.internal.base.remote.PreferenceFileHandler and
org.eclipse.help.internal.base.remote.RemoteIC for an example of code
that reads and writes these preferences.

David Kyle wrote:
> 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
>
>
Re: Eclipse 3.4 adding remote infocenter [message #620076 is a reply to message #474608] Fri, 10 October 2008 20:16 Go to previous message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
Yes you could do that - with multiple remote infocenters the preferences
are comma separated, see
org.eclipse.help.internal.base.remote.PreferenceFileHandler and
org.eclipse.help.internal.base.remote.RemoteIC for an example of code
that reads and writes these preferences.

David Kyle wrote:
> 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
>
>
Previous Topic:Idiots guide to adding Contextual Help
Next Topic:Eclipse help system
Goto Forum:
  


Current Time: Fri Apr 19 20:58:35 GMT 2024

Powered by FUDForum. Page generated in 0.02874 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top