Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359644 - JPQL completion causes tabs and enters to be replaced by \t and \n
Summary: JPQL completion causes tabs and enters to be replaced by \t and \n
Status: VERIFIED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: 3.0.2   Edit
Assignee: Pascal Filion CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-01 17:27 EDT by arjan tijms CLA
Modified: 2011-11-09 11:34 EST (History)
2 users (show)

See Also:
neil.hauge: review+


Attachments
Remove escaping escaped characters when JPQL queries are in orm.xml (2.24 KB, patch)
2011-10-06 15:36 EDT, Pascal Filion CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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