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 |
Sergey Kuznetsov 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 |
Thomas Schindl 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 |
Sergey Kuznetsov 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
|
|
|
Goto Forum:
Current Time: Tue Oct 15 02:17:03 GMT 2024
Powered by FUDForum. Page generated in 0.03586 seconds
|