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 223201 - Navigator is repopulated even if DOM is unchanged
Summary: Navigator is repopulated even if DOM is unchanged
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-03 19:20 UTC by _ gtzabari
Modified: 2013-08-01 02:36 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 _ gtzabari 2012-12-03 19:20:07 UTC
Product Version: NetBeans IDE Dev (Build 201212030001)
Java: 1.7.0_09; Java HotSpot(TM) 64-Bit Server VM 23.5-b02
Runtime: Java(TM) SE Runtime Environment 1.7.0_09-b05
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev

1. Edit a Javascript JSDoc comment.
2. Notice the Navigator window is repopulated every time.

Expected behavior: The navigator window should only be repopulated if its contents actually change. Editing comments does not modify the DOM tree so the navigator view should remain unchanged.
Comment 1 Vladimir Riha 2012-12-05 12:22:49 UTC
looks similar to issue 222130
Comment 2 _ gtzabari 2012-12-05 15:21:26 UTC
Both issues have to do with making the navigator implementation more efficient. In my case I'm not even adding nodes to the DOM and the Navigator gets repopulated.

But yes, the end-goal is similar: we want to minimize visual changes if possible (it is distracting).
Comment 3 Vladimir Riha 2013-03-04 15:50:02 UTC
_ gtzabari: Can you please try it in NetBeans 7.3 or latest dev build to see if fixing issue 222130 helped? Thank you
Comment 4 _ gtzabari 2013-03-04 22:50:03 UTC
It is almost fixed. The changes are much less noticeable now but I found one last problem. Given:

/**
 * A queue is a first-in-first-out (FIFO) data structure. Items are added to the end of the queue
 * and removed from the front.
 *
 * This implementation is based on http://code.stephenmorley.org/javascript/queues/ by
 * Stephen Morley.
 */

/**
 * Creates a new queue.
 */
function Queue()
{
	"use strict";
	var length = 0;

	Object.defineProperty(this, "length",
		{
			enumerable: true,
			get: function()
			{
				return length;
			}
		});

	/**
	 * @return {boolean} true if the queue is empty, and false otherwise.
	 */
	this.isEmpty = function()
	{
		return length === 0;
	};
}

1. Position caret inside the first comment block.
2. Examine isEmpty() signature in Navigator. It should read "Boolean|boolean".
3. Insert a single character. Repeat step 2.
4. Keep on repeating step 3. Notice that method signature alternates between "Boolean|boolean" and "boolean|Boolean".

Expected behavior: method signature shouldn't be affected by editing of comment.
Comment 5 Petr Pisl 2013-07-30 19:40:26 UTC
Fixed in web-main.
Comment 6 Quality Engineering 2013-08-01 02:36:37 UTC
Integrated into 'main-silver', will be available in build *201307312300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/4d38c78abf95
User: Petr Pisl <ppisl@netbeans.org>
Log: #223201 - Navigator is repopulated even if DOM is unchanged