Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Discouraged access warning
Discouraged access warning [message #42818] Wed, 22 August 2007 11:07 Go to next message
Roberto Sanchez is currently offline Roberto SanchezFriend
Messages: 82
Registered: July 2009
Member
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 #42880 is a reply to message #42818] Wed, 22 August 2007 13:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: b.muskalla.gmx.net

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 #42941 is a reply to message #42880] Wed, 22 August 2007 15:20 Go to previous messageGo to next message
Roberto Sanchez is currently offline Roberto SanchezFriend
Messages: 82
Registered: July 2009
Member
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 #43257 is a reply to message #42941] Sat, 25 August 2007 11:24 Go to previous messageGo to next message
Roberto Sanchez is currently offline Roberto SanchezFriend
Messages: 82
Registered: July 2009
Member
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

But I don't know how to replace: URLHelper.getURLString(false) I need
the system url to call other servlets of my application

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 #43302 is a reply to message #43257] Mon, 27 August 2007 08:57 Go to previous messageGo to next message
Eclipse UserFriend
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 #48232 is a reply to message #43302] Wed, 19 September 2007 13:31 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
How can I replace the following line to avoid warnings:
ContextProvider.getStateInfo().getResponseWriter()

I need this within my PhaseListeners.
RWT.getResponse().getWriter() seems to return a different object (and causes
an exception later on).

Regards,
Stefan.

"R
Re: Discouraged access warning [message #49044 is a reply to message #48232] Sun, 23 September 2007 09:12 Go to previous message
Eclipse UserFriend
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
Previous Topic:big images in Tree
Next Topic:"URI too large" warning
Goto Forum:
  


Current Time: Thu Sep 28 02:24:38 GMT 2023

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

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

Back to the top