|Create and show my custom View [message #735585]
||Wed, 12 October 2011 05:49
I have a question about programmatically create and display custom
View (DiagnosticView) with custom GUI elements.
1st I have an xml file where are defined by my own GUI elements (type,
location, size, etc.)
2nd programmatically creating multiple instances of the same View
IWorkbenchWindow window =
DiagnosticView diagnosticView = (DiagnosticView)
3rd after loading the xml elements and displays them in its own View
This works, but I do not always possible to create and show a View and
then to insert elements.
I would like to create a View (instance), load into him the elements and
to show View for some action. So I do not show the View already created,
but only for some action.
Is this possible? And if so, how?
|Re: Create and show my custom View [message #736175 is a reply to message #735585]
||Thu, 13 October 2011 14:27
| Arjan Huijzer
Registered: October 2011
I am not sure what it is exactly that you are trying to accomplish, but instead of using IWorkbenchPage.VIEW_ACTIVATE you could use IWorkbenchPage.VIEW_CREATE. This will create the view but does not show it to the user.
Below are the three view modes with the comments as found in the JavaDocs for IWorkbecnhPage:
* VIEW_ACTIVATE: Show view mode that indicates the view should be made visible and activated. Use of this mode has the same effect as calling showView(java.lang.String).
* VIEW_VISIBLE: Show view mode that indicates the view should be made visible. If the view is opened in the container that contains the active view then this has the same effect as VIEW_CREATE.
* VIEW_CREATE: Show view mode that indicates the view should be made created but not necessarily be made visible. It will only be made visible in the event that it is opened in its own container. In other words, only if it is not stacked with another view.
Powered by FUDForum
. Page generated in 0.01877 seconds