Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 52515

Summary: JDT Debug does not honour plugin customization settings
Product: [Eclipse Project] Platform Reporter: Wassim Melhem <wassim.melhem>
Component: ResourcesAssignee: DJ Houghton <dj.houghton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: darin.eclipse, dj.houghton, gunnar, jared_burns, jeffmcaffer, n.a.edgar, pascal, pcinat
Version: 3.0   
Target Milestone: 3.0 M9   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Wassim Melhem CLA 2004-02-19 13:11:20 EST
Build: I-20040219

In the Eclipse install, add the following line to the plugin_customization.ini 
file found under <eclipse_install>/plugins/org.eclipse.platform_3.0.0:

org.eclipse.jdt.debug/org.eclipse.jdt.debug.PREF_REQUEST_TIMEOUT=30001

Start Eclipse on a new workspace.

Go to the Java > Debug preference page, the value of timeout is still 3000.
Comment 1 Jared Burns CLA 2004-02-20 23:43:11 EST
I've never even heard of this file. Is it supposed to override your preference 
settings? Even if you have different settings in the workspace? What does it do 
under the covers and how can a plug-in (like ours) possibly screw it up? So many 
questions... :-)
Comment 2 Jared Burns CLA 2004-02-20 23:55:08 EST
I could still use answers to my questions, but I poked at it a bit just for 
grins. I added the preference setting line as specified in the bug description 
and then set a breakpoint in the startup of our JDIDebugPlugin, where we set the 
preference's default value.

By doing an evaluation, I'm able to see that the preference's default value 
hasn't been set by the platform before the startup method is called (the value 
is 0, not 30001), so it at least looks like we're not responsible for 
overwriting the preference value. The preferences "normal value" (the one you 
get from getPluginPreferences().getInt(String)) is also not set at startup. It's 
0 too.
Comment 3 Wassim Melhem CLA 2004-02-21 00:40:54 EST
From the online Help:

The plugin_customization.ini file is used to set the default preference values 
for preferences defined by other plug-ins.  This file is a java.io.Properties 
format file. Typically this file is used to set the values for preferences 
that are published as part of a plug-in's public API.  That is, you are taking 
a risk if you refer to preferences that are used by plug-ins but not defined 
formally in the API.  

One common customization is to set the default perspective for the workbench.  
This preference is defined in the org.eclipse.ui plug-in.   The following 
example assumes that the product should be launched with the resource 
perspective as the default perspective.

org.eclipse.ui/defaultPerspectiveId=org.eclipse.ui.resourcePerspective
If you discover you need to change the default value for one of another plug-
in's preferences, consult the API documentation for that plug-in to see if the 
preference is considered public.

The plugin_customization.properties file contains translated strings for the 
plugin_customization.ini file.

Comment 4 Wassim Melhem CLA 2004-02-21 00:44:32 EST
In 2.1.2, setting the default perspective preference in the 
plugin_customization.ini works, but setting the JDT debug preference does not.

In 3.0 M7, neither one works.

I don't think this is a JDT problem, but rather a Core problem.

cc DJ for comment, as I know he is currently working on preferences.
Also cc'ing our good friend Jeff, because I like to bug him.
Comment 5 Wassim Melhem CLA 2004-03-01 23:46:16 EST
Where, oh where, is DJ?
Comment 6 DJ Houghton CLA 2004-03-02 11:31:01 EST
Oh he's here...he's just hiding. :-)

The code in InternalPlatform.applyPrimaryFeaturePluginDefaultOverrides seems to
have been accidentally removed during the integration of the new runtime. 

Moving to Equinox/General. Adding PR to CC list.

It seems strange that it works for one user setting in 2.1.2 but not the other...
Comment 7 Jeff McAffer CLA 2004-03-02 11:53:14 EST
Assigning to DJ assuming he will fix this when he releases the new prefs stuff?
Comment 8 DJ Houghton CLA 2004-04-26 15:25:26 EDT
Fixed code to allow for primary feature plug-in overrides.
The specific problem with the jdt.debug prefs not being able to be over-ridden
is covered by bug 59481.