Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Relationship of IWorkbenchWindow and IWorkbenchPage

jml,

The "Using Perspectives in the Eclipse UI" article is out of date.  It describes the behaviour in Eclipse 1.0, where 
views and editors were not shared between perspectives.
In Eclipse 2.0, they are.  There is now a one-to-one relationship between 
IWorkbenchWindow and IWorkbenchPage, and the active perspective in the 
page (IWorkbenchPage.getPerspective()) controls which views are visible. 
As for editors, the same set of editors is always visible, independent of 
which perspective is active.

Hope this clarifies,
Ncik







"jml" <jml@xxxxxxxx>
Sent by: platform-ui-dev-admin@xxxxxxxxxxx
11/20/02 08:58 PM
Please respond to platform-ui-dev

 
        To:     <platform-ui-dev@xxxxxxxxxxx>
        cc: 
        Subject:        [platform-ui-dev] Relationship of IWorkbenchWindow and IWorkbenchPage


Hi,

I am a little confused about the relationship of IWorkbenchWindow, 
IWorkbenchPage and perspective and together with views.

From the document "Using Perspectives in the Eclipse UI", it seemed that 
once user invoke open perspective, a new IWorkbenchPage will be created. 
Normally my eclipse window will have mutliple perspective, so that means 
in a window there will have multiple IWorkbenchPage. The javadoc for 
IWorkbenchPage says "views and editors are contained wholly within the 
page and are not shared with other pages", but it seemed that the views in 
different perspective are really the same view.

Also, I tried the following, inserting a line to the setFocus() function 
of one of my editor,

System.out.println(this.getSite().getPage().toString())

and when I switch between perspectives, I get the same output.
This seemed to mean the editor in different perspective is using the same 
IWorkbenchPage. And conflict with the article "Using Perspectives in the 
Eclipse UI".

So I am confused, can anyone do some help?

thanks

jml




Back to the top