Expression evaluation stopped working in Eclipse (STS)
Asked Answered
D

1

1

In my years of using Eclipse, I've never seen this and can't figure out what's wrong. For some reason, the Expressions View (as well as the Display View) will no longer evaluate even simple expressions (like "5", "Hello", "myVariable", "1+2"). What I get is, "Evaluations must contain either an expression or a block of well-formed statements".

Weirder still, if I hover over a variable, the tooltip window shows the correct value and let's me drill into the object.

I've tried restarting, refreshing, rebooting, reloading. Googling, logging, and general poking around have yielded nothing either.

I'm running Spring Tool Suite 3.4.0 on Eclipse, Mylyn 3.9, Java 1.7, Windows 7 Pro 64b. I haven't installed or reconfigured anything lately.

Any ideas? Anyone? This is really killing me!

Danelaw answered 13/2, 2014 at 18:1 Comment(0)
D
1

O, the weirdness. Came across this question that pointed me to this bug. Apparently, the compiler gets confused with generic methods like this in the class:

public <T extends something> T myMethod() {};

Indeed, if I break on code in another class, the expression engine comes back to life. Certainly not the answer I was expecting.

Danelaw answered 13/2, 2014 at 19:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.