|
Re: Recursive opening error [message #326283 is a reply to message #326282] |
Thu, 13 March 2008 16:41 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------010709070808010807020807
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Phill,
It's probably a good idea to use this type of approach to turn the page
as a separate event
getSite().getShell().getDisplay().asyncExec
(new Runnable()
{
public void run()
{
setActivePage(0);
}
});
Phill_Perryman@Mitel.COM wrote:
>
> I am getting a recursive opening editor error. However at the point I
> get it the editor and outline view are fully open.
>
> The editor has a few pages and I want to switch to the page relevant
> to the selection. So I have a selection changed method which calls
> setActivePage. Now this works fine until I select a menu item so that
> neither the outline view or the editor are active. I then click in the
> outline view which becomes the active part. As far as I can tell it
> also fires a selection event which the editor picks up and sets the
> page. The problem seems to be that the outline view has not finished
> its setActivePart call and so there is already a part being activated
> when the setActivePage in the editor happens. Although as the two
> parts being activated are not the same I think the error message is
> somewhat misleading. It took me a while to figure out it was not the
> editor recursively calling itself but that setActivePart is not
> re-entrant.
>
> I am using the normal selection service and registering the editor as
> a listener.
>
> I don't know enought about the way events are handled to figure out
> how to get around this.
>
--------------010709070808010807020807
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Phill,<br>
<br>
It's probably a good idea to use this type of approach to turn the page
as a separate event<br>
<br>
getSite().getShell().getDisplay().asyncExec<br>
(new Runnable()<br>
{<br>
public void run()<br>
{<br>
setActivePage(0);<br>
}<br>
});<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Phill_Perryman@Mitel.COM">Phill_Perryman@Mitel.COM</a> wrote:
<blockquote cite="mid:frbl1t$sn2$1@build.eclipse.org" type="cite"><br>
<font face="sans-serif" size="2">I am getting a recursive opening
editor
error. However at the point I get it the editor and outline view are
fully
open.</font>
<br>
<br>
<font face="sans-serif" size="2">The editor has a few pages and I
want
to switch to the page relevant to the selection. So I have a selection
changed method which calls setActivePage. Now this works fine until I
select
a menu item so that neither the outline view or the editor are active.
I then click in the outline view which becomes the active part. As far
as I can tell it also fires a selection event which the editor picks up
and sets the page. The problem seems to be that the outline view has
not
finished its setActivePart call and so there is already a part being
activated
when the setActivePage in the editor happens. Although as the two parts
being activated are not the same I think the error message is somewhat
misleading. It took me a while to figure out it was not the editor
recursively
calling itself but that setActivePart is not re-entrant.</font>
<br>
<br>
<font face="sans-serif" size="2">I am using the normal selection
service
and registering the editor as a listener.</font>
<br>
<br>
<font face="sans-serif" size="2">I don't know enought about the way
events
are handled to figure out how to get around this.</font>
<br>
<br>
</blockquote>
<br>
</body>
</html>
--------------010709070808010807020807--
|
|
|
|
Re: Recursive opening error [message #326291 is a reply to message #326290] |
Thu, 13 March 2008 20:49 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------010008060807010402090408
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Phill,
I'm not really sure of the whole picture in your code, but some
variation of this approach (delayed reaction to selection or delayed
delivery of selection) is likely needed.
Phill_Perryman@Mitel.COM wrote:
>
> Tried the run asynch (and UIJob), gets rid of the error however the
> Menu items which appeared when it is run normally don't appear now.
> Looks like the workbench has not seen the selection event.
--------------010008060807010402090408
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Phill,<br>
<br>
I'm not really sure of the whole picture in your code, but some
variation of this approach (delayed reaction to selection or delayed
delivery of selection) is likely needed.<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Phill_Perryman@Mitel.COM">Phill_Perryman@Mitel.COM</a> wrote:
<blockquote cite="mid:frc3d5$hgh$1@build.eclipse.org" type="cite"><br>
<font face="sans-serif" size="2">Tried the run asynch (and UIJob),
gets
rid of the error however the Menu items which appeared when it is run
normally
don't appear now. Looks like the workbench has not seen the selection
event.</font>
</blockquote>
<br>
</body>
</html>
--------------010008060807010402090408--
|
|
|
|
Powered by
FUDForum. Page generated in 0.03088 seconds