Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Fast view bar unavailable for RAP Workbench Demo (Fancy&Business)
Fast view bar unavailable for RAP Workbench Demo (Fancy&Business) [message #1535292] Mon, 29 December 2014 16:21 Go to next message
Alexandru LATAFriend
Messages: 8
Registered: October 2013
Junior Member
Hi all,

Can somebody tell me why the fast view bar is unavailable for the RAP Workbench Demo Fancy and Business designs?
Another thing which worth to be mentioned is that the fast view bar is available for the RAP Workbench Demo.
I guess that there is something missing from FancyWindowComposer/BusinessWindowComposer classes, but I don't know what. Does anyone has an idea who to fix this?
Any help would be greatly appreciated!

Best regards,
Re: Fast view bar unavailable for RAP Workbench Demo (Fancy&Business) [message #1547703 is a reply to message #1535292] Mon, 05 January 2015 15:49 Go to previous message
Ken Wenzel is currently offline Ken WenzelFriend
Messages: 45
Registered: July 2009
The code that creates a fast view bar is missing from FancyWindowComposer.
You need to add something like the following code to FancyWindowComposer#createWindowContents after
the page has been created (around line 95):

// the following adds support for fast views
final int noCenterChildren[] = { 0 };
TrimLayout pageLayout = new TrimLayout() {
	boolean centerControlInitialized = false;
	protected void layout(Composite composite, boolean flushCache) {
		// set page composite as center control
		if (!centerControlInitialized && composite.getChildren().length > noCenterChildren[0]) {
			setCenterControl(composite.getChildren()[composite.getChildren().length - 1]);
			centerControlInitialized = true;
		super.layout(composite, flushCache);
page.setLayout( pageLayout );

// TODO investigate how to use ViewStackTrimToolBar instead of legacy FastViewBar
// Problem: TrimToolBarBase.createControl(...) uses wbw.getShell() as parent -> shell has to use a TrimLayout

final FastViewBar fastViewBar = new FastViewBar((WorkbenchWindow) configurer.getWindow());
if (pageLayout.getTrim(fastViewBar.getId()) == null) {
	pageLayout.addTrim(fastViewBar.getSide(), fastViewBar);
noCenterChildren[0] = page.getChildren().length;

page.setData(FastViewBar.FASTVIEWBAR_ID, fastViewBar);
// update fast views when switching perspectives
configurer.getWindow().addPerspectiveListener(new IPerspectiveListener() {
	public void perspectiveChanged(IWorkbenchPage page,
			IPerspectiveDescriptor perspective, String changeId) {
	public void perspectiveActivated(IWorkbenchPage page,
			IPerspectiveDescriptor perspective) {

Best regards,
Previous Topic:Launch files in RAP
Next Topic:Title on Group Composite
Goto Forum:

Current Time: Mon Feb 24 00:52:58 GMT 2020

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

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

Back to the top