GEF Shapes-RCP show outline and property views [message #228354] |
Tue, 19 December 2006 20:30 |
Jeff Higgins Messages: 51 Registered: July 2009 |
Member |
|
|
Hi,
newbie questions.
I have an RCP application based on GEF Shapes-RCP example.
Goal: to show Outline and Property Views?
I can get the Outline view to show with what I have,
but I can't get the properties view to show at all.
What is the (real) RCP way of achieving my goal.
This seems to be a naive attempt.
Thanks
Jeff Higgins
p.s. why do I have a Working Sets menu item in my window menu?
I guess I must somehow be reusing some sort of workbench menu?
I now have in my (only) perspective:
public void createInitialLayout(IPageLayout layout) {
layout.setEditorAreaVisible(true);
layout.addView(IPageLayout.ID_OUTLINE,
IPageLayout.LEFT, .3f, layout.getEditorArea());
layout.addView(IPageLayout.ID_PROP_SHEET,
IPageLayout.BOTTOM, .3f, layout.getEditorArea());
}
and in my application's ActionBarAdvisor:
private ShowOutlineAction showOutline;
private ShowPropertiesAction showProperties;
MenuManager windowMenu = new MenuManager("Window", "window");
menuBar.add(windowMenu);
windowMenu.add(showOutline);
windowMenu.add(showProperties);
showOutline = new ShowOutlineAction(window);
register(showOutline);
openProperties = new ShowPropertiesAction(window);
register(showProperties);
ShowOutlineAction run method:
public void run() {
try {
IWorkbenchPage page =
window.getWorkbench().getActiveWorkbenchWindow().getActivePa ge();
page.showView("org.eclipse.ui.views.ContentOutline");
} catch (PartInitException e) {
e.printStackTrace();
}
}
ShowPropertiesAction run method:
public void run() {
try {
IWorkbenchPage page =
window.getWorkbench().getActiveWorkbenchWindow().getActivePa ge();
page.showView("org.eclipse.ui.views.properties");
} catch (PartInitException e) {
e.printStackTrace();
}
}
|
|
|
Re: GEF Shapes-RCP show outline and property views [message #228371 is a reply to message #228354] |
Tue, 19 December 2006 21:28 |
Jeff Higgins Messages: 51 Registered: July 2009 |
Member |
|
|
Well..., if I do this the Property View appears,
but not where my layout specifies, and
it does not participate with the Outline View or Editor.
public void run() {
try {
IWorkbenchPage page =
window.getWorkbench().getActiveWorkbenchWindow().getActivePa ge();
page.showView(IPageLayout.ID_PROP_SHEET);
} catch (PartInitException e) {
e.printStackTrace();
}
}
JH
"Jeff Higgins" <oohiggins@yahoo.com> wrote in message
news:em9i4s$e19$1@utils.eclipse.org...
> Hi,
> newbie questions.
> I have an RCP application based on GEF Shapes-RCP example.
>
> Goal: to show Outline and Property Views?
>
> I can get the Outline view to show with what I have,
> but I can't get the properties view to show at all.
>
> What is the (real) RCP way of achieving my goal.
> This seems to be a naive attempt.
>
> Thanks
> Jeff Higgins
>
> p.s. why do I have a Working Sets menu item in my window menu?
> I guess I must somehow be reusing some sort of workbench menu?
>
> I now have in my (only) perspective:
>
> public void createInitialLayout(IPageLayout layout) {
> layout.setEditorAreaVisible(true);
> layout.addView(IPageLayout.ID_OUTLINE,
> IPageLayout.LEFT, .3f, layout.getEditorArea());
> layout.addView(IPageLayout.ID_PROP_SHEET,
> IPageLayout.BOTTOM, .3f, layout.getEditorArea());
> }
>
> and in my application's ActionBarAdvisor:
>
> private ShowOutlineAction showOutline;
> private ShowPropertiesAction showProperties;
>
> MenuManager windowMenu = new MenuManager("Window", "window");
> menuBar.add(windowMenu);
> windowMenu.add(showOutline);
> windowMenu.add(showProperties);
>
> showOutline = new ShowOutlineAction(window);
> register(showOutline);
> openProperties = new ShowPropertiesAction(window);
> register(showProperties);
>
> ShowOutlineAction run method:
>
> public void run() {
> try {
> IWorkbenchPage page =
> window.getWorkbench().getActiveWorkbenchWindow().getActivePa ge();
> page.showView("org.eclipse.ui.views.ContentOutline");
>
> } catch (PartInitException e) {
> e.printStackTrace();
> }
> }
>
> ShowPropertiesAction run method:
>
> public void run() {
> try {
> IWorkbenchPage page =
> window.getWorkbench().getActiveWorkbenchWindow().getActivePa ge();
> page.showView("org.eclipse.ui.views.properties");
>
> } catch (PartInitException e) {
> e.printStackTrace();
> }
> }
>
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02211 seconds