Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » JFace ControlDecoration not consistent.
JFace ControlDecoration not consistent. [message #909378] Fri, 07 September 2012 03:49 Go to next message
Chris Fairhall is currently offline Chris Fairhall
Messages: 101
Registered: February 2011
Senior Member
I'm using a JFace ControlDecoration in a single sourced RWT/SWT standalone application.

When disposing of old ControlDecoration if I call #dispose without first calling #hide, under SWT I get left with remnants of the image on the screen. No update gets called before the ControlDecoration is disposed.
That's fine, I can just call #hide first.

When doing this in RWT, #hide throws a [org.eclipse.swt.SWTException: Widget is disposed] if the ControlDecoration is already disposed. SWT can never throw this exception when calling the #hide method.

I think it would be good for RWT to check if its internal implementation is already disposed and not throw an exception, since there is no #isDisposed API.


ps: not urgent as I've fixed the cause of the duplicate calls to hide/dispose in my code
Re: JFace ControlDecoration not consistent. [message #909439 is a reply to message #909378] Fri, 07 September 2012 06:29 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan Furnadjiev
Messages: 1839
Registered: July 2009
Senior Member
Chris,
if the ControlDecoration behaves differently from RCP please open a
bugzilla about this issue.
Thanks,
Ivan

On 9/7/2012 6:49 AM, Chris Fairhall wrote:
> I'm using a JFace ControlDecoration in a single sourced RWT/SWT
> standalone application.
>
> When disposing of old ControlDecoration if I call #dispose without
> first calling #hide, under SWT I get left with remnants of the image
> on the screen. No update gets called before the ControlDecoration is
> disposed.
> That's fine, I can just call #hide first.
>
> When doing this in RWT, #hide throws a [org.eclipse.swt.SWTException:
> Widget is disposed] if the ControlDecoration is already disposed. SWT
> can never throw this exception when calling the #hide method.
>
> I think it would be good for RWT to check if its internal
> implementation is already disposed and not throw an exception, since
> there is no #isDisposed API.
>
>
> ps: not urgent as I've fixed the cause of the duplicate calls to
> hide/dispose in my code

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: JFace ControlDecoration not consistent. [message #910520 is a reply to message #909439] Sun, 09 September 2012 22:54 Go to previous message
Chris Fairhall is currently offline Chris Fairhall
Messages: 101
Registered: February 2011
Senior Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=389131
Previous Topic:Problem with TableViewer setAlignment on column
Next Topic:NullPointerException in SetPerspective
Goto Forum:
  


Current Time: Thu Oct 23 08:44:42 GMT 2014

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

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