Community
Participate
Working Groups
Build Identifier: M20110210-1200 If you set the compiler errors/warnings on Missing '@Override' annotation to Error and also check Include implementations of interface methods (Java 1.6 or higher) and you try to execute a Java snippet you get the following error (only for the first snippet I guess): The method run() of type CodeSnippet_1 should be tagged with @Override since it actually overrides a superclass method string cannot be resolved to a type I think the template should be updated. (Maybe in org.eclipse.jdt.internal.eval.CodeSnippetToCuMapper#buildCUSource(String) near the String constant "public void run() throws Throwable {". I think that should be "@Override public void run() throws Throwable {", although I have not tested.) Reproducible: Always Steps to Reproduce: 1. Set the Window/Preferences/Java/Compiler/Errors/Warnings Missing '@Override' annotation to Error Check the Include implementations of interface methods (1.6 or higher) 2. Create a Scrapbook page (.jpage) 3. Try to Execute, Inspect, or Display a valid expression (for example ""). Workaround: Undo step 1 (change it for example Warning).
This is a regression as the code snippet page might not work in 1.6 mode. I'll work on a fix.
Created attachment 195352 [details] Proposed fix + updated regression tests
Ayushman, please review. The fix is quite simple.
Patch looks good.
I'll update the patch to use the compliance instead of the source. Since this doesn't change anything for the verification, I'll release that version.
Created attachment 195378 [details] Proposed fix + updated regression tests Version that has been released.
Released for 3.7RC1.
Verified for 3.7RC1 with build I20110514-0800.