Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Stop the Creation of a View in IViewPart#createPartControl
Stop the Creation of a View in IViewPart#createPartControl [message #441095] Tue, 20 December 2005 01:01 Go to next message
Christopher Goy is currently offline Christopher GoyFriend
Messages: 38
Registered: July 2009
Member
Hello everyone. I have a problem with one of my views. A dialog pops up
when the view is created from the createPartControl method. The view
displays a map, and the user can decide which custom map they want to load.
If they press the cancel button the view still pops up, just with a blank
canvas. Is there any way to stop the creation of a view this late in the
lifecycle of a view? Thanks

Chris
Re: Stop the Creation of a View in IViewPart#createPartControl [message #441097 is a reply to message #441095] Tue, 20 December 2005 05:14 Go to previous messageGo to next message
venkataramana m is currently offline venkataramana mFriend
Messages: 86
Registered: July 2009
Member
There seems to be no way of stopping viewpart creation if view is opened using Window > ShowView action of workbench (Everything is late here). If at all any hack could be done, that would be against the API contracts.

But if viewpart could be created by application specific action, then whatever you want you can do early on. (But may be your usecase is not like that).

Thanks
~Venkat


--
View in EZ forum: http://www.eclipsezone.com/eclipse/forums/m91975481.html
Re: Stop the Creation of a View in IViewPart#createPartControl [message #441109 is a reply to message #441097] Tue, 20 December 2005 18:49 Go to previous messageGo to next message
Christopher Goy is currently offline Christopher GoyFriend
Messages: 38
Registered: July 2009
Member
Thanks for the response. I wasn't very hopeful in getting a response that i
wanted. I figured it was too late to close a view at that point without a
hack. Thanks again

Chris
"Venkataramana M" <venkataramanam@gmail.com> wrote in message
news:2965695.1135055700971.JavaMail.root@cp1.javalobby.org...
> There seems to be no way of stopping viewpart creation if view is opened
> using Window > ShowView action of workbench (Everything is late here). If
> at all any hack could be done, that would be against the API contracts.
>
> But if viewpart could be created by application specific action, then
> whatever you want you can do early on. (But may be your usecase is not
> like that).
>
> Thanks
> ~Venkat
>
>
> --
> View in EZ forum: http://www.eclipsezone.com/eclipse/forums/m91975481.html
Re: Stop the Creation of a View in IViewPart#createPartControl [message #441139 is a reply to message #441109] Wed, 21 December 2005 08:13 Go to previous messageGo to next message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

Christopher Goy wrote:
> Thanks for the response. I wasn't very hopeful in getting a response that i
> wanted. I figured it was too late to close a view at that point without a
> hack. Thanks again

Did you try scheduling a background job, which closes the view after
waiting 0.5 seconds or so? Another option is to continue the view
creation and putting a nice text label on it that tells the user to
close and reopen the view.

Anyway, from a usability point of you should try to re-design you view,
allowing to reopen the selection dialog from within the view tool bar to
repopulate it at any time. Note that a view only gets disposed an
recreated if it is closed in ALL perspectives.

Cu, Gunnar

--
Gunnar Wagenknecht
gunnar@wagenknecht.org
http://wagenknecht.org/
Re: Stop the Creation of a View in IViewPart#createPartControl [message #441160 is a reply to message #441139] Thu, 22 December 2005 00:33 Go to previous message
Christopher Goy is currently offline Christopher GoyFriend
Messages: 38
Registered: July 2009
Member
Hello,
The only thing that is holding me back is that in the design we didnt want
to have a default "map" that would be loaded every time the view was
created. But it looks like this might be the only choice. And there is a
menu option to load a new map. So maybe a default map load is the best way
to go. Thanks everyone for your help.


Chris
"Gunnar Wagenknecht" <gunnar@wagenknecht.org> wrote in message
news:dob2r7$5te$1@utils.eclipse.org...
> Christopher Goy wrote:
>> Thanks for the response. I wasn't very hopeful in getting a response
>> that i
>> wanted. I figured it was too late to close a view at that point without
>> a
>> hack. Thanks again
>
> Did you try scheduling a background job, which closes the view after
> waiting 0.5 seconds or so? Another option is to continue the view
> creation and putting a nice text label on it that tells the user to
> close and reopen the view.
>
> Anyway, from a usability point of you should try to re-design you view,
> allowing to reopen the selection dialog from within the view tool bar to
> repopulate it at any time. Note that a view only gets disposed an
> recreated if it is closed in ALL perspectives.
>
> Cu, Gunnar
>
> --
> Gunnar Wagenknecht
> gunnar@wagenknecht.org
> http://wagenknecht.org/
Previous Topic:Split Text Editors
Next Topic:Preference Page size
Goto Forum:
  


Current Time: Fri Apr 19 10:01:25 GMT 2024

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

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

Back to the top