Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » hidden-field preference?
hidden-field preference? [message #19123] Sat, 10 May 2003 23:06 Go to next message
Tom Roche is currently offline Tom RocheFriend
Messages: 160
Registered: July 2009
Senior Member
I just stepped up to I20030507 from 2.1 final, and got a ton of
warnings! In my workspace I have 1 public static final String
copyright per class, and a lot of classes, which means >700 warnings
like

> The field Foo.copyright is hiding a field from type Bar

I thought I could hide these with some setting in Prefs>Java>Compiler,
but even after I set everything to Ignore, I still get these warnings.
Is there another way to ignore or filter these warnings (without
filtering all warnings)? Or should I make a bug report/feature request?
Re: hidden-field preference? [message #19137 is a reply to message #19123] Sun, 11 May 2003 09:37 Go to previous messageGo to next message
Jonathan Gossage is currently offline Jonathan GossageFriend
Messages: 42
Registered: July 2009
Member
"Tom Roche" <tlroche@us.ibm.com> wrote in message
news:b9k0lo$h91$1@rogue.oti.com...
> I just stepped up to I20030507 from 2.1 final, and got a ton of
> warnings! In my workspace I have 1 public static final String
> copyright per class, and a lot of classes, which means >700 warnings
> like
>
> > The field Foo.copyright is hiding a field from type Bar
>
> I thought I could hide these with some setting in Prefs>Java>Compiler,
> but even after I set everything to Ignore, I still get these warnings.
> Is there another way to ignore or filter these warnings (without
> filtering all warnings)? Or should I make a bug report/feature request?
>
You can use the task filter to get rid of the entries in the task list, but
this will do nothing for the problem markers. If the strings are just there
for legal purposes and do not have to be accessed programmatically, just
make them private instead of public.
Re: hidden-field preference? [message #19644 is a reply to message #19137] Mon, 12 May 2003 08:52 Go to previous messageGo to next message
Philippe Mulet is currently offline Philippe MuletFriend
Messages: 229
Registered: July 2009
Senior Member
This diagnosis was recently introduced, and left as a warning by default for
testing purpose, until some UI preference is added (should occur soon).
Once UI is available, we will have it default to 'ignore'. Remember that
these integration builds are meant for testing.

"Jonathan Gossage" <jgossage@magma.ca> wrote in message
news:b9l5lf$3vd$1@rogue.oti.com...
>
> "Tom Roche" <tlroche@us.ibm.com> wrote in message
> news:b9k0lo$h91$1@rogue.oti.com...
> > I just stepped up to I20030507 from 2.1 final, and got a ton of
> > warnings! In my workspace I have 1 public static final String
> > copyright per class, and a lot of classes, which means >700 warnings
> > like
> >
> > > The field Foo.copyright is hiding a field from type Bar
> >
> > I thought I could hide these with some setting in Prefs>Java>Compiler,
> > but even after I set everything to Ignore, I still get these warnings.
> > Is there another way to ignore or filter these warnings (without
> > filtering all warnings)? Or should I make a bug report/feature request?
> >
> You can use the task filter to get rid of the entries in the task list,
but
> this will do nothing for the problem markers. If the strings are just
there
> for legal purposes and do not have to be accessed programmatically, just
> make them private instead of public.
>
>
Re: hidden-field preference? [message #19689 is a reply to message #19644] Mon, 12 May 2003 08:58 Go to previous messageGo to next message
Philippe Mulet is currently offline Philippe MuletFriend
Messages: 229
Registered: July 2009
Senior Member
Note: one thing you can do to disable these extra diagnosis is:

1. shutdown Eclipse
2. edit the saved preference file:
<workspace>\.metadata\.plugins\org.eclipse.jdt.core\pref_store.ini
and append the following 2 lines:
------------
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ig nore
------------
3. restart Eclipse, and rebuild all


"Philippe Mulet" <philippe_mulet@fr.ibm.com> wrote in message
news:b9nnf1$br5$1@rogue.oti.com...
> This diagnosis was recently introduced, and left as a warning by default
for
> testing purpose, until some UI preference is added (should occur soon).
> Once UI is available, we will have it default to 'ignore'. Remember that
> these integration builds are meant for testing.
>
> "Jonathan Gossage" <jgossage@magma.ca> wrote in message
> news:b9l5lf$3vd$1@rogue.oti.com...
> >
> > "Tom Roche" <tlroche@us.ibm.com> wrote in message
> > news:b9k0lo$h91$1@rogue.oti.com...
> > > I just stepped up to I20030507 from 2.1 final, and got a ton of
> > > warnings! In my workspace I have 1 public static final String
> > > copyright per class, and a lot of classes, which means >700 warnings
> > > like
> > >
> > > > The field Foo.copyright is hiding a field from type Bar
> > >
> > > I thought I could hide these with some setting in Prefs>Java>Compiler,
> > > but even after I set everything to Ignore, I still get these warnings.
> > > Is there another way to ignore or filter these warnings (without
> > > filtering all warnings)? Or should I make a bug report/feature
request?
> > >
> > You can use the task filter to get rid of the entries in the task list,
> but
> > this will do nothing for the problem markers. If the strings are just
> there
> > for legal purposes and do not have to be accessed programmatically, just
> > make them private instead of public.
> >
> >
>
>
new .metadata appends, was: hidden-field preference? [message #23551 is a reply to message #19689] Wed, 14 May 2003 19:23 Go to previous message
Tom Roche is currently offline Tom RocheFriend
Messages: 160
Registered: July 2009
Senior Member
Tom Roche wrote:
>>> I thought I could hide these [warnings new in I20030507] with some
>>> setting in Prefs>Java>Compiler, but even after I set everything to
>>> Ignore, I still get these warnings. Is there another way to ignore
>>> or filter these warnings (without filtering all warnings)?

Jonathan Gossage wrote:
>> If the strings are just there for legal purposes and do not have to
>> be accessed programmatically, just make them private instead of
>> public.

Actually I tried that before posting: it doesn't cause the warnings to
go away. (Which does kinda seem buglike ...)

Philippe Mulet wrote:
> Note: one thing you can do to disable these extra diagnosis is:

> 1. shutdown Eclipse

> 2. edit the saved preference file:

> <workspace>\.metadata\.plugins\org.eclipse.jdt.core\pref_store.ini

> and append the following 2 lines:

> ------------
> org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
> org.eclipse.jdt.core.compiler.problem.localVariableHiding=ig nore
> ------------

> 3. restart Eclipse, and rebuild all

Yay! Works as advertised. However, now I notice all the _other_ couple
thousand of new warnings :-)

So, I'm wondering: are there any other .metadata warning appends that
one might use? Feel free to point to documentation (but I'm guessing
that this is not yet documented).

Thanks for your assistance!
Previous Topic:Resources
Next Topic:Classloader only finding half of a jar? (db4o)
Goto Forum:
  


Current Time: Wed Feb 05 11:47:07 GMT 2025

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

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

Back to the top