How to do away with hard coding of view [message #448774] |
Tue, 02 May 2006 01:48  |
Eclipse User |
|
|
|
Originally posted by: jojy.sv.gmail.com
Hi all,
I have created an RCP application with a perspective associated with it.
In addition to that I have created some where around 3 to 4 views.Now I
need to place these views in the perspective.I have done with this using
perspective extension.
Here I am facing a problem, in order to make use of the perspective
extension I should have one view added programatically (as of my
knowledge).But I dont want to put the view id into code.
This is what I have seen in the sample RCP mail app where the view is
added to layout programatically.
public class Perspective implements IPerspectiveFactory {
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
layout.setEditorAreaVisible(false);
layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT,
0.25f, editorArea);
IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP,
0.5f, editorArea);
folder.addPlaceholder(View.ID + ":*");
folder.addView(View.ID);
layout.getViewLayout(NavigationView.ID).setCloseable(false);
}
}
But I want to position my views only by using the extension point
mechanism.
Is there any way by which I can achieve it.
Regards
George S
|
|
|
Re: How to do away with hard coding of view [message #448784 is a reply to message #448774] |
Tue, 02 May 2006 08:30   |
Eclipse User |
|
|
|
Originally posted by: jojy.sv.gmail.com
Hi all,
For my below mentioned issue.
Can I solve with the sticky view ??
I tried the same but could't get through
George S
George S wrote:
> Hi all,
> I have created an RCP application with a perspective associated with it.
> In addition to that I have created some where around 3 to 4 views.Now I
> need to place these views in the perspective.I have done with this using
> perspective extension.
> Here I am facing a problem, in order to make use of the perspective
> extension I should have one view added programatically (as of my
> knowledge).But I dont want to put the view id into code.
> This is what I have seen in the sample RCP mail app where the view is
> added to layout programatically.
> public class Perspective implements IPerspectiveFactory {
> public void createInitialLayout(IPageLayout layout) {
> String editorArea = layout.getEditorArea();
> layout.setEditorAreaVisible(false);
> layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT,
> 0.25f, editorArea);
> IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP,
> 0.5f, editorArea);
> folder.addPlaceholder(View.ID + ":*");
> folder.addView(View.ID);
> layout.getViewLayout(NavigationView.ID).setCloseable(false);
> }
> }
> But I want to position my views only by using the extension point
> mechanism.
> Is there any way by which I can achieve it.
> Regards
> George S
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03886 seconds