Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » GEF Shapes-RCP show outline and property views
GEF Shapes-RCP show outline and property views [message #228354] Tue, 19 December 2006 20:30 Go to next message
Jeff Higgins is currently offline Jeff HigginsFriend
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 Go to previous messageGo to next message
Jeff Higgins is currently offline Jeff HigginsFriend
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();
> }
> }
>
>
Re: GEF Shapes-RCP show outline and property views [message #228379 is a reply to message #228371] Wed, 20 December 2006 06:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Sferzah.yandex.ru

try this :

window.getActivePage().showView( "org.eclipse.ui.views.PropertySheet" );
Re: GEF Shapes-RCP show outline and property views [message #228405 is a reply to message #228379] Wed, 20 December 2006 16:02 Go to previous message
Jeff Higgins is currently offline Jeff HigginsFriend
Messages: 51
Registered: July 2009
Member
Alexey wrote:
> try this :
>
> window.getActivePage().showView( "org.eclipse.ui.views.PropertySheet" );
>
>
Ok, Thanks Alexy.
Previous Topic:Connection to front?
Next Topic:Palette Background Color
Goto Forum:
  


Current Time: Fri Apr 19 09:36:53 GMT 2024

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

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

Back to the top