Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Views open in wrong pane when using v3.x compatibilty layer(Wildcards don't match viewpart IDs / explicit IDs don't work either)
Views open in wrong pane when using v3.x compatibilty layer [message #1768163] Fri, 14 July 2017 09:00
Michael Moser is currently offline Michael MoserFriend
Messages: 58
Registered: October 2012
Location: Z├╝rich, Switzerland
We are migrating an older v3.x RCP application that monitors misc. EMS queues and topics to v4.x. The v3.x compatibility layer works well except that views (viewparts) open in the wrong pane (or "layout folder").

Our perspective so far defined two "folders":
an upper "main area" and a lower "consoleFolder". The "consoleFolder" was just for the console view, "main area" for everything else.

The correct placement was achieved by adding the line
    main.addPlaceholder("*"); //$NON-NLS-1$
to the main folder definition.

This doesn't work with v4.x and all views opened later by the user appear in the lower "consoleFolder"-pane. As a Workaround I also tried to "pre-register" all potential views by adding placeholders using their explicit ids, but that doesn't work, either!

How can I force the appearance of additional views in the first "main" folder without major changes to my existing code base?

For reference: the below is my current class, containing both, addPlaceholder(...) by Wildcard and addPlaceholder(...) by explicit ID, but neither of these works!

Any ideas or suggestions?

public class Perspective implements IPerspectiveFactory {

  public void createInitialLayout(final IPageLayout layout) {

    final IFolderLayout main = layout.createFolder("main area", IPageLayout.TOP, 0.7f, layout.getEditorArea()); //$NON-NLS-1$
    main.addPlaceholder("*"); //$NON-NLS-1$

    // the addPlaceHolder(...) with wildcards does not work in Eclipse 4.x (see bug
    // thus trying to add individual placeholders: - this doesn't work, either :-(

    final IFolderLayout consoleFolder = layout.createFolder("console area", IPageLayout.BOTTOM, 0.3f, //$NON-NLS-1$

[Updated on: Fri, 14 July 2017 09:03]

Report message to a moderator

Previous Topic:[SOLVED] Workbench: Could not run processor
Next Topic:NatTable and context/dependency injection
Goto Forum:

Current Time: Wed Oct 28 08:29:32 GMT 2020

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

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

Back to the top