Community
Participate
Working Groups
Build Identifier: 20100617-1415 SQLUpdater.updateAnnotation always returns if ex.currentToken.beginLine < 1. The problem with this is that if the errorToken is the first token in the editor, the currentToken is the null token on line zero. Thus, if the error is on the first token, the updateAnnotation ignores it. The fix is to return if currentToken.beginLine <1 and the errorToken's image is null or empty. This way, the errorToken, if it exists or, if not, the currentToken exists, is annotated. Reproducible: Always Steps to Reproduce: 1. Open SQL Editor whose type is set to a type that does not consume exceptions. (I can't find one that is delivered with DTP.) 2. Enter a statement that has an error in the first token. For Teradata's parser, this is something like "selet * from tbl;" (That is, misspell "select") 3. See that nothing is annotated in the SQL Editor. 4. See that the Problems view shows the error with the Location showing "Unknown"
Created attachment 176742 [details] A patch to fix the problem The patch simply checks that there is a token to annotate, either the errorToken is visible or there is a currentToken.
The patch looks pretty safe, so I'll go ahead and apply it.
Checked in patch, tagged to v201009230800