Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334865 - Save action in main toolbar is not enabled after Organize Imports
Summary: Save action in main toolbar is not enabled after Organize Imports
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 3.7 M5   Edit
Assignee: Scott Kovatch CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-20 04:52 EST by Markus Keller CLA
Modified: 2011-01-25 06:03 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 Markus Keller CLA 2011-01-20 04:52:16 EST
I20110118-0800 Cocoa, is OK in 3.6.2 candidate (M20110119-0834)

The Save action in the main toolbar is not enabled after Organize Imports. The editor tab gets the *, the Save action is correctly enabled in the menus, and Command+S works.
Comment 1 Markus Keller CLA 2011-01-20 04:55:39 EST
When I switch to another editor and then back to the dirty one, the Save toolbar button gets enabled, but Save All stays disabled.
Comment 2 Dani Megert CLA 2011-01-20 11:38:38 EST
It works on Windows XP. Markus, can you take a look?
Comment 3 Markus Keller CLA 2011-01-20 20:44:19 EST
SWT bug in ToolItem#setEnabled(boolean).

When you set a breakpoint there, and then try to organize imports, the new 	"enableWidget(enabled && parent.isEnabled());" (from bug 326200) does not enable the button, since the CoolBar and the CBanner in its ancestor chain are temporarily disabled. This doesn't happen on other platforms and didn't happen in 3.6.

If an ancestor of a ToolItem is disabled, this should just block clicks to the item, but should not stop it from becoming enabled.

If you're curious to know why the ancestors are disabled, add a breakpoint to Control#setEnabled(..) with condition "!enabled && (getClass() == org.eclipse.swt.custom.CBanner.class || getClass() == CoolBar.class)"
Comment 4 Dani Megert CLA 2011-01-21 01:13:54 EST
This should get fixed for 3.7.
Comment 5 Scott Kovatch CLA 2011-01-21 12:23:49 EST
Fixed > 20110121.
Comment 6 Markus Keller CLA 2011-01-25 06:03:43 EST
Verified in I20110124-1800.