Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Perspective initial layout for views with allow multiple = true (compound ids) - in plain text
Perspective initial layout for views with allow multiple = true (compound ids) - in plain text [message #900965] Thu, 09 August 2012 08:53 Go to next message
Sergey Kuznetsov is currently offline Sergey KuznetsovFriend
Messages: 29
Registered: July 2009
Junior Member
Hi all,

For 3.x RCP applications we use following code for ours perspectives initial
layout (we have a lot of views with allowMultiple == true)

public class Perspective implements IPerspectiveFactory {
public static final String ID = "test.rcp.juno.perspective";

public IFolderLayout viewsTopLeft;
public String viewsTopLeftID = "viewsTopLeft";
public IFolderLayout viewsTopRight;
public String viewsTopRightID = "viewsTopRight";
public IFolderLayout viewsBottom;
public String viewsBottomID = "viewsBottom";

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

viewsTopLeft = layout.createFolder(viewsTopLeftID, IPageLayout.LEFT,
0.20f, editorArea);
viewsBottom = layout.createFolder(viewsBottomID, IPageLayout.BOTTOM,
0.5f, viewsTopLeftID);
viewsTopRight = layout.createFolder(viewsTopRightID,
IPageLayout.RIGHT, 0.50f, viewsTopLeftID);

viewsTopLeft.addView(View1.ID + ":0001");
viewsTopLeft.addView(View1.ID + ":0002");
viewsTopRight.addView(View2.ID + ":0003");
viewsTopRight.addView(View2.ID + ":0004");
viewsBottom.addView(View3.ID + ":0005");
viewsBottom.addView(View3.ID + ":0006");
viewsBottom.addView(View3.ID + ":0007");
}
}

The code doesn't work for Juno, looks like createViewModel method of
ModeledPageLayout class has bug(s) (can not find views id), but Juno
documentation says "In layout methods taking a view id, the id can have the
compound form: primaryId [':' secondaryId]".

May be we miss something? Or there is some workaround?

Thanks
Re: Perspective initial layout for views with allow multiple = true (compound ids) - in plain text [message #900974 is a reply to message #900965] Thu, 09 August 2012 09:27 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Most likely a bug in the backwards compat layer - please file a bugzilla
and attach an example reproduce the problem.

Tom

Am 09.08.12 10:53, schrieb Sergey Kuznetsov:
> Hi all,
>
> For 3.x RCP applications we use following code for ours perspectives
> initial layout (we have a lot of views with allowMultiple == true)
>
> public class Perspective implements IPerspectiveFactory {
> public static final String ID = "test.rcp.juno.perspective";
>
> public IFolderLayout viewsTopLeft;
> public String viewsTopLeftID = "viewsTopLeft";
> public IFolderLayout viewsTopRight;
> public String viewsTopRightID = "viewsTopRight";
> public IFolderLayout viewsBottom;
> public String viewsBottomID = "viewsBottom";
>
> public void createInitialLayout(IPageLayout layout) {
> String editorArea = layout.getEditorArea();
> layout.setEditorAreaVisible(false);
> layout.setFixed(false);
>
> viewsTopLeft = layout.createFolder(viewsTopLeftID,
> IPageLayout.LEFT, 0.20f, editorArea);
> viewsBottom = layout.createFolder(viewsBottomID,
> IPageLayout.BOTTOM, 0.5f, viewsTopLeftID);
> viewsTopRight = layout.createFolder(viewsTopRightID,
> IPageLayout.RIGHT, 0.50f, viewsTopLeftID);
>
> viewsTopLeft.addView(View1.ID + ":0001");
> viewsTopLeft.addView(View1.ID + ":0002");
> viewsTopRight.addView(View2.ID + ":0003");
> viewsTopRight.addView(View2.ID + ":0004");
> viewsBottom.addView(View3.ID + ":0005");
> viewsBottom.addView(View3.ID + ":0006");
> viewsBottom.addView(View3.ID + ":0007");
> }
> }
>
> The code doesn't work for Juno, looks like createViewModel method of
> ModeledPageLayout class has bug(s) (can not find views id), but Juno
> documentation says "In layout methods taking a view id, the id can have
> the compound form: primaryId [':' secondaryId]".
>
> May be we miss something? Or there is some workaround?
>
> Thanks
Re: Perspective initial layout for views with allow multiple = true (compound ids) - in plain text [message #900998 is a reply to message #900974] Thu, 09 August 2012 11:17 Go to previous message
Sergey Kuznetsov is currently offline Sergey KuznetsovFriend
Messages: 29
Registered: July 2009
Junior Member
Thanks, I did - https://bugs.eclipse.org/bugs/show_bug.cgi?id=386917

"Tom Schindl" wrote in message news:jvvvpn$96a$1@xxxxxxxxe.org...

Most likely a bug in the backwards compat layer - please file a bugzilla
and attach an example reproduce the problem.

Tom

Am 09.08.12 10:53, schrieb Sergey Kuznetsov:
> Hi all,
>
> For 3.x RCP applications we use following code for ours perspectives
> initial layout (we have a lot of views with allowMultiple == true)
>
> public class Perspective implements IPerspectiveFactory {
> public static final String ID = "test.rcp.juno.perspective";
>
> public IFolderLayout viewsTopLeft;
> public String viewsTopLeftID = "viewsTopLeft";
> public IFolderLayout viewsTopRight;
> public String viewsTopRightID = "viewsTopRight";
> public IFolderLayout viewsBottom;
> public String viewsBottomID = "viewsBottom";
>
> public void createInitialLayout(IPageLayout layout) {
> String editorArea = layout.getEditorArea();
> layout.setEditorAreaVisible(false);
> layout.setFixed(false);
>
> viewsTopLeft = layout.createFolder(viewsTopLeftID,
> IPageLayout.LEFT, 0.20f, editorArea);
> viewsBottom = layout.createFolder(viewsBottomID,
> IPageLayout.BOTTOM, 0.5f, viewsTopLeftID);
> viewsTopRight = layout.createFolder(viewsTopRightID,
> IPageLayout.RIGHT, 0.50f, viewsTopLeftID);
>
> viewsTopLeft.addView(View1.ID + ":0001");
> viewsTopLeft.addView(View1.ID + ":0002");
> viewsTopRight.addView(View2.ID + ":0003");
> viewsTopRight.addView(View2.ID + ":0004");
> viewsBottom.addView(View3.ID + ":0005");
> viewsBottom.addView(View3.ID + ":0006");
> viewsBottom.addView(View3.ID + ":0007");
> }
> }
>
> The code doesn't work for Juno, looks like createViewModel method of
> ModeledPageLayout class has bug(s) (can not find views id), but Juno
> documentation says "In layout methods taking a view id, the id can have
> the compound form: primaryId [':' secondaryId]".
>
> May be we miss something? Or there is some workaround?
>
> Thanks
Previous Topic:Allow to rearrange views inside of one area only?
Next Topic:Unable to launch Eclipse 3.7.2 based RCP application on HPUXi machines
Goto Forum:
  


Current Time: Tue Oct 15 02:17:03 GMT 2024

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

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

Back to the top