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

Bug 359644

Summary: JPQL completion causes tabs and enters to be replaced by \t and \n
Product: [WebTools] Dali JPA Tools Reporter: arjan tijms <arjan.tijms>
Component: JPAAssignee: Pascal Filion <pascal.filion>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: jolene.moffitt, neil.hauge
Version: unspecifiedFlags: neil.hauge: review+
Target Milestone: 3.0.2   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Remove escaping escaped characters when JPQL queries are in orm.xml none

Description arjan tijms CLA 2011-10-01 17:27:33 EDT
Build Identifier: 20110916-0149

Autocompletion of a JPQL query in orm.xml that contains tabs or enters causes those tabs or enters to be replaced by \t resp. \n.

E.g. consider the following entry in orm.xml:

<named-query name="TestEntity.getByID">
	<query> 
		SELECT 
			_testEntity 
		FROM 
			TestEntity _testEntity
		WHERE 
			_testEntity.id = :ID
	</query>
</named-query>

After removing the d in _testEntity and using ctrl+space to auto complete it back to "id", the editor will change the query into:

<named-query name="TestEntity.getByIDD">
	<query> \n\t\t\tSELECT \n\t\t\t\t_testEntity \n\t\t\tFROM \n\t\t\t\tTestEntity _testEntity\n\t\t\tWHERE \n\t\t\t\t_testEntity.id = :ID\n\t\t</query>
</named-query>

Just typing the query with embedded tabs and enters and then saving it does not trigger this replacement.


Reproducible: Always
Comment 1 Pascal Filion CLA 2011-10-06 15:36:26 EDT
Created attachment 204711 [details]
Remove escaping escaped characters when JPQL queries are in orm.xml
Comment 2 Pascal Filion CLA 2011-10-11 10:05:29 EDT
Checked in the fix
Comment 3 Jolene Moffitt CLA 2011-11-09 11:34:12 EST
Verified in Build M-3.3.2-20111107175211

Verified when you remove the d and use content assist to add it back the \n, \t characters do not appear in the orm.xml editor.  See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.0.2