Eclipse Yoxos Services Downloads Blogs About
Home > Blogs >

Posts Tagged ‘detached views’

on Jun 23rd, 2010Tip: How to detect that a View was Detached

Here is a question that I got on a post about detached views:

“How can I detect that a View has been detached from the main window? I would like to adjust the view’s behavior in that case.”

There is no API to obtain that information directly. However it is possible to do this with a few tricks:

  1. detached views have an empty window title (i.e. shell.getText().length() == 0)
  2. when a view is detached resize events are fired

Armed with that knowledge we can detect that a view is detached / reattached. The snippet below shows how (tested on windows).

PS: Our eclipse support helps developers use their time efficiently by providing prompt answers to questions like this one.

detached view Tip: How to detect that a View was Detached

on Apr 25th, 2009Having fun with detached views!

Yesterday, I had fun investigating how to open “detached” views progammatically.

Click to watch:

detached views Having fun with detached views!
http://www.screencast.com/t/5ku89HjBNs

You can find this on Bug #270212, where we are discussing how use this in Eclipse Riena.

© EclipseSource 2008 - 2011