| Summary: | [Help] plugin_customization.ini for help doesn't take effect with CDT(?) | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Miwako Tokugawa <miwako.tokugawa> |
| Component: | User Assistance | Assignee: | Jim Perry <perryja> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | cgold, dj.houghton, dremond |
| Version: | 4.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | stalebug | ||
If you are using the "-pluginCustomization <filepath>" command line argument, then the filepath is interpreted to be relative to the directory that Eclipse was started from. (usually the Eclipse install directory) http://help.eclipse.org/helios/topic/org.eclipse.platform.doc.user/tasks/running_eclipse.htm Otherwise if you are specifying a product customization file via the product declaration in the plugin.xml, then the file (in your case plugin_customization.ini) must be in the primary feature's plug-in install directory. Here is an old document that briefly explains the order that default preferences are calculated: http://eclipse.org/eclipse/platform-core/documents/user_settings/plugin_customization.html Hi. Thank you very much for taking a look. I tried the relative path but it did not solve my problem. I can't access the remote help, and preferences->help->content is set to "Include local help only" 1 >cat ./plugins/com.intel.compiler.cdt_7.0.0/plugin_customization.ini org.eclipse.help.base/remoteHelpOn = true org.eclipse.help.base/remoteHelpHost = localhost org.eclipse.help.base/remoteHelpPath = /help org.eclipse.help.base/remoteHelpUseDefaultPort = false org.eclipse.help.base/remoteHelpPort = 8081 2 >cat startEclipse ./eclipse -pluginCustomization ./plugins/com.intel.compiler.cdt_7.0.0/plugin_customization.ini -clean -data runtime -showlocation -vm /export/users/mtokugaw/jre1.6.0_17/bin/java -vmargs -Xmx758M I looked at DefaultPreferences.class in the debugger.
applyDefaults (called from applyCommandLineDefaults) does correctly read in the file and the fields (key,value,localQualifier), but
If (name().equals(localQualifier)) { ..}
is never executed.
I am unable to reproduce this problem locally. I tried using both a relative path and an absolute path as an argument to the command-line option and both times the preference was applied correctly and when I opened the Help it showed the local server with the correct port, etc. I'm not sure what is happening if you say that lines of code are not being executed when you step through them in the debugger. I stepped through them and on my machine everything looks ok. Depending on how the Help team stores its preferences, this may effect whether or not the values are stored. The values that you are trying to set are default values, which means if there already exists another value then you wont' see the defaults in the preferences. Take a look in the <workspace>/.metadata/.plugins/org.eclipse.core.runtime/.settings/ folder. If there is an org.eclipse.help.base file already there, then it means that you have over-ridden some preferences via the UI and you won't see the defaults when you go into the dialog. Hi.
I tried again and it still doesn't work. I am able to display the remote help only if I use Window->Preferences.
> Take a look in the
> <workspace>/.metadata/.plugins/org.eclipse.core.runtime/.settings/ folder. If
> there is an org.eclipse.help.base file already there,
org.eclipse.help.base.prefs is there but not org.eclipse.help.base.
The former original has
eclipse.preferences.version=1
scope=
and
remoteHelpICEnabled=
remoteHelpOn=false
remoteHelpHost=
remoteHelpPath=
remoteHelpName=
remoteHelpPort=
remoteHelpProtocol=
remoteHelpPreferred=false
eclipse.preferences.version=1
scope=
after I set the values in Window->Preferences, then reset to the original and exit.
Ok, I've taken another look at this from the Help side. When you hit "Restore defaults" rather than clearing the values altogether, they are being set to copies of the default values. This is what looks like is happening: - start up initially with no defaults and nothing set - go into the preferences, notice nothing is set - hit OK --> At this point the code copies the default values (empty strings) to the "per workspace" (instance) preference location. (the file I pointed you to earlier) - restart Eclipse and specify the plug-in customization file for defaults - open preferences - notice nothing is set - hit Restore Defaults - suddenly the dialog is populated with your values - hit OK --> the instance preferences are now being written out and the values are the same as the defaults This explains why setting the customized values worked for me (new workspace, started up for the first time) but didn't work for you. (most likely an old workspace, not initial startup) Moving to Platform/UA for comment. It almost seems like the defaults are being used incorrectly and as a method for specifying additional values. (I think you always want to add the default list of servers to your list no matter what?) Jim, can you take a look at this? In the configuration folder of your app, open the config.ini. Do you have the eclipse.product value set correctly? This is how eclipse knows the product to load: eclipse.product=PLUGINID.PRODUCTID The PLUGINID is the id of the plugin as in the Manifest The PRODUCT ID is the id of your product (ide) example eclipse.product=com.example.xyz.ide Make sure this value is there. Then, verify you have these settings in your plugincustomization.ini - as it appears you do. org.eclipse.help.base/remoteHelpOn=true org.eclipse.help.base/remoteHelpName=Collaborative Lifecycle Management Help org.eclipse.help.base/remoteHelpHost=jazz.net org.eclipse.help.base/remoteHelpPath=/help-dev/rational-team-concert org.eclipse.help.base/remoteHelpUseDefaultPort=false org.eclipse.help.base/remoteHelpPort=443 org.eclipse.help.base/remoteHelpICEnabled=true If this does not work, then it is likely that Eclipse is not loading your plugin_customization.ini values. You can try another value to check this, such as productName: org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP=true If your product plugin is working correctly, then you should be able to toggle the progress bar behavior. IF this does not work, then the issue is with your product pluin. I looked into this a bit...
Seems that in Eclipse 422,
HelpContentPreferencePage changed quite a bit.
RemoteICViewer and RemoteICContentProvider and RemoteICList are gone.
In eclipse 3.x,
RemoteICList was pretty smart and would read the default (or current) preferences
and your remote help info would show up in the table when you opened
Preferences > Help > Content (in a brand new workspace)
In eclipse 422, it seems that the only time the
HelpContentPreference page will try to read the default preferences
(originally specified in plugin_customization.ini)
is if the user presses [Restore Defaults].
NOTE: Even though your default remote help preferences do not get
properly shown in the Preferences dialog, they are actively present, and opening
Help > Content from your product's main menu will open the Help application, and your remote or local content will be present.
One possible workaround (for the Help > Content preference page), is to perform the following code ONCE per new workspace:
*These classes are in org.eclipse.help.ui
(Use a unique preference store value to tell you if you've done this
work in this workspace at least once )
//get the info center entries that have been serialized by Help > Content page
List<IC> currentICs = ICPreferences.getICs();
//
// Look through this list to see if your remote help entry is there..
// If NOT, then do the following
//gets the values from plugin_customization.ini that were serialized in //DefaultPreferences
List<IC> defaultICs = ICPreferences.getDefaultICs();
if ( (null!=defaultICs) && (!defaultICs.isEmpty()) ) {
//serialize them in the ICPreference fashion.
ICPreferences.setICs(defaultICs);
}//if
If you put this code, let's say, in the perspective class of your product, then
it will only be executed ONCE in a brand new workspace, or everytime you
select Reset Perspective.
Additionally, if you have a unique preference in a preference store that
you use to ensure you only do this work ONCE (per new workspace), then it will only ever be executed once.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Build Identifier: 20100617-1415 (Version: Helios Release) I tried setting help preferences using plugin_customization.ini and it doesn’t seem to be working. 1. My product plug-in (x.y.z) has <extension id="ide" point="org.eclipse.core.runtime.products"> <product application="x.y.z.workbench" .. > <property name="preferenceCustomization" value="plugin_customization.ini"/> plugin_customization.ini is in eclipse/plugins/x.y.z_7.0.0 and has org.eclipse.help.base/remoteHelpOn = true org.eclipse.help.base/remoteHelpHost = localhost org.eclipse.help.base/remoteHelpPath = /help org.eclipse.help.base/remoteHelpUseDefaultPort = false org.eclipse.help.base/remoteHelpPort = 8081 4. I start eclipse with Eclipse –pluginCustomization .. (I’m not sure if I need this flag) If I set the same values in Windows->Preferences, everything works and the remote help is pulled in. But, doing this through plugin_customization.ini doesn’t seem to work. I’m using CDT. This may be a possible user error but I've been looking for info anywhere for a while and don't know what I may be doing wrong. Your attention is appreciated. Reproducible: Always