Skip to main content


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 FairhallFriend
Messages: 221
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 FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
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 FairhallFriend
Messages: 221
Registered: February 2011
Senior Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=389131
Previous Topic:Setting Composite Background color
Next Topic:DateTime widget with localization
Goto Forum:
  


Current Time: Wed Apr 24 22:11:21 GMT 2024

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

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

Back to the top