Bug 5684 - [RCP] [ViewMgmt] Ability to show/hide view title programmatically
Summary: [RCP] [ViewMgmt] Ability to show/hide view title programmatically
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P5 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-08 16:14 EST by Cagatay Kavukcuoglu CLA
Modified: 2014-08-06 01:23 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cagatay Kavukcuoglu CLA 2001-11-08 16:14:11 EST
Currently, every view in a workbench page (that is not in a folder) has a title 
bar, which provides a descriptive icon, a title text, an action bar and the 
close button for a view. For a small but useful number of views, this default 
title bar is not useful or required and detracts from user experience. Custom 
views that need to show some kind of status or a "strip" of useful context 
information, or maybe present new navigation functionality will benefit from an 
ability to show/hide the view title bar programmatically. To hide the close 
view button along with the rest of the title bar is probably against sound UI 
design, but the option to use the rest of the title bar area as content should 
be useful for a number of plugins.
Comment 1 Kevin Haaland CLA 2001-11-12 14:00:12 EST
This title bar is also the area where:

  The user can initiate drag/drop to reorganize the layout
  Double click to zoom the view

I agree with your observation about programmatically hide/show of this area not 
being a good idea. 

What additional content do you envision adding to this area?
Comment 2 Cagatay Kavukcuoglu CLA 2001-11-20 21:03:33 EST
See http://eclipse-nav.sourceforge.net as an example of what I have in mind for 
using the title area.

On second thought, maybe better configurability of the title bar display is 
enough for most uses. Here is a list of stuff I can come up with:

- Change the location of the view action bar (left or right)
- Show or hide view action bar
- Let views refuse focus, resize and move
Comment 3 Kevin Haaland CLA 2001-11-21 09:11:41 EST
My initial reaction is that I am hesitant to give views this level of control. 
Ideally it should be possible for views not to know/care about the 
presentation. This will allow the workbench to evolve the look of the product 
in a way that has minimal impact to existing plugins and continues to provide a 
consistent look and feel to products based on Eclipse. When I get some spare 
time (which is unfortunatly very rare these days) I will take a look at your 
plugin. 

Being realistic however, this is little chance that the we will get to adding 
this enhancement any time soon.... (now comes the plug for taking advantage of 
the open source community)

If you feel strongly that this support should be added join the developer's 
mailining list and argue your case. 
Comment 4 Kevin Haaland CLA 2002-01-21 22:48:14 EST
This is an interesting idea that will be deferred until development resources 
become available to consider this enhancement. 
Comment 5 Randy Giffen CLA 2002-08-08 16:59:48 EDT
Reopen for investigation
Comment 6 Ed Burnette CLA 2004-01-10 12:31:23 EST
Please bump the priority of this and consider for inclusion in Eclipse 3 for 
RCP applications. Having a view titlebar is not necessarily appropriate for 
non-IDE apps.

Look at the RCP Browser sample by Nick Edgar for an example. The workspace 
window has one view, "Browser". It looks pretty silly that way - better would 
be to get rid of the view titlebar altogether for this kind of app.

I don't need a lot of customization, just an titlebar off switch either in the 
API or in the plugin manifest that defines the view.
Comment 7 Ryan Lowe CLA 2005-03-22 15:54:27 EST
There's a way to do this in 3.0 but only for a perspective with one view:
IPageLayout.addStandaloneView().
Comment 8 Billy Biggs CLA 2005-03-25 22:07:52 EST
Ack, some interest in this bug.  Let's move it somewhere...
Comment 9 Ryan Lowe CLA 2005-03-26 05:43:05 EST
I stand corrected -- in Eclipse 3.0.x you can add as many titleless views as you
want to a perspective, like this:

public void createInitialLayout(IPageLayout layout) {
 String editorArea = layout.getEditorArea();
 layout.setEditorAreaVisible(false);
 layout.setFixed(true);

 layout.addStandaloneView(ViewA.ID, false, IPageLayout.TOP, 0.50f, editorArea);
 layout.addStandaloneView(ViewB.ID, false, IPageLayout.LEFT, 0.33f, ViewA.ID);
 layout.addStandaloneView(ViewC.ID, false, IPageLayout.RIGHT, 0.50f, ViewA.ID);
 layout.addStandaloneView(ViewD.ID, false, IPageLayout.BOTTOM, 0.50f, editorArea);
}

This enhancement seems to be more about allowing the titles of contributed views
not to have titles.  I agree with Comment #3 that perspective designers may not
want to give contributing/client plugin writers this level of control over how
views look or they might wreak havoc on the perspective's UI.
Comment 10 Nick Edgar CLA 2005-03-28 10:28:12 EST
Ryan, your assessment is correct.  We gave limited control to the initial
perspective layout to hide view titles (rather than the view itself specifying
this) for the reasons outlined above.  Does this work for you?
Comment 11 Ryan Lowe CLA 2005-03-28 20:33:47 EST
Yes this works fine for me.
Comment 12 Nick Edgar CLA 2006-03-15 11:24:09 EST
Reassigning bugs in component areas that are changing ownership.
Comment 13 Boris Bokowski CLA 2009-11-11 17:32:34 EST
Remy is now responsible for watching the [ViewMgmt] category.
Comment 14 Lars Vogel CLA 2014-08-05 12:24:09 EDT
(In reply to Cagatay Kavukcuoglu from comment #0)
> Currently, every view in a workbench page (that is not in a folder) has a
> title 
> bar, which provides a descriptive icon, a title text, an action bar and the 
> close button for a view. For a small but useful number of views, this
> default 
> title bar is not useful or required and detracts from user experience.

In Eclipse 4.4 the rendering of the title bar is done with the by the StackRenderer. You can place a view outside a stack to avoid the title bar. Marking as WORKSFORME.
Comment 15 Cagatay Kavukcuoglu CLA 2014-08-05 21:10:20 EDT
I lol'ed at the resolution, because it's funny to mark a ticket as works for me when it is solved after five years and numerous major versions. 

Cheers.
Comment 16 Lars Vogel CLA 2014-08-06 01:23:08 EDT
(In reply to Cagatay Kavukcuoglu from comment #15)
> I lol'ed at the resolution, because it's funny to mark a ticket as works for
> me when it is solved after five years and numerous major versions. 

I think this bug was "forgotten" in the past. I typically mark bugs only as fixed if I have a commit reference to the fix. As this was fixed a few years ago....