Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsRegister PespectiveListener
https://www.eclipse.org/forums/index.php/mv/msg/36989/120196/#msg_120196
I would like to register PerspectiveListener an open an editor if a special
perspective becomes activated.
Normally I do this in my Activator.start() method. But I get the
"IllegalStateException" because no context ist available. I also tried it
with UICallBack.runNonUIThreadWithFakeContext() but since this method also
needs a Display I get the same Exception.
Am I doing something wrong? Is there a better place to register my Listener
at where it works better?
Regards,
Markus]]>Markus rüger2009-01-30T15:52:30-00:00Re: Register PespectiveListener
https://www.eclipse.org/forums/index.php/mv/msg/36989/120208/#msg_120208
Markus Krüger wrote:
> I would like to register PerspectiveListener an open an editor if a special
> perspective becomes activated.
> Normally I do this in my Activator.start() method. But I get the
> "IllegalStateException" because no context ist available. I also tried it
> with UICallBack.runNonUIThreadWithFakeContext() but since this method also
> needs a Display I get the same Exception.
> Am I doing something wrong? Is there a better place to register my Listener
> at where it works better?
Think again. Let's say you have 23 active users. How many workbench
instances do you have? And how many active bundles? How many of those
listeners do you need?
Ralf]]>Ralf Sternberg2009-01-30T17:34:06-00:00Re: Register PespectiveListener
https://www.eclipse.org/forums/index.php/mv/msg/36989/120220/#msg_120220
I think I need 23 listeners, one per workbench/user. Well I guess that you
mean that the bundle is only started once, so this is the wrong place to add
the listener.
But where else can I add it, so that there is one listener per
workbench/user?
Regards,
Markus
"Ralf Sternberg" <rsternberg@eclipsesource.com> schrieb im Newsbeitrag
news:glvdmf$l7k$1@build.eclipse.org...
> Hi Markus,
>
> Markus Kr]]>Markus rüger2009-02-02T11:37:33-00:00Re: Register PespectiveListener
https://www.eclipse.org/forums/index.php/mv/msg/36989/120231/#msg_120231
the entrypoint is the first place which is session-aware for your
application as the entrypoint implementation is loaded on a per-user base.
BUT it's not the right place either for a perspective listener. In RCP
it is common that the workbench is already running when your plugin
loads. In RAP the workbench is started with the user session and thus
may not be available immediately. I would suggest to use the workbench
window advisor do to stuff like that.
Cheers
Benny
Markus Krüger wrote:
> Hi Ralf,
>
> I think I need 23 listeners, one per workbench/user. Well I guess that you
> mean that the bundle is only started once, so this is the wrong place to add
> the listener.
> But where else can I add it, so that there is one listener per
> workbench/user?
>
> Regards,
> Markus
>
> "Ralf Sternberg" <rsternberg@eclipsesource.com> schrieb im Newsbeitrag
> news:glvdmf$l7k$1@build.eclipse.org...
>> Hi Markus,
>>
>> Markus Krüger wrote:
>>> I would like to register PerspectiveListener an open an editor if a
>>> special
>>> perspective becomes activated.
>>> Normally I do this in my Activator.start() method. But I get the
>>> "IllegalStateException" because no context ist available. I also tried it
>>> with UICallBack.runNonUIThreadWithFakeContext() but since this method
>>> also
>>> needs a Display I get the same Exception.
>>> Am I doing something wrong? Is there a better place to register my
>>> Listener
>>> at where it works better?
>> Think again. Let's say you have 23 active users. How many workbench
>> instances do you have? And how many active bundles? How many of those
>> listeners do you need?
>>
>> Ralf
>
>]]>Benjamin Muskalla2009-02-02T11:47:54-00:00Re: Register PespectiveListener
https://www.eclipse.org/forums/index.php/mv/msg/36989/120283/#msg_120283
you could even use an IStartup implementation contributed by an
extension to org.eclipse.ui.startup.
Greets
Benny
Benjamin Muskalla wrote:
> Hi Markus,
>
> the entrypoint is the first place which is session-aware for your
> application as the entrypoint implementation is loaded on a per-user base.
>
> BUT it's not the right place either for a perspective listener. In RCP
> it is common that the workbench is already running when your plugin
> loads. In RAP the workbench is started with the user session and thus
> may not be available immediately. I would suggest to use the workbench
> window advisor do to stuff like that.
>
> Cheers
> Benny
>
> Markus Krüger wrote:
>> Hi Ralf,
>>
>> I think I need 23 listeners, one per workbench/user. Well I guess that
>> you mean that the bundle is only started once, so this is the wrong
>> place to add the listener.
>> But where else can I add it, so that there is one listener per
>> workbench/user?
>>
>> Regards,
>> Markus
>>
>> "Ralf Sternberg" <rsternberg@eclipsesource.com> schrieb im Newsbeitrag
>> news:glvdmf$l7k$1@build.eclipse.org...
>>> Hi Markus,
>>>
>>> Markus Krüger wrote:
>>>> I would like to register PerspectiveListener an open an editor if a
>>>> special
>>>> perspective becomes activated.
>>>> Normally I do this in my Activator.start() method. But I get the
>>>> "IllegalStateException" because no context ist available. I also
>>>> tried it
>>>> with UICallBack.runNonUIThreadWithFakeContext() but since this
>>>> method also
>>>> needs a Display I get the same Exception.
>>>> Am I doing something wrong? Is there a better place to register my
>>>> Listener
>>>> at where it works better?
>>> Think again. Let's say you have 23 active users. How many workbench
>>> instances do you have? And how many active bundles? How many of those
>>> listeners do you need?
>>>
>>> Ralf
>>
>>]]>Benjamin Muskalla2009-02-03T11:09:39-00:00