Bug 38064 - [Coolbar] Unable to hide toolbar
Summary: [Coolbar] Unable to hide toolbar
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.0 M2   Edit
Assignee: Lynne Kues CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-23 15:16 EDT by Marcus S. Zarra CLA
Modified: 2003-06-10 17:03 EDT (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 Marcus S. Zarra CLA 2003-05-23 15:16:59 EDT
I have attempted to hide the toolbar in Eclipse and was unable to via the GUI. 
After asking around in the news group, I was referred to the .metadata directory
in the workspace.  I found a flag in there to also hide the toolbar but that
flag appears to be ignored also.

Only three toolbars are ignoring the command to hide.  One has the save item on
it, another has the "next issue" item on it and the third has back and forward
buttons on it to navigate through the edit windows.
Comment 1 Andre Weinand CLA 2003-05-23 15:56:47 EDT
Is this a MacOS X specific problem, that is do you want us to support the Aqua "hide 
toolbar" button in the top right corner of the window title bar?

Or is this a platform-independent problem?

Thanks.
Comment 2 Marcus S. Zarra CLA 2003-05-23 16:16:56 EDT
Negative, this appears to be across multiple platforms.  I have confirmed it on Linux and OS X
Comment 3 Andre Weinand CLA 2003-05-23 17:00:34 EDT
OK, then I can set the Platform and OS fields to "All".
Comment 4 Lynne Kues CLA 2003-05-27 11:44:32 EDT
What flag in the .metadata file are you talking about?  Such a flag does not 
exist.  Anyway, in 2.1, there is an internal preference to allow products to 
turn off the toolbar, shortcut bar and/or status line.  For details, see [Bug 
29179], comment #15.

As part of the 3.0 Rich Client Platform, the ability to control the workbench 
composition will be supported, so I'm closing this as "wontfix".
Comment 5 Marcus S. Zarra CLA 2003-05-27 12:39:29 EDT
As stated in the original comments, the command to turn off the toolbar inside of the application 
does not work.  Telling it to hide the toolbars is ignored for the toolbars that are listed.

As for the metadata setting.  I am referring to the file

workspace/.metadata/.plugins/org.eclipse.ui.workbench/pref_store.ini

Setting SHOW_TOOL_BAR=0 is ignored by the toolbars listed.

I have read bug 29179 and what I am describing is the fact that three of the toolbars are ignoring 
the command/instruction/whatever to hide themselves and they do not hide.
Comment 6 Lynne Kues CLA 2003-05-27 14:43:16 EDT
It needs to be specified as follows:

SHOW_TOOL_BAR=false

I just tried it - it works fine (build 20030520).  If this is your problem 
(incorrect specification), can you please close this bug report.  If not, 
please indicate what build you are using.
Comment 7 Marcus S. Zarra CLA 2003-05-27 15:51:02 EDT
Just downloaded and tested against the most recent nightly build.  The Integration build is not 
available for OS X yet, Stable build, which I was using, is quite a bit older than the version you 
tested against.

In any event, testing against build 200305270010 for OS X the problem is actually worse.  More 
toolbars are ignoring the command to hide and even customizing the toolbar and removing them 
does nothing.

I changed the parameter in the .metadata per your instructions and the result was the same.  Other 
commands in that same metadata file are being recognized (tested status bar).
Comment 8 Lynne Kues CLA 2003-05-27 16:16:30 EDT
Nightly builds are always dicey.  

I tested the flag on Windows since it said All platforms, but you have only 
seen the problem on Mac and Linux, right?  I just tested build 20030507 on 
Linux and the flag works.  Is there anything in your .log file?  Nick, any 
ideas?
Comment 9 Lynne Kues CLA 2003-05-27 16:17:19 EDT
Nick, do you have any ideas as to why this would not be working for him?
Comment 10 Marcus S. Zarra CLA 2003-05-27 16:41:34 EDT
On Linux:

I had tested the "customize toolbar" command and found it to be not working.  However, this was 
an older build (probably middle of March build).  I did not test changing the metadata directly 
since I did not learn of that under after I switched out my Linux machine.

On OS X:

I tested both the customize toolbar command and the changing of the metadata property.  Under 
my previous build (March 20ish build) only the three toolbars listed in the original comment 
refused to hide.  However, under the current build, all of the toolbars are visible.
Comment 11 Lynne Kues CLA 2003-05-27 17:17:54 EDT
The Customize Perspective option will not allow you to remove the workbench 
toolbars (i.e., the ones you mention).  This has never been supported and will 
not be supported until 3.0.

The SHOW_TOOL_BAR internal preference has nothing to do with the Customize 
Perspective option.  If the SHOW_TOOL_BAR preference is false, the entire 
toolbar area will be removed from the workbench window.  This is the only way 
to remove all items from the toolbar, but at this point you will not have a 
toolbar either.
Comment 12 Marcus S. Zarra CLA 2003-05-27 17:57:46 EDT
Sounds perfect!  The problem is setting SHOW_TOOL_BAR=false in workspace/.metadata/.plugins/
org.eclipse.ui.workbench/pref_store.ini does not remove the toolbar.
Comment 13 Nick Edgar CLA 2003-05-28 14:59:08 EDT
Bug 29179 refers to modifying the plugin customization file for the primary 
feature (e.g. eclipse/plugins/org.eclipse.platform/plugin_customization.ini).
We do not recommend changing the pref_store.ini files under .metadata.
However, the effect -should- be the same, and this should work the same on all 
platforms.
Note that if you are modifying the pref_store.ini file itself, then you don't 
need to specify the qualifying plugin in the key.
That is, specify:
SHOW_TOOL_BAR=false
not:
org.eclipse.ui.workbench/SHOW_TOOL_BAR=false

To trace this, set a breakpoint in WorkbenchWindow.updateBarVisibility().
Comment 14 Marcus S. Zarra CLA 2003-05-28 15:36:32 EDT
I was unclear.  I am setting the following value in the pref_store.ini file:

SHOW_TOOL_BAR=false

this file is in the org.eclipse.ui.workbench directory.

With this value set to false, it is my understanding that the entire toolbar should disappear.  
However, the toolbar is remaining.
Comment 15 Lynne Kues CLA 2003-05-29 15:30:22 EDT
This is Mac specific.  It works on Linux and Windows.  Moving back to SWT.  The 
toolbar is being hidden in Eclipse by setting its bounds to 0,0,0,0.  This 
isn't working on the Mac for some reason.
Comment 16 Silenio Quarti CLA 2003-06-02 14:49:11 EDT
The problem is that the workbench is not creating to separator between the menubar 
(actually titlebar on the Mac) in ApplicationWindow.configureShell():

	if (! "carbon".equals(SWT.getPlatform())) //$NON-NLS-1$
		 new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);

And the code in WorkbenchWindow.layout() does not expected that. It always resizes the 
the first child, which is the CoolBar (Toolbar) on the Mac:

			Control[] ws= composite.getChildren();
			for (int i= 0; i < ws.length; i++) {
				Control w= ws[i];
    if (i == 0) {
Comment 17 Debbie Wilson CLA 2003-06-02 14:56:17 EDT
Reassigning back to Lynne for further now that we have SWT's comments.

Comment 18 Lynne Kues CLA 2003-06-10 17:03:11 EDT
Fixed in build > 20030610.