Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » show view in Action.run( )
show view in Action.run( ) [message #3106] Mon, 12 May 2008 04:36 Go to next message
Ben Smith is currently offline Ben SmithFriend
Messages: 14
Registered: July 2009
Junior Member
Hi Alles,

I am new and wondering whether I could get help here. I have an Action.
I want that by Clicking it would cause several instances of a View to
show. However, using IWorkbenchPage.showView(...) did not show the view
content (e.g., a label or an image). The program seemed to skip it and
continue to run the code after the showView() statement (e.g.,
System.out.println(...) or Thread.sleep(...)). If I inserted a
MessageBox after the showView() statement. The IWorkbenchPage.showView()
then displayed the view. Why do I need a MessageBox to have the view
shown? Can I show the view without the MessageBox? Any help please?

Ben
Re: show view in Action.run( ) [message #6870 is a reply to message #3106] Thu, 12 June 2008 05:25 Go to previous message
Eclipse UserFriend
Originally posted by: annamalai.ancitconsulting.com

It is quiet simple and all you need to do is in the run method of the action
....

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().showView( <viewID>);

And this should activate the view .. you dont need a message box after this
....

Regards
malai
"Ben Smith" <bensmith03@yahoo.com> wrote in message
news:g08hfv$esb$1@build.eclipse.org...
> Hi Alles,
>
> I am new and wondering whether I could get help here. I have an Action. I
> want that by Clicking it would cause several instances of a View to show.
> However, using IWorkbenchPage.showView(...) did not show the view content
> (e.g., a label or an image). The program seemed to skip it and continue to
> run the code after the showView() statement (e.g., System.out.println(...)
> or Thread.sleep(...)). If I inserted a MessageBox after the showView()
> statement. The IWorkbenchPage.showView() then displayed the view. Why do I
> need a MessageBox to have the view shown? Can I show the view without the
> MessageBox? Any help please?
>
> Ben
Re: show view in Action.run( ) [message #568829 is a reply to message #3106] Thu, 12 June 2008 05:25 Go to previous message
Eclipse UserFriend
Originally posted by: annamalai.ancitconsulting.com

It is quiet simple and all you need to do is in the run method of the action
....

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().showView( <viewID>);

And this should activate the view .. you dont need a message box after this
....

Regards
malai
"Ben Smith" <bensmith03@yahoo.com> wrote in message
news:g08hfv$esb$1@build.eclipse.org...
> Hi Alles,
>
> I am new and wondering whether I could get help here. I have an Action. I
> want that by Clicking it would cause several instances of a View to show.
> However, using IWorkbenchPage.showView(...) did not show the view content
> (e.g., a label or an image). The program seemed to skip it and continue to
> run the code after the showView() statement (e.g., System.out.println(...)
> or Thread.sleep(...)). If I inserted a MessageBox after the showView()
> statement. The IWorkbenchPage.showView() then displayed the view. Why do I
> need a MessageBox to have the view shown? Can I show the view without the
> MessageBox? Any help please?
>
> Ben
Previous Topic:Multiple views unlinked across perspectives
Next Topic:Problem using PropertyChangeListener in a FieldEditor
Goto Forum:
  


Current Time: Sat Aug 10 05:27:37 GMT 2024

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

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

Back to the top