Bug 164244 - inappropriate raw type warnings
Summary: inappropriate raw type warnings
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M4   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 162431 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-11 19:09 EST by Jeff McAffer CLA
Modified: 2006-11-21 00:27 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff McAffer CLA 2006-11-11 19:09:56 EST
in 3.3 m3

I have a type that includes the line
    Collection bundles = new ArrayList();
The workspace compiler compliance settings are set to Java 5.0.  Accordingly I get various warnings about Collection and ArrayList being raw types.  Fair enough.

This code is in a plugin that should also run on 1.4 so I go to the plugin editor Overview page and set the Execution Envrionment to 1.4 and click the "Update classpath and compiler settings" link.  If I look at the project settings I see the "use project specific settings" is checked and the compliance level is set to 1.4.  If I had the editor open on the above mentioned file, the yellow triangle has now changed to a gray warning triangle (what does that mean?).  If I close and reopen the editor, the warnings are still there and are now back to being yellow.  Since the project level settings are configured to be 1.4, there should be no warnings.

Now, I go to the workspace settings and change the global compliance level to 1.4 and rebuild.  The warnings disappear.  If I change the global workspace setting back to 5.0 and rebuild the warning correctly DO NOT reappear.

Note that I have repeated this several times on different files in different projects.

So it appears that there is some sort of sticky warning marker.
Comment 1 Dani Megert CLA 2006-11-12 11:54:40 EST
What do you see in the Problems view? Note that the editor currently does not track build path changes (see bug 65267).

Comment 2 Jeff McAffer CLA 2006-11-12 12:18:30 EST
the problem seems to be that a build did not happen as a result of changing the execution environment and compiler settings.  When I changed one char in the file and saved the warnings went away for that file.  When I did a clean build of the project all the raw warnings went away.  Not sure if this is a JDT or PDE issue.
Comment 3 Martin Aeschlimann CLA 2006-11-17 10:49:42 EST
when changing the preferences, were you prompted to rebuild and did you accept?
Comment 4 Jeff McAffer CLA 2006-11-17 11:50:58 EST
yes but the point is that when you click in the PDE editor to update the compiler settings, a build is not triggered.  The whole point of having this stuff exposed as EEs and in the PDE editor is so that people don't have to mess with a set of preferences they don't nderstand
Comment 5 Wassim Melhem CLA 2006-11-17 22:34:34 EST
PDE update the Java project's compliance settings by calling IJavaProject#setOptions(Map).  I would expect that this would trigger a rebuild of the project.  Do we need to explicitly force a rebuild?
Comment 6 Martin Aeschlimann CLA 2006-11-20 11:32:18 EST
Unfortunatly setOptions doesn't trigger a build: Users have to do it manually.
Comment 7 Wassim Melhem CLA 2006-11-20 13:36:11 EST
ok, we'll force a rebuild then.
Comment 8 Wassim Melhem CLA 2006-11-21 00:26:55 EST
*** Bug 162431 has been marked as a duplicate of this bug. ***
Comment 9 Wassim Melhem CLA 2006-11-21 00:27:24 EST
done.