例如,我有一个if子句,它始终为假(不是变量最终)。
public static final boolean FOO = false;
if (FOO) {
doSomething();
}
我希望它在Eclipse中以灰色的形式呈现,例如。 基本上,我希望它能像Visual C ++为不可达的宏一样完全工作。
Update: I want it to be shown real-time just like Eclipse compiles Java all the time when you make changes to code. This should be possible, shouldn t it? I know there are those dead code tools to do this afterwards but that s not what I like to do.