Summary: | 'this' allowed in scrapbook page | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Joe Szurszewski <eclipse> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | RESOLVED WORKSFORME | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | eclipse |
Version: | 2.1 | ||
Target Milestone: | 3.3 RC4 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Joe Szurszewski
2003-02-25 16:24:18 EST
Is this a MacOS X specific problem? If not please change Platform to "All" (I'm tracking all problems where platform == Macintosh) This is a problem on WinXP as well. Hmm. We have to allow "this" for code like: Runnable r = new Runnable() { public void run() { System.out.println(this.toString()); } }; r.run(); The code completions actually come from our IEvaluationContext, which is genereated from the associated java project (i.e. IJavaProject#newEvaluationContext()). Moving to JDT core for comment. NOTE: not critical. Is it possible to just disallow 'this' in the top-level context? This is exactly what it should be already. Need to investigate, not critical though. Actually, the code completion API doesn't carry the information about being in a static context. It will default to non-static. Would need to introduce a new API with isStatic flag (like evaluation APIs). Deferring Deferring reopen Not for 3.0 Removing milestone of deferred item. Reopen as LATER is deprecated... Comment 3 code snippet is now accepted, I got following output while executing it: CodeSnippet_1$1@1a42792 |