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

Bug 360329

Summary: exception thrown when parsing a visual inheritance subclass of a parent that contains a menu with protected getters for menu items
Product: z_Archived Reporter: Clarkb <clarkb>
Component: WindowBuilderAssignee: Konstantin Scheglov <Konstantin.Scheglov>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: clayberg
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Parent class
none
Child class
none
Stack Trace prome parsing error none

Description Clarkb CLA 2011-10-08 13:49:00 EDT
Build Identifier: 20110916-0149

Windows builder is not able to parse a subclass of parent class that contains a menu with accessible items. A very simple self contained and COMPILABLE example has been included in this report.

Reproducible: Always

Steps to Reproduce:
1.open MidlevelJobPanel.java
2.switch to design mode

This bug is a serious issue for us and is preventing us from using WB to maintain a codebase that has been developed for over 10 years (the last several years using WindowsBuilderPro)
Comment 1 Clarkb CLA 2011-10-08 13:51:42 EDT
Created attachment 204807 [details]
Parent class

Toplevel class containing a menu
Comment 2 Clarkb CLA 2011-10-08 13:53:07 EDT
Created attachment 204808 [details]
Child class

When opening the child and switching to design mode, and index out of bounds exception is thrown
Comment 3 Clarkb CLA 2011-10-08 13:56:36 EDT
Created attachment 204809 [details]
Stack Trace prome parsing error
Comment 4 Clarkb CLA 2011-10-08 13:59:02 EDT
This is a second attempt to compile a report for this bug. The evaluator should not have any difficulty reproducing the problem because the example test case is very simple.
Comment 5 Eric Clayberg CLA 2011-10-08 21:31:05 EDT
Reproduced using test case.
Comment 6 Clarkb CLA 2011-10-10 20:59:47 EDT
I performed some additional testing and observed the following:
1) If a menu item is exposed to the child by making the getter method public or protected, the WB parser throws an exception
2) if the getter is set to private (which of course is useless), then the exception is not thrown
3) If the getter method is removed the exception is not trhpwn

4) if the menuItem itself is changed from protected to private and the the getter method is protected or public, the exception is NOT thrown.

I am now able to work around this bug with simple changes to my code so it's now a lower priority for me.
Comment 7 Konstantin Scheglov CLA 2011-11-15 12:41:01 EST
Fixed in trunk.
Now we will create model only for one way (first method) of exposing same object.