Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Moving a newly created Instance of a ViewPart
Moving a newly created Instance of a ViewPart [message #482743] Thu, 27 August 2009 18:21 Go to next message
drew frantz is currently offline drew frantzFriend
Messages: 340
Registered: July 2009
Senior Member
I have a method that creates mutiple instances of a custom ViewPart. After I
create a new ViewPart I want it to reside stacked in a certain part of the
perspective. What is the trick to moving the ViewPart to a different
location after it is created?
Re: Moving a newly created Instance of a ViewPart [message #482884 is a reply to message #482743] Fri, 28 August 2009 12:54 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

There's no API to do that (and the hackery I've seen is black magic).

You can create a placeholder for multi-instance views in the perspective. Just use ':' ... i.e. "my.view.id:*"

PW


Re: Moving a newly created Instance of a ViewPart [message #482978 is a reply to message #482884] Fri, 28 August 2009 19:22 Go to previous messageGo to next message
drew frantz is currently offline drew frantzFriend
Messages: 340
Registered: July 2009
Senior Member
Thanks works great. Didn't understand how to deal with the wildcards in the
perspective, now I do.

"Paul Webster" <pwebster@ca.ibm.com> wrote in message
news:h78k2e$tv7$1@build.eclipse.org...
> There's no API to do that (and the hackery I've seen is black magic).
>
> You can create a placeholder for multi-instance views in the perspective.
> Just use ':' ... i.e. "my.view.id:*"
>
> PW
>
Re: Moving a newly created Instance of a ViewPart [message #483209 is a reply to message #482884] Mon, 31 August 2009 15:13 Go to previous message
Remo Loetscher is currently offline Remo LoetscherFriend
Messages: 18
Registered: July 2009
Junior Member
Hi Paul,

I had problems with placeholder in perspectives using multi-instance views.

[...]
IPlaceholderFolderLayout createPlaceholderFolder =
layout.createPlaceholderFolder("org.placeholder.folder.test.id ",
IPageLayout.BOTTOM, 0.5f, IPageLayout.ID_EDITOR_AREA);

//this will NOT work for multi instance views
createPlaceholderFolder.addPlaceholder("*placeholder.folder.test* ");
//this will work for multi instance views
createPlaceholderFolder.addPlaceholder("*placeholder.folder.test*:* ");
[...]

I found the bug report
https://bugs.eclipse.org/bugs/show_bug.cgi?id=118693 and assumed that
there is no way to do that (still open).

But your hint with the ":" did the trick!

Thanks!

Remo

Paul Webster wrote:
> There's no API to do that (and the hackery I've seen is black magic).
>
> You can create a placeholder for multi-instance views in the
> perspective. Just use ':' ... i.e. "my.view.id:*"
>
> PW
>
Previous Topic:[commands] Help with handler enabledWhen
Next Topic:How to set the default location in New Wizard for GMF plug-in
Goto Forum:
  


Current Time: Fri Apr 19 19:51:57 GMT 2024

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

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

Back to the top