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

Bug 224568

Summary: [Preferences] Preferences dialog fails to create hierarchy if category referenced before declared
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: UIAssignee: Kim Horne <eclipse>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: bokowski, francisu
Version: 3.4   
Target Milestone: 3.4 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch against org.eclipse.ui.workbench none

Description Markus Keller CLA 2008-03-28 07:45:32 EDT
I20080327-2251

The issue reported in bug 224566 turned out to be a regression in the platform. The tk.eclipse.plugin.htmleditor (2.0.5.1) plug-in contributes preference pages like this:

<extension
      point="org.eclipse.ui.preferencePages">
   <page
         class="tk.eclipse.plugin.htmleditor.HTMLEditorPreferencePage"
         name="%plugin.preference.category"
         id="tk.eclipse.plugin.htmleditor.category"/>
   <page
         class="tk.eclipse.plugin.htmleditor.CustomAssistPreferencePage"
         category=
"tk.eclipse.plugin.htmleditor.category/tk.eclipse.plugin.htmleditor.AssistPreferencePage"
         name="%plugin.preference.customassist"
         id="tk.eclipse.plugin.htmleditor.CustomAssistPreferencePage"/>
   <page
         class="tk.eclipse.plugin.htmleditor.AssistPreferencePage"
         category="tk.eclipse.plugin.htmleditor.category"
         name="%plugin.preference.codeassist"
         id="tk.eclipse.plugin.htmleditor.AssistPreferencePage"/>

This works fine in 3.4M5 ("tk.eclipse.plugin.htmleditor.CustomAssistPreferencePage" shows up inside "tk.eclipse.plugin.htmleditor.AssistPreferencePage"), but it fails in the current build with the CustomAssistPreferencePage showing up as top-level preference page and this log entry:

!ENTRY org.eclipse.ui 4 4 2008-03-28 12:06:57.921
!MESSAGE Invalid preference page path: Amateras/Code Assist/Custom Assist
Comment 1 Tod Creasey CLA 2008-03-28 08:57:46 EDT
Likely a result of the dynamic work done in M6.
Comment 2 Kim Horne CLA 2008-03-28 11:04:26 EDT
Created attachment 93976 [details]
Patch against org.eclipse.ui.workbench

patch that adds deferral for parenting for nodes that are out of order.  I didn't want to insert the sorting code again given that we were trying so hard to be rid of it.
Comment 3 Francis Upton IV CLA 2008-03-28 11:24:01 EDT
Verified the patch fixes the problem as described (custom assist now appears under code assist)
Comment 4 Francis Upton IV CLA 2008-03-28 11:53:33 EDT
See bug 224653 for the refactoring opportunity here.
Comment 5 Boris Bokowski CLA 2008-03-28 11:55:50 EDT
+1 - reviewed the patch with Kim.
Comment 6 Kim Horne CLA 2008-03-28 15:00:38 EDT
Fix in HEAD.  Should be in I20080328-1400
Comment 7 Boris Bokowski CLA 2008-03-28 22:50:36 EDT
Verified using I20080328-1410 on Windows XP. I would appreciate if someone else could verify this independently.
Comment 8 Francis Upton IV CLA 2008-03-28 23:40:26 EDT
Verified with the tk HTML editor on I20080328-1410 in Linux.
Comment 9 Boris Bokowski CLA 2008-03-28 23:58:29 EDT
thanks!