Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » IFolderLayout default folder tab not displayed
IFolderLayout default folder tab not displayed [message #780715] Thu, 19 January 2012 07:55
Kai Erlemann is currently offline Kai ErlemannFriend
Messages: 2
Registered: January 2012
Junior Member
I am currently fighting with a rather annoying behaviour when using a perspective with an IFolderLayout in an RCP application. Imagine a perspective with a large number of tabs (about 20). As the titles of most tabs are quite long, they do not all fit into the window at the same time.

We disabled the trimming of tab titles with a VIEW_MINIMUM_CHARACTERS=100 setting in our plugin_customization.ini file. We expect the first folder of the perspective to be default-selected and visible when the perspective is opened. Unfortunately, the folder is selected, but not visible!

To recreate this behaviour, you can use the following steps (tested on Eclipse 3.7 on Windows 7):

  1. create a simple RCP plugin project with UI contributions enabled and select the "RCP application with a view" template from the "New Plug-in Project" Wizard
  2. create a second view called "View2" and add it to the view extension of your plugin.xml
  3. open your Perspective class and replace it with the following content:

package mypackage;
import org.eclipse.ui.*;
public class Perspective implements IPerspectiveFactory {
  public void createInitialLayout(IPageLayout layout) {
    IFolderLayout right = layout.createFolder("right", IPageLayout.RIGHT, 0.95f, layout.getEditorArea());

Now start your application. You should see two tabs, the first should appear as selected. But when the window size is decreased until one of the tabs disappears, it is the first tab that disappears, not the second tab as would be expected!

When the first tab is clicked before resizing the window, the first tab stays visible while the second one disappears. This is the behaviour that we would expect.

The bug does only appear when the perspective is opened for the first time, not when a saved window state is reloaded.

Does anyone know how to ensure that the first folder tab of an IFolderLayout is always displayed when a perspective is opened?
Previous Topic:Tweak classloader: RCP over not 100% reliable network (Config.ini, class loading)
Next Topic:IFolderLayout default folder tab not displayed
Goto Forum:

Current Time: Fri Nov 27 08:30:17 GMT 2020

Powered by FUDForum. Page generated in 0.01303 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top