Rabin
Rabin

Reputation: 1583

Sidebar on Eclipse RCP

I've just started playing with Eclipse RCP.

A few things that I would like to accomplish:

  1. How do I maximize the initial size of the application?
  2. I would like to create a sidebar type view on my left and would like to fix the size of that view and remove any title bar, minimize/ maximize/ close from that side-bar.

Can anyone help me please?
Thank you.

Upvotes: 2

Views: 1391

Answers (2)

Ritesh Toppo
Ritesh Toppo

Reputation: 333

Sidebar can be create via using viewpart and adjust in perspective using IPerspective in right or left side and given window size.

Upvotes: 0

VonC
VonC

Reputation: 1324278

First, some tutorials like Vogella's are a must read ;)

For 1/, this has to do with the IWorkbenchWindowConfigurer, like:

configurer.getWindow().getShell().setMaximized( true );

on postWindowOpen( IWorkbenchWindowConfigurer configurer ) of your WorkbenchAdvisor.

This thread has other alternatives.

For 2/, you can do it declaratively or by program, like this thread shows:

You can do it in plugin.xml, by providing extension to point org.eclipse.ui.perspectiveExtensions by specifying showTitle="false" on the view element.

or You can do it programmatically in Your PerspectiveFactory implementation:

public void createInitialLayout(IPageLayout layout) {
    ...
    layout.addStandaloneView(View.ID,  false,
            IPageLayout.LEFT, 1.0f, editorArea);
    ...
}

Upvotes: 3

Related Questions