| Summary: | Expressions View does not evaluate changed expression | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | MH <mhilpert> |
| Component: | Debug | Assignee: | JDT-Debug-Inbox <jdt-debug-inbox> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | darin.eclipse |
| Version: | 3.6 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
MH
This works for me. Anything in your .log? Hm, after I changed it to new java.util.Date(currentDateMillis) it works again. I noticed the same behaviour in the display view: return new Date(currentDateMillis); doesn't work anymore but return new java.util.Date(currentDateMillis); Why that? Why do we have to fully state the package with Helios as the former Eclipse didn't need that? (In reply to comment #2) > Why that? Why do we have to fully state the package with Helios as the former > Eclipse didn't need that? This should be no different in Helios - the expression is evaluated in the context of the current frame - if the frame has visiblity to Date, it works. If the frame does not have visiblity to Date, you need to fully qualify it. I verified this by having a class that does not import date and one that does. In the later case using "new Date(...)" worked. Well, it _did_ change in Helios as Ihave such in expressions in Eclipse for years and suddenly in Helios they don't work anymore. There has to be a change in Helios for this. The main projects I work and debug everyday with had not this problem before helios. The very same projects/Java sources/imports suddenly don't "work" for the expressions view ... think about it. My test shows the same behavior in 3.5 and 3.6.
With the following class I can use the expression "new Date(longValue)"
import java.util.Date;
public class Main {
public static void main(String[] args) {
Date date = new Date();
long longValue = System.currentTimeMillis();
for (int i = 0; i < 100; i++) {
longValue += (long) (i * 100000);
}
}
}
With the following class I have to use "new java.util.Date(longValue)"
public class Main {
public static void main(String[] args) {
long longValue = System.currentTimeMillis();
for (int i = 0; i < 100; i++) {
longValue += (long) (i * 100000);
}
}
}
|