Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 386753

Summary: Auto-format messes up JavaScript code in JSP page
Product: [WebTools] JSDT Reporter: Daniel Marth <daniel.marth>
Component: WebAssignee: Project Inbox <jsdt.web-inbox>
Status: CLOSED DUPLICATE QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: daniel_megert, ik9eow7a, thatnitind
Version: 3.4   
Target Milestone: 3.4.1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Test-case none

Description Daniel Marth CLA 2012-08-07 11:03:47 EDT
Created attachment 219626 [details]
Test-case

If you try to format JavaScript code in a JSP page, Eclipse inserts some characters that break the code.
I created a simple web application to test the bug and attached a test file. The result of using auto format in Eclipse:

<head>
<script type="text/javascript">
	<c:choose>
	<c:when test="${redirectQueryString eq 'default'}">__________
	var str = "<foag____orm>";
	____:when>
		<___
</script>
</head>



Version: Juno Release
Build id: 20120614-1722
Comment 1 Nitin Dahyabhai CLA 2012-08-23 16:34:23 EDT

*** This bug has been marked as a duplicate of bug 382474 ***