Bug 37537 - [Coolbar] Can't restore combo box on toolbar
Summary: [Coolbar] Can't restore combo box on toolbar
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P2 major (vote)
Target Milestone: 2.1.1   Edit
Assignee: Lynne Kues CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-13 04:37 EDT by Tetsuro Asahata CLA
Modified: 2003-06-04 10:54 EDT (History)
2 users (show)

See Also:


Attachments
test plugin (5.43 KB, application/octet-stream)
2003-05-13 04:41 EDT, Tetsuro Asahata CLA
no flags Details
patch (2.35 KB, application/octet-stream)
2003-05-29 10:46 EDT, Lynne Kues CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tetsuro Asahata CLA 2003-05-13 04:37:36 EDT
Our editor has an action which show/hide our editor's toolbars, and one of the 
toolbars has a combo box on it. Once the bar is hidden, it can't be shown 
until the editor is reopened.

Attached code doesn't work on 2.1, but it just works fine on 2.0.x.

To recreate:
1. start run-time workbench with attached plugin
2. create a simple project
3. create a file named 'test.w'.
Two toolbars will be shown when the file is opened by a editor for 
extension 'w'. One toolbar has a show/hide toggle action button, and the other 
has a combobox on it.
4. click the show/hide toggle action button on the toolbar
Then the toolbar which has the combobox will be hidden.
5. click the show/hide toggle action button again.
This should show the combobox toolbar again.
Comment 1 Tetsuro Asahata CLA 2003-05-13 04:41:09 EDT
Created attachment 4861 [details]
test plugin
Comment 2 Debbie Wilson CLA 2003-05-14 10:33:26 EDT
I'm seeing the following error with this plug-in.  Do you have errors in 
your .log file?  Is there something else that needs to be fixed in this plug-
in?

java.lang.IllegalArgumentException: Argument not valid
	at org.eclipse.swt.SWT.error(SWT.java:2331)
	at org.eclipse.swt.SWT.error(SWT.java:2275)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:389)
	at org.eclipse.swt.widgets.CoolBar.setItemOrder(CoolBar.java:709)
	at org.eclipse.swt.widgets.CoolBar.setItemLayout(CoolBar.java:680)
	at org.eclipse.ui.internal.CoolBarManager.restoreState
(CoolBarManager.java:692)
	at org.eclipse.ui.internal.WorkbenchWindow.restoreState
(WorkbenchWindow.java:1313)
	at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1263)
	at org.eclipse.ui.internal.Workbench.access$10(Workbench.java:1223)
	at org.eclipse.ui.internal.Workbench$12.run(Workbench.java:1141)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:889)
	at org.eclipse.core.runtime.Platform.run(Platform.java:413)
	at org.eclipse.ui.internal.Workbench.openPreviousWorkbenchState
(Workbench.java:1093)
	at org.eclipse.ui.internal.Workbench.init(Workbench.java:870)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1373)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:845)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
	at org.eclipse.core.launcher.Main.run(Main.java:747)
	at org.eclipse.core.launcher.Main.main(Main.java:583)

Comment 3 Tetsuro Asahata CLA 2003-05-14 23:51:28 EDT
I don't see any exceptions logged in my log file.
Could you try with a fresh workspace?
Comment 4 Debbie Wilson CLA 2003-05-15 09:47:59 EDT
I did this with a fresh workspace and I20030507.
Comment 5 Tetsuro Asahata CLA 2003-05-19 07:39:14 EDT
I tried with I20030507 build, and the plugin just works fine,
and other people also can use this plugin.

My OS is Windows XP.

Could you try again with Eclipse 2.1 or 2.0.x?

Comment 6 Tetsuro Asahata CLA 2003-05-22 22:49:32 EDT
Do you have any updates? 
This is a really severe problem for us.
Comment 7 Lynne Kues CLA 2003-05-28 13:59:14 EDT
Nick this needs to be fixed for 2.1.1.  I haven't tracked down what is going on 
yet, but I'm working on it.
Comment 8 Nick Edgar CLA 2003-05-28 14:25:36 EDT
Yes, since this is a regression, please investigate for 2.1.1.
Comment 9 Lynne Kues CLA 2003-05-29 10:43:26 EDT
The problem is not specific to comboboxes.  The problem is specific to 
splitting up editor contributions and the creation of empty coolitems.  

I will attach a patch.  To run with the patch create a directory named "bin" 
under your eclipse/plugins/org.eclipse.ui.workbench directory.  Unzip the patch 
into the bin directory and start eclipse with the argument -dev bin.  Please 
run with the patch and let me know if it solves your problems.
Comment 10 Lynne Kues CLA 2003-05-29 10:46:02 EDT
Created attachment 5005 [details]
patch
Comment 11 Lynne Kues CLA 2003-05-29 10:50:10 EDT
Note the above walkback is specific to the post 2.1 development stream.  
Changes were made to the coolbar layout restoration code and it needs to handle 
the above scenario (empty coolitems for split editor contribution action 
bars).  [Bug 38211] exists for this problem.
Comment 12 Lynne Kues CLA 2003-05-29 17:14:34 EDT
Released fix into R2.1.1 stream.  Will be in 2.1.1 maintenance build > 20030528.
Comment 13 Lynne Kues CLA 2003-05-29 17:18:19 EDT
Released change into post 2.1 dev stream.
Comment 14 Tetsuro Asahata CLA 2003-06-02 01:35:12 EDT
I tired with Eclipse 2.1.1 maintenance build: M20030530, but the problem still 
exists.
Comment 15 Lynne Kues CLA 2003-06-02 11:01:47 EDT
The fix did not make it into the build for some reason.  I need to check with 
Nick and Tod about what happened.
Comment 16 Nick Edgar CLA 2003-06-02 11:19:27 EDT
My fault, I forgot to re-version with it.
I'll do so and ask for a rebuild.
Comment 17 Nick Edgar CLA 2003-06-04 10:17:38 EDT
Asahata-san, were you able to verify this?
Comment 18 Tetsuro Asahata CLA 2003-06-04 10:52:23 EDT
Yes, I confirmed that the problem has been fixed.
Thank you very much!!
Comment 19 Nick Edgar CLA 2003-06-04 10:53:55 EDT
Thanks.
Comment 20 Nick Edgar CLA 2003-06-04 10:54:09 EDT
Verified.