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 242250 - inline js code formatting and auto completion
Summary: inline js code formatting and auto completion
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: PC Windows 8 x64
: P3 normal (vote)
Assignee: Petr Pisl
Depends on:
Reported: 2014-02-23 23:22 UTC by nisp
Modified: 2014-02-26 00:05 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Settings for Netbeans installation (4.11 MB, application/octet-stream)
2014-02-23 23:22 UTC, nisp
Log file as requested (191.04 KB, application/octet-stream)
2014-02-24 21:14 UTC, nisp
Screen Capture 1 (326.95 KB, image/jpeg)
2014-02-26 00:04 UTC, nisp
Screen Capture 2 (311.30 KB, image/jpeg)
2014-02-26 00:05 UTC, nisp

Note You need to log in before you can comment on or make changes to this bug.
Description nisp 2014-02-23 23:22:54 UTC
Created attachment 145519 [details]
Settings for Netbeans installation

When any JS is embedded within HTML or PHP pages, Netbeans doesn't highlight the syntax and doesn't provide auto completion.

The sample code is as below:
<!DOCTYPE html>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Steps Template</title>
		<script type="text/javascript" src="js/jquery-1.10.1.min.js"></script>
		<script type="text/javascript" src="js/jquery-ui.min.js"></script>

		<script type="text/javascript" src="js/initializer.js"></script>
		<script type="text/javascript" src="js/database.js"></script>
		<div id="bg">
			<div id="mediaMini" style="">
				<div id="bgBlock" style="opacity:0;"></div>
		<script type="text/javascript">
			$(function() {
				var options = {
					'imgPath': 'images',
					'audioPath': 'audio'
				$(document).ready(function() {
					function preloadAllImages() {
						var imagesLoaded = 0;
						var images2PreLoad = new Array();
						for (var i in universalStepsData) {
							images2PreLoad.push(options.imgPath + '/' + (universalStepsData[i].imageSrc));
						var loading = function loadAllImages(callback) {
							var img = new Image();
							img.src = images2PreLoad[imagesLoaded];
							$(img).load(function() {
								if (imagesLoaded == images2PreLoad.length) {
									initialise('bgBlock', options);

My netbeans about page shows the following information.

Product Version: NetBeans IDE 7.4 (Build 201310111528)
Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 2
Java: 1.7.0_51; Java HotSpot(TM) 64-Bit Server VM 24.51-b03
Runtime: Java(TM) SE Runtime Environment 1.7.0_51-b13
System: Windows 8 version 6.2 running on amd64; Cp1252; en_AU (nb)
User directory: C:\Users\Nisarg\AppData\Roaming\NetBeans\7.4
Cache directory: C:\Users\Nisarg\AppData\Local\NetBeans\Cache\7.4

Please also refer to the attached zip file which contains settings for my Netbeans application.
Comment 1 Vladimir Riha 2014-02-24 07:41:56 UTC
Hi, it works for me. Did you try to restart NetBeans? Could you please attach IDE log (see [1]) from moment when highlighting doesn't work? Do you have any plugin installed?


Product Version: NetBeans IDE 7.4 (Build 201310111528)
Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 2
Java: 1.7.0_51; Java HotSpot(TM) Client VM 24.51-b03
Runtime: Java(TM) SE Runtime Environment 1.7.0_51-b13
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)
Comment 2 nisp 2014-02-24 21:13:05 UTC

I did restart my netbeans quite a lot of times. I waited for 3 days before reporting this issue.
As JS was not working, I tried to add JSLint plugin. But that was as a last resort.
Please find the attached log file.
Comment 3 nisp 2014-02-24 21:14:20 UTC
Created attachment 145557 [details]
Log file as requested
Comment 4 Petr Pisl 2014-02-25 10:39:26 UTC
It work's for me as well. Also it could work with NB 7.4, but can you try to install a newer build? thanks
Comment 5 nisp 2014-02-26 00:03:27 UTC
Well it doesn't work for me. I check for update from HELP -> CHECK FOR UPDATES , and it says there are no updates available. 

I am attaching a screenshots showing JS code without any formatting, text highlighting, or any other feature. 

Did the log file help? Could there be some NB setting I changed? (I highly doubt this but) could it be windows 8.1 thing? Is there any more information I can send which help to narrow down the problem?

I used to work on same files on NB7.3 and it used to work like charm. I PC crashed and had to install everything from scratch. Could there be some settings on .nbproject folder which might be causing this? We have different versions of NB in office on different computers all working on same project.
Comment 6 nisp 2014-02-26 00:04:47 UTC
Created attachment 145588 [details]
Screen Capture 1

Screen Capture 1 showing JS not highlighting or formatting any code.
Comment 7 nisp 2014-02-26 00:05:35 UTC
Created attachment 145589 [details]
Screen Capture 2

Screen Capture 2 showing JS not highlighting, formatting, auto completing any code.