| Discouraged access warning [message #42818] | 
Wed, 22 August 2007 07:07   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hi all, when I updated at M6 It Appeared a new warning in the 
application: 
 
"Discouraged access: The type ContextProvider is not accessible due to  
restriction on required project org.eclipse.rap.rwt" 
 
I can see it in theses objects: 
URLHelper, ContextProvider, Event, etc. 
 
But the application seems to work fine. 
 
Can anyone tell what is that, Have I to do anything about ? 
 
Thanks. 
Roberto.
 |  
 |  
  | 
 | 
 | 
 | 
| Re: Discouraged access warning [message #43302 is a reply to message #43257] | 
Mon, 27 August 2007 04:57    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: rherrmann.innoopract.com 
 
Hi Roberto, 
 
please see my comments below. 
 
Cheers, 
Rüdiger 
 
Roberto Sánchez wrote: 
> Hi again, I've replaced: 
>  
>  - ContextProvider.getRequest()  by RWT.getRequest() 
>  - ContextProvider.getRequest().getSession()  by RWT.getSessionStore()  
> Now I'm using ISessionStore in my RAP Application. 
>  - event.getSource() by event.widget 
 
Thanks for the hint. Calling event.getSource() should be possible  
without a warning. 
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=201225 
 
>  
> But I don't know how to replace: URLHelper.getURLString(false) I need  
> the system url to call other servlets of my application 
 
It looks like you have to live with this for some time. I fully  
understand your use-case but unfortunately I don't see a possibility to  
provide API therefore until 1.0. 
 
>  
> Thanks in advance. 
> Roberto. 
>  
> Roberto Sánchez escribió: 
>> Hi Benny, I use: 
>> 
>>  - ContextProvider to get application url parameters. 
>> 
>>  - URLHelper to get the url of the application. 
>> 
>>  - Event#getSource() to get the object when the event has happened. 
>> 
>> I got this warning in those cases. Is there any alternative way to do  
>> that ? 
>> 
>> Regars. 
>> Roberto. 
>> 
>> 
>> 
>> Benjamin Muskalla escribió: 
>>> Hi Roberto, 
>>> 
>>> Discouraged access warning means that you use something from an  
>>> *.internal package. This means for you that the classes/methods  
>>> you're using are *not* officially supported API and can be changed  
>>> whenever we think that we need to change them. Eclipse warns you that  
>>> you should not rely on internal things. 
>>> 
>>> I'm just interested: For what do you use the ContextProvider? Any  
>>> interesting use case? 
>>> 
>>> Greets 
>>>   Benny 
>>> 
>>> Roberto Sánchez wrote: 
>>>> Hi all, when I updated at M6 It Appeared a new warning in the 
>>>> application: 
>>>> 
>>>> "Discouraged access: The type ContextProvider is not accessible due  
>>>> to restriction on required project org.eclipse.rap.rwt" 
>>>> 
>>>> I can see it in theses objects: 
>>>> URLHelper, ContextProvider, Event, etc. 
>>>> 
>>>> But the application seems to work fine. 
>>>> 
>>>> Can anyone tell what is that, Have I to do anything about ? 
>>>> 
>>>> Thanks. 
>>>> Roberto.
 |  
 |  
  | 
 | 
| Re: Discouraged access warning [message #49044 is a reply to message #48232] | 
Sun, 23 September 2007 05:12   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: fappel.innoopract.com 
 
Hi, 
 
the HtmlResponseWriter is a leftover of the old W4Toolkit library. It isn't  
public API, since it may be replaced in the future completely. So what are  
you using this class for - maybe there is another solution. The  
RWT.getResponse().getWriter() cannot be used at the moment, since this  
writes output directly into the stream, in contrast to HtmlResponseWriter  
which does a buffering - one of the reasons I want to get rid of it on the  
long run... 
 
Ciao 
Frank 
 
 
"Stefan R
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.07582 seconds