show view in Action.run( ) [message #3106] |
Mon, 12 May 2008 00:36  |
Eclipse User |
|
|
|
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 01:25  |
Eclipse User |
|
|
|
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 01:25  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.05260 seconds