This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | method()method() watch evaluated incorrectly | ||
---|---|---|---|
Product: | java | Reporter: | Jan Stola <jstola> |
Component: | Source | Assignee: | Svata Dedic <sdedic> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | apireviews, jglick, mentlicher, sdedic |
Priority: | P3 | Keywords: | API, API_REVIEW_FAST |
Version: | 7.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 192493, 237805 | ||
Attachments: | Proposed API change. |
Description
Jan Stola
2010-10-11 13:14:25 UTC
Not a bug of debugger. org.netbeans.api.java.source.TreeUtilities.parseStatement( "{\n getParent()getParent();\n}", SourcePositions[]); returns following Tree: "{ getParent(); getParent(); }" There are two statements trees and no error. org.netbeans.api.java.source.TreeUtilities.parseExpression( "getParent()getParent()", SourcePositions[]) returns following Tree: (JCTree$JCMethodInvocation) "getParent()" There is only one method invocation and no error. Two possible solutions: 1. parse* could return ErrorTree if the content was parsed with error. 2. parse* methods could be extended to also return list of errors found during parsing, so the user could get better feedback that simply "parse error". What would be better for the debugger? We currently check for Tree.Kind.ERRONEOUS so the (1) would fix it. (2) Would be certainly valuable, if it's feasible to implement, we can provide such more detailed message to the user. Thanks. Integrated into 'main-golden', will be available in build *201011170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/b8d1bf85ff31 User: Jan Lahoda <jlahoda@netbeans.org> Log: Updating the nb-javac library (for bugs #191963, #190904) Created attachment 103075 [details]
Proposed API change.
I would like to add new variants of the parse{Statement,Expression,StaticBlock,VariableInitializer} which can return parse errors - please see the attached text. Please review, thanks. For me the change is fine. Thanks. Javadoc says that methods return: "@return parsed {@link StatementTree} or null?" Do they return null iff there's an error (errors.size() > 0)? Honza, what is the status of this issue ? It looks like you were waiting for FAST API review initiated 2 years ago ... Seems still valid in 7.4 This is an open API review. Can you finish it or close it? This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss |