Community
Participate
Working Groups
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.
What do you see in the Problems view? Note that the editor currently does not track build path changes (see bug 65267).
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.
when changing the preferences, were you prompted to rebuild and did you accept?
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
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?
Unfortunatly setOptions doesn't trigger a build: Users have to do it manually.
ok, we'll force a rebuild then.
*** Bug 162431 has been marked as a duplicate of this bug. ***
done.