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 192829 - Javascript formatter and error highlighter issues
Summary: Javascript formatter and error highlighter issues
Status: RESOLVED WORKSFORME
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.0
Hardware: Macintosh (x86) Linux
: P4 normal (vote)
Assignee: Roman Svitanic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-03 06:58 UTC by pragalathan
Modified: 2015-05-22 09:55 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
highlighting color for javascript error (147.81 KB, image/png)
2010-12-03 06:58 UTC, pragalathan
Details
2_1 (127.60 KB, image/png)
2010-12-03 06:59 UTC, pragalathan
Details
2_2 (119.51 KB, image/png)
2010-12-03 06:59 UTC, pragalathan
Details
2_3 (114.47 KB, image/png)
2010-12-03 06:59 UTC, pragalathan
Details
2_4 (117.09 KB, image/png)
2010-12-03 07:00 UTC, pragalathan
Details
sample JSP file (237 bytes, application/octet-stream)
2010-12-03 07:01 UTC, pragalathan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pragalathan 2010-12-03 06:58:58 UTC
Created attachment 103555 [details]
highlighting color for javascript error

Javascript highlighter/formatter is giving me some issue. There are basically two problems.

1. When i delete a char, the cursor(carat) is misplaced. so is when i add the deleted character.
Steps:
- [file 2_1] carat is at pos: 91
- I removed the char ")" ; the error is highlighted but the carat is moved somewhere but the editor status bar says that it is in pos: 90 which is wrong [file2_2]
- i pressed the right arrow key. carat is moved to the right position, i.e., 91 as the status bar says.[file2_3]
- i move to left by pressing left arrow key and then typed ")". Error is gone but the caret is somewhere and the editor status bar says that it is in pos:91 which is wrong 

What category should I file this as bug?

2. The highlighting color for error look awkward and is different from java error highlighting which is pleasant to look at[file 1].
Comment 1 pragalathan 2010-12-03 06:59:18 UTC
Created attachment 103556 [details]
2_1
Comment 2 pragalathan 2010-12-03 06:59:37 UTC
Created attachment 103557 [details]
2_2
Comment 3 pragalathan 2010-12-03 06:59:57 UTC
Created attachment 103558 [details]
2_3
Comment 4 pragalathan 2010-12-03 07:00:14 UTC
Created attachment 103559 [details]
2_4
Comment 5 pragalathan 2010-12-03 07:01:41 UTC
Created attachment 103560 [details]
sample JSP file

Please use this JSP file and the step given above for reproducing the bug.
Comment 6 pragalathan 2010-12-09 05:41:55 UTC
Folks, any update on this?

Please follow the mentioned steps exactly to reproduce easily.

Note: try deleting the ')' char as mentioned
Comment 7 Petr Pisl 2010-12-09 17:43:20 UTC
Ad 1). I can not reproduce. I have tried your example page, pure js file, php file. The behavior is as expected. Are you able to reproduce it with the example page? Which version of the IDE do you use? 

Ad 2) It's true. Probably needs to be defined in jsp editor settings.
Comment 8 Petr Pisl 2015-05-22 09:06:43 UTC
Assigning  to Roman
Comment 9 Roman Svitanic 2015-05-22 09:55:28 UTC
Not reproducible anymore in the dev builds of Netbeans 8.1.

Product Version: NetBeans IDE Dev (Build 20150522-c3c5abf5e818)
Java: 1.7.0_80; Java HotSpot(TM) 64-Bit Server VM 24.80-b11
Runtime: Java(TM) SE Runtime Environment 1.7.0_80-b15
System: Linux version 3.13.0-37-generic running on amd64; UTF-8; en_US (nb)