Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365758 - On Win7 checkbox Button.getSelection() is returning false even when checked
Summary: On Win7 checkbox Button.getSelection() is returning false even when checked
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 3.8 M4   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 365661 365914
  Show dependency tree
 
Reported: 2011-12-06 11:00 EST by Curtis Windatt CLA
Modified: 2011-12-07 10:39 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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