Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Create and show my custom View
Create and show my custom View [message #735585] Wed, 12 October 2011 09:49 Go to next message
Eclipse UserFriend

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
(DiagnosticView) using:

IWorkbenchWindow window =
DiagnosticView diagnosticView = (DiagnosticView)
window.getActivePage().showView(DiagnosticView.ID, secondaryID,

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 18:27 Go to previous message
Arjan Huijzer is currently offline Arjan HuijzerFriend
Messages: 9
Registered: October 2011
Junior Member
Hi Martin,

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.

Gr. Arjan

Previous Topic:Disabling properties
Next Topic:Enable/disable of action buttons not working on Eclipse IDE 3.7
Goto Forum:

Current Time: Thu Jun 21 04:52:24 GMT 2018

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

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

Back to the top