Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Migrating from 3.3 to 3.6(Problems with different behaviour of SWT classes)
Migrating from 3.3 to 3.6 [message #548378] Wed, 21 July 2010 15:47 Go to next message
Martin Kessler is currently offline Martin KesslerFriend
Messages: 1
Registered: July 2009
Junior Member
Hello,
we are migrating our RCP application from Eclipse 3.3 to 3.6 and have observed some strange behaviour.
We have a typical master-detail layout with one ViewPart showing an overview table and another ViewPart showing the details of the selected record. We are listening to the IPartListener2.partVisible event so that we know if a view might have to refresh itself. When the overview refreshes, it also triggers the details view to update. If the details view is not visible, we bring it to front using window.getActivePage().showView(viewId). This causes some recalculation of the window bounds and the window position and eventually org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED is called. In 3.3, this method did nothing. In 3.6 it causes the OS to call org.eclipse.swt.widgets.Control.WM_SIZE which again fires a partVisible event for the overview ViewPart. It tries to initialize itself again which is interrupted by our framework; otherwise it would probably lead to an endless loop.
How can we avoid that partVisible is fired twice?
Thanks a lot in advance!
Re: Migrating from 3.3 to 3.6 [message #548513 is a reply to message #548378] Thu, 22 July 2010 08:45 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3801
Registered: July 2009
Senior Member
Martin Kessler wrote:
> Hello,
> we are migrating our RCP application from Eclipse 3.3 to 3.6 and have
> observed some strange behaviour.
> We have a typical master-detail layout with one ViewPart showing an
> overview table and another ViewPart showing the details of the
> selected record. We are listening to the IPartListener2.partVisible
> event so that we know if a view might have to refresh itself. When the
> overview refreshes, it also triggers the details view to update. If
> the details view is not visible, we bring it to front using
> window.getActivePage().showView(viewId). This causes some
> recalculation of the window bounds and the window position and
> eventually org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED is
> called. In 3.3, this method did nothing. In 3.6 it causes the OS to
> call org.eclipse.swt.widgets.Control.WM_SIZE which again fires a
> partVisible event for the overview ViewPart. It tries to initialize
> itself again which is interrupted by our framework; otherwise it would
> probably lead to an endless loop.
> How can we avoid that partVisible is fired twice?
partVisible should not be called twice. If that's the case please file a
bug report against Platform UI with steps (demo plug-in) to reproduce.

Dani
> Thanks a lot in advance!
Re: Migrating from 3.3 to 3.6 [message #654928 is a reply to message #548378] Thu, 17 February 2011 16:25 Go to previous message
AJ  is currently offline AJ Friend
Messages: 77
Registered: July 2009
Member
FYI:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=320727

[Updated on: Thu, 17 February 2011 16:30]

Report message to a moderator

Previous Topic:[Bindings] Removing a key-binding
Next Topic:Decoration questions
Goto Forum:
  


Current Time: Sat Dec 20 21:41:46 GMT 2014

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

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