Bug 73722 - [Perspectives] [ViewMgmt] No API for adding multiple instances of the same view in IPageLayout
Summary: [Perspectives] [ViewMgmt] No API for adding multiple instances of the same vi...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Nick Edgar CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2004-09-11 10:49 EDT by Michal Tkacz CLA
Modified: 2005-05-10 16:11 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Tkacz CLA 2004-09-11 10:49:20 EDT
It isn't currently possible to add multiple instances of the same view to
a perspective through IPageLayout. Because of this you cannot create a
perspective with multiple instances of the same view in its default layout.
Comment 1 Nick Edgar CLA 2004-09-13 11:59:11 EDT
Yes, this is currently a known limitation.
Can you provide more details about your scenario?

Comment 2 Michal Tkacz CLA 2004-09-13 13:14:31 EDT
Actually I eventually gave up the solution due to some other limitations (not
bugs), but still decided to file this report so that it didn't stay unnoticed.

What I am trying to do is to create an all-purpose collection management
framework based on RCP. That framework would let developers define their own
types of objects and collections using Eclipse extension point mechanism. The
views containing the collections and editors for the objects would be generated
automatically.

The idea was to define and register a single "collection" view and then open one
instance for each collection defined by the developer in his plugin.xml. That's
what I needed the functionality for.
Comment 3 Nick Edgar CLA 2004-09-13 14:57:05 EDT
Sounds interesting.  You might be interested in commenting on our generic
navigator work.  See bug 36961.
Comment 4 Nick Edgar CLA 2005-03-23 11:44:14 EST
Sorry, out of time for new API for 3.1.
Will consider post-3.1.

Comment 5 Mark Powell CLA 2005-05-02 21:28:11 EDT
We _desperately_ need a solution for this.  It is a critical need of my
application (previously implemented in Swing, being ported to Eclipse RCP) that
we have a programmatic way of some kind to specify a perspective with multiple
of the same view.  We already have an action that opens multiple of the same
view using the primary+":"+secondary ID, and then we arrange them within the
workbench page manually.  We now need to programmatically create for our app a
pre-defined arrangement of views (multiple instances of the same View class). 
We'd like to use perspectives to do this, but if we can't do it yet (and if the
capability can't be added until post-3.1 as you previous message states), then
we need some way--any way--to do it without perspectives until we can.

Specifically what _we're_ trying to do is to divide up the workbench page into a
number of views (all instances of the same class) that each contain different
images.  The application is like an image browser where the user can drag and
drop images that are listed in a Navigator-like "workspace" (actually a database
query) into one of the views.  It is very important that several views be
visible on the page simultaneously so that we can make the maximum use of screen
real estate and so the user can compare different images to each other.  One
common example is where we want to view a mosaic of many images across the top
of the page and below it have 2 views open that show two images that are a part
of that mosaic at higher resolution.
Comment 6 Nick Edgar CLA 2005-05-02 22:36:48 EDT
I've applied a patch to PageLayout and FolderLayout that allows you to pass a
compound id (primaryId:secondaryId) to addView.

Although it would be better to have separate addView(primaryId, secondaryId,
...) methods, this is consistent with the way placeholders are added currently.

Could you please try this out in the next nightly build, and let me know if this
works for you?
Comment 7 Nick Edgar CLA 2005-05-04 17:08:22 EDT
Mark confirmed that the fix works just fine.
Closing.
Comment 8 Nick Edgar CLA 2005-05-10 16:11:36 EDT
Verified by Mark.