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.

Bug 268794 - Since 8.2 query execution errors now move the caret to the start of the query
Summary: Since 8.2 query execution errors now move the caret to the start of the query
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 8.2
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: matthias42
URL:
Keywords:
: 270530 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-11-03 00:21 UTC by brettryan
Modified: 2017-05-02 17:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description brettryan 2016-11-03 00:21:10 UTC
Could this behaviour please be turned off or at least changed so that the insert cursor only moves if the cursor is not in the offending query within a file containing multiple queries.

This can be frustrating in a number of scenarios.

- The cursor was already at the offending place within the query.
- The query is executed, then the editor changes are being made while a long running query is executing, the cursor changes position while still typing after the execution completes.

One option would be to make the cursor move smarter, but this would involve managing the error output from various drivers and I don't think this is feasible.

Optionally have a configurable option to turn this behaviour off, but; don't move the cursor if we're already in the same query.
Comment 1 matthias42 2016-12-01 20:12:27 UTC
Your argumentation is sound - the change was introduced together with the fix for #189051. The system tries to extract the correct location of an error, but relies on a supported DBMS to do this. So the error location is still reported now, but the caret is not moved anymore.

The fix is pushed as:

http://hg.netbeans.org/core-main/rev/7fdd3974b83e
Comment 2 Quality Engineering 2017-01-12 04:02:39 UTC
Integrated into 'main-silver', will be available in build *201701120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7fdd3974b83e
User: Matthias Blaesing <matthias42@netbeans.org>
Log: #268794: Revert automatic caret movement introduced with fix for #189051

The intention of the implementation was  to make it easier to react to errors, but
in bug report #268794 valid points were raised, that made this impractical:

- The cursor was already at the offending place within the query.
- The query is executed, then the editor changes are being made while a long
  running query is executing, the cursor changes position while still typing
  after the execution completes.

As not all DBMS return valid or precise locations, this part of the fix is reverted.
Comment 3 matthias42 2017-05-02 17:19:16 UTC
*** Bug 270530 has been marked as a duplicate of this bug. ***