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

Bug 365758

Summary: On Win7 checkbox Button.getSelection() is returning false even when checked
Product: [Eclipse Project] Platform Reporter: Curtis Windatt <curtis.windatt.public>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: major    
Priority: P3 CC: Michael_Rennie, Olivier_Thomann
Version: 3.7   
Target Milestone: 3.8 M4   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 365661, 365914    

Description Curtis Windatt CLA 2011-12-06 11:00:07 EST
PDE was investigating bug 365661 where an expected API Tools marker was not showing up. Olivier found that the root cause was that the builder and nature were not getting added to the project.  The nature is added when a new plug-in project is created and on the second wizard page "Enable API analysis" button is checked.

On Windows 7 boxes, using recent builds (I20111201-0855 for me) the nature is never enabled because calling Button.getSelection() always returns false.  This is called at org.eclipse.pde.ui PluginContentPage updateData() line 241

data.setEnableAPITooling(fApiAnalysisButton.isVisible() && fApiAnalysisButton.getSelection());

Trying on my Ubuntu box at the office I can't reproduce, but both Michael and Olivier can reproduce on Windows.
Comment 1 Curtis Windatt CLA 2011-12-06 11:06:08 EST
Olivier says that while debugging the isVisible() call returns false while getSelection() returns true (correctly).

Mike had said getSelection() was causing the problem for him.  Mike, can you please confirm.

I can't reproduce on my current machine to debug.
Comment 2 Olivier Thomann CLA 2011-12-06 11:12:35 EST
Closing as INVALID. The problem is in the PDE wizard itself where we make a call to the button when being on the next page. So in this case, the button is no longer visible.
The fix should be done as part of bug 365661.
Comment 3 Michael Rennie CLA 2011-12-06 11:17:41 EST
(In reply to comment #1)
> Olivier says that while debugging the isVisible() call returns false while
> getSelection() returns true (correctly).
> 
> Mike had said getSelection() was causing the problem for him.  Mike, can you
> please confirm.

When I debugged through, I saw that getSelection was always false and getVisible was always true