表达式评估停止在Eclipse(STS)中工作 [英] Expression evaluation stopped working in Eclipse (STS)

查看:88
本文介绍了表达式评估停止在Eclipse(STS)中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用Eclipse的多年中,我从未见过此事,也无法弄清楚出了什么问题.由于某些原因,表达式视图(以及显示视图)将不再评估甚至是简单表达式(例如"5","Hello","myVariable","1 + 2").我得到的是,评估必须包含一个表达式或一组格式正确的语句".

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.

我正在Eclipse,Mylyn 3.9,Java 1.7,Windows 7 Pro 64b上运行Spring Tool Suite 3.4.0.我最近没有安装或重新配置任何东西.

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!

推荐答案

O,很奇怪.遇到了

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.

这篇关于表达式评估停止在Eclipse(STS)中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆