Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Missing API
Missing API [message #73213] Fri, 08 February 2008 07:10 Go to next message
Eclipse UserFriend
Hi,

I noticed that the RAP implementation of the
org.eclipse.swt.graphics.Resource class is missing the following methods:

dispose()
getDevice()
isDisposed()

This is very inconvenient when developing multi channel applications, i.e.
RCP and RAP out of a single code base.

Would it be possible that these methods become added?

Cheers
/Eike
Re: Missing API [message #73435 is a reply to message #73213] Mon, 11 February 2008 06:45 Go to previous messageGo to next message
Eclipse UserFriend
Hi Eike,

the problem behind these specific methods is that resources are shared
across several sessions. This means that disposing a resource in one
session will invalidate it in all other sessions which leads to very
strange problems.
Implementing these methods as no-ops is against the rule of the RAP
project as we don't want to provide "empty" API. Implementing eg
dispose() as no-op would also mean that the semantic would change as you
can not rely on the return value of "isDisposed".
Would we implement these methods on a per-session base which would mean
that holding the dispose state of resources as a session-only state
would make no sense in any way.

There were already some discussions on this newsgroup but there are no
plans yet how to overcome this obstacle. One approach would be to
implement these methods on your own with a bundle patch fragment or the
much cleaner way you described to use a proxy which - depending on the
runtime - decides what to do.

Hope that helps to clarify the situation.
Benny

Eike Stepper wrote:
> Hi,
>
> I noticed that the RAP implementation of the
> org.eclipse.swt.graphics.Resource class is missing the following methods:
>
> dispose()
> getDevice()
> isDisposed()
>
> This is very inconvenient when developing multi channel applications,
> i.e. RCP and RAP out of a single code base.
>
> Would it be possible that these methods become added?
>
> Cheers
> /Eike
>
>
>
Re: Missing API [message #73453 is a reply to message #73435] Mon, 11 February 2008 07:09 Go to previous message
Eclipse UserFriend
Hi Benjamin,

Thx for the clarification. I must admit that I did not consider
implications through shared resources. Is this behaviour a designed
feature of RAP to optimize server-side resource usage or is it more a
relict of the historical roots of RWT?

Wouldn't usage counters be a way to have both, shared resources and reeal
disposal after the last usage has been finished?

BTW. how exactly are the current disposal semantics of these shared
resources?

Cheers
/Eike



Benjamin Muskalla wrote:

> Hi Eike,

> the problem behind these specific methods is that resources are shared
> across several sessions. This means that disposing a resource in one
> session will invalidate it in all other sessions which leads to very
> strange problems.
> Implementing these methods as no-ops is against the rule of the RAP
> project as we don't want to provide "empty" API. Implementing eg
> dispose() as no-op would also mean that the semantic would change as you
> can not rely on the return value of "isDisposed".
> Would we implement these methods on a per-session base which would mean
> that holding the dispose state of resources as a session-only state
> would make no sense in any way.

> There were already some discussions on this newsgroup but there are no
> plans yet how to overcome this obstacle. One approach would be to
> implement these methods on your own with a bundle patch fragment or the
> much cleaner way you described to use a proxy which - depending on the
> runtime - decides what to do.

> Hope that helps to clarify the situation.
> Benny

> Eike Stepper wrote:
>> Hi,
>>
>> I noticed that the RAP implementation of the
>> org.eclipse.swt.graphics.Resource class is missing the following methods:
>>
>> dispose()
>> getDevice()
>> isDisposed()
>>
>> This is very inconvenient when developing multi channel applications,
>> i.e. RCP and RAP out of a single code base.
>>
>> Would it be possible that these methods become added?
>>
>> Cheers
>> /Eike
>>
>>
>>
Previous Topic:Local toolbar in a editor
Next Topic:Missing plug-in in Target-Platform?
Goto Forum:
  


Current Time: Sun Aug 31 02:06:23 EDT 2025

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

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

Back to the top