Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: X10 2.0.2
-
Fix Version/s: X10 2.0.3
-
Component/s: X10DT Source Editor
-
Labels:None
-
Environment:win/cygwin
-
Number of attachments :
Description
When I hover, or click anywhere on the line declaring the field: "var f: Hello;", I get the following exception:
Universal Editor Error
java.lang.NullPointerException
at org.eclipse.imp.x10dt.ui.editor.X10DocProvider.getHelpForEntity(X10DocProvider.java:316)
at org.eclipse.imp.x10dt.ui.editor.X10DocProvider.getDocumentation(X10DocProvider.java:85)
at org.eclipse.imp.editor.HoverHelper.getHoverHelpAt(HoverHelper.java:86)
at org.eclipse.imp.editor.internal.HoverHelpController.getHoverInfo(HoverHelpController.java:59)
at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:168)
The code is the following. Note that this problem occurs only when there is a compilation error (line "h = "). But not all compilation errors produce this behavior.
import x10.io.Console; public class Hello { var f: Hello; public static def main(args:Rail[String]!){ if(args.length>0){ Console.OUT.println("The first arg is: "+args(0)); } Console.OUT.println("Hello X10 world "); val h = new Hello(); // final variable var result : Boolean = h.myMethod(); // mutable variable h = Console.OUT.println("The answer is: "+result); } /** x10doc comment for myMethod */; public def myMethod()=true; }
Issue Links
- depends upon
-
XTENLANG-1219
The type checker needs to set the AST appropriately in the presence of compilation error
-
Activity
| Field | Original Value | New Value |
|---|---|---|
| Component/s | X10DT [ 13493 ] | |
| Component/s | X10DT Source Editor [ 14343 ] | |
| Fix Version/s | X10 2.0.3 [ 16215 ] |
| Affects Version/s | X10DT 2.0.1.1 [ 16184 ] | |
| Affects Version/s | X10 2.0.2 [ 16023 ] |
| Assignee | Mandana Vaziri [ mvaziri ] |
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
| Resolution | Fixed [ 1 ] | |
| Status | Resolved [ 5 ] | Reopened [ 4 ] |
| Link |
This issue depends upon |
| Status | Reopened [ 4 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
| Status | Resolved [ 5 ] | Closed [ 6 ] |
This seems to be a problem regardless of whether there's a compilation error. I'm running X10DT from HEAD of SVN trunk, and I get the error in a cleanly-compiling editor source buffer, pretty much no matter where I click.