Bug 101570 - org.eclipse.swt.examples has warnings with the default JDT settings
Summary: org.eclipse.swt.examples has warnings with the default JDT settings
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 RC4   Edit
Assignee: Billy Biggs CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 101573 (view as bug list)
Depends on:
Blocks: 96195
  Show dependency tree
 
Reported: 2005-06-23 18:41 EDT by Dejan Glozic CLA
Modified: 2005-06-24 11:08 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dejan Glozic CLA 2005-06-23 18:41:19 EDT
When checking out org.eclipse.swt.examples with the default JDT settings, 
there are compilation warnings. Please fix and release into HEAD so that I can 
build Intro samples (no need to version and release to not part of the build 
schedule).
Comment 1 Dejan Glozic CLA 2005-06-23 20:48:21 EDT
*** Bug 101573 has been marked as a duplicate of this bug. ***
Comment 2 Billy Biggs CLA 2005-06-23 21:14:25 EDT
I fixed all of the trivial ones, not sure what to do with TableTreeTab.java. 
The class is no longer refered in the example since it's deprecated, but we kind
of wanted to keep it around so we can test it.

Carolyn, should we comment out the whole class, or just remove it?
Comment 3 Dejan Glozic CLA 2005-06-23 22:49:06 EDT
Just noticed that org.eclipse.swt.examples.paint has one warning (related to 
the field 'resourceBundle' that is never used locally).
Comment 4 Billy Biggs CLA 2005-06-23 22:51:16 EDT
I actually just released a fix for that to HEAD as well.  That warning didn't
show up with RC3 and seems to have appeared in more recent builds.
Comment 5 Dejan Glozic CLA 2005-06-23 22:52:58 EDT
Also for PaintSurface.java and PaintExample.java?
Comment 6 Dejan Glozic CLA 2005-06-23 22:54:26 EDT
(In reply to comment #4)
> I actually just released a fix for that to HEAD as well.  That warning didn't
> show up with RC3 and seems to have appeared in more recent builds.

Philippe turns on couple more compiler flags by default every release 
candidate :-).

Comment 7 Billy Biggs CLA 2005-06-23 23:21:08 EDT
I checked out the projects in a fresh workspace, got some new warnings, and
fixed those too.  Seems like every time I turn around there are some fresh
warnings waiting :)
Comment 8 Dejan Glozic CLA 2005-06-23 23:22:50 EDT
Yup, you need the fresh defaults :-).
Comment 9 Dejan Glozic CLA 2005-06-23 23:24:45 EDT
There should be another one in Tab.java:

Severity	Description	Resource	In Folder	Location
	Creation Time
1	The local variable filler is never read	Tab.java
	org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample
	line 438	June 23, 2005 10:40:58 PM
Comment 10 Billy Biggs CLA 2005-06-23 23:27:48 EDT
Got it now...   (!!!)
Comment 11 Carolyn MacLeod CLA 2005-06-24 06:23:07 EDT
Re comment 2 - I have deleted TableTreeTab and the commented-out reference in 
CustomControlExample. It's easy enough to get it back if we need it.

I don't yet know if there will be another build for RC4 - so far nobody has 
requested one.

Veronika, if there is one, we should probably slide all of these code changes 
in - not sure how many example projects Billy ended up fixing. I did not tag 
or release.

Billy & Dejan - I see a ton of "the local variable is hiding another variable" 
warnings in almost all of the examples. Are we ignoring those? Or do I 
magically have some "do even more checking" option set? It seems silly to go 
renaming a bunch of local variables at this point.
Comment 12 Dejan Glozic CLA 2005-06-24 07:30:25 EDT
Carolyn, I only care about default compiler settings. The errors/warnings you 
are talking about are either in your preferences or are in project-specific 
preferences that I ignore when exporting into samples. Last time I checked, 
deprecated warnings were the only one left for the default compiler flags.
Comment 13 Veronika Irvine CLA 2005-06-24 08:41:37 EDT
Carolyn, Dejan is getting a copy of the examples for an update site that is 
used when you add the SWT examples from the welcome page.  The update site 
does not require that the changes be part of the Eclipse 3.1 release.

I do not think we should try to grease in code changes (even to examples) at 
this late hour.  Lets fix things up in HEAD for Dejan - we can tag the 
project - and leave it at that.
Comment 14 Dejan Glozic CLA 2005-06-24 09:38:21 EDT
Works fine for me.
Comment 15 Billy Biggs CLA 2005-06-24 11:08:38 EDT
Since some other changes were going in, we went ahead and fixed the warnings for
RC4 as well.
Comment 16 Billy Biggs CLA 2005-06-24 11:08:54 EDT
Fixed for the 1 pm build.