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 201667 - Javascript code mixed with smarty template code
Summary: Javascript code mixed with smarty template code
Status: RESOLVED INCOMPLETE
Alias: None
Product: php
Classification: Unclassified
Component: Smarty (show other bugs)
Version: 7.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-06 08:47 UTC by Sebas_
Modified: 2011-11-16 16:42 UTC (History)
0 users

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 Sebas_ 2011-09-06 08:47:42 UTC
Product Version = NetBeans IDE Dev (Build nbms-and-javadoc-7840-on-20110906)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0
Runtime = Java HotSpot(TM) 64-Bit Server VM 21.0-b17

Example:

mytemplate.tpl:

{literal}
<script type="text/javascript">
function addMarker(id, image,location)
{

	var marker = new google.maps.Marker({
		position: location,
		map: map,
		icon: image,
		draggable: {/literal}{if $draggable}true{else}false{/if}{literal}
	});


	globalMarkers[id] = marker;

	return marker;
}
--more javascript below--
</script>

To reproduce, select the whole function. Press tab to indent it. This takes a bit longer than 'normal'. Press shift tab to remove the indent. Again this takes a bit long.
Now for the fun of it, copy paste the text "globalMarkers[id] = marker;" aprox. 30 times below it. Then do the shift indent again as before. Now it takes very long.

If you try to indent the whole file ~200 lines, Netbeans bails out with a java out of memory bug report window. 

Note, I wanted to report it thru the bug report popup window but while uploading the bug report (progress bar, bottom right), it again stopped telling me it was out of memory! (Uploading a file should not take many gb's of mem?).

Please contact me if you want to know more details (installed plugins?)
Comment 1 Martin Fousek 2011-09-16 12:49:25 UTC
Thanks for reporting that. It will be probably not Smarty but JavaScript related since everything inside {literal} blocks go thru standard HTML (JS, CSS) support. Please, could you attach whole sample file where it happens to you (java
out of memory report). Thanks...
Comment 2 Martin Fousek 2011-11-03 07:09:14 UTC
Sebas as I mentioned, please could you attach file where are you facing your troubles or profiling snapshot? http://wiki.netbeans.org/FaqProfileMeNow

Closing as incomplete for now, but please reopen it with attached requested details, thanks...