[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: View instances across different pages/workspaces

I have some further questions below.

David Springgay wrote:

> Cheng-Yee Lin wrote:

> > When there are multiple pages (workspaces in the December release) opened
> > with default perspecives, the user can see navigator, properties, tasks,
> > and outline views on all those pages.

> > From each individual view, how many instances are there for those pages?
> > Is it a single instance shared by all the pages?  Or, are there multiple
> > instances and each page contains one instance?  How is this being
> > handled in Eclipse?  As a client of the Eclipse, what do we need to do
> > to produce the consistent behavior with these views?

> The following information was taken directly from the latest javadoc for
> IWorkbenchPage ..

> A workbench page consists of an arrangement of views and editors intended
> to be presented together to the user in a single workbench window. 

> A page can contain 0 or more views and 0 or more editors. These views and
> editors are contained wholly within the page and are not shared with other
> pages.  The layout and visible action set for the page is defined by a
> perspective.

> The number of views and editors within a page is restricted to simplify
> part management for the user.  In particular:

> * Only one instance of a particular view type may exist within a workbench
> page.
> * Only one editor can exist for each editor input within a page.<li>

> If your view appears within a page it will be disposed when the page is
> disposed.

1. If I open 2 Workbench pages with default perspectives for both, I will
   have one task list for each page.  However, if I enter a task in the
   first page and another one in the second page, I can see both tasks
   from both pages.  Are they really two separate instances?  If so,
   how do they sync up?

2. Again, if I have two pages and I open the same resource, e.g. foo.txt,
   from the navigators on both pages, there are two instances of editors
   for the resource, one on each page.  When I enter some text in the
   editor on one page, I can see the same change in the editor
   instance on the other page.  (The cursor positions in both editors
   might be different, though).  How/when do the two instance get in sync?