| Summary: | Add support for ctrl+click navigation in JPQL content assist | ||
|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | arjan tijms <arjan.tijms> |
| Component: | JPA | Assignee: | Pascal Filion <pascal.filion> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | neil.hauge |
| Version: | unspecified | Keywords: | plan |
| Target Milestone: | 3.3 M3 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | EaseOfUse | ||
Added support for hyperlink in JPQL Query text area (found in JPA Details view).
Note: If the entity or persistent attribute is declared in a JPA Mappings file, hyperlink is not available. It seems XML editor does not support it.
Example 1: SELECT e FROM Employee e WHERE e.name = 'JPQL'
Example 2: UPDATE Employee SET e.name = 'JPQL'
WHERE (SELECT a FROM address a) IS NOT NULL
Example 3: SELECT e FROM org.test.Employee e
Example 4: SELECT new java.lang.String(e.name) FROM Employee e
Example 5: SELECT e FROM Employee e WHERE e IN (Employee, Address)
Example 6: SELECT e FROM Employee e
WHERE e.access == javax.persistence.AccessType.FIELD
Support:
• Available for entity name and entity literal.
Example 1: Employee
Example 5: Employee and Address defined in IN()
• Available for fully qualified class name.
Example 3: org.test.Employee (Note: This is supported by
EclipseLink 2.4 and above)
Example 4: java.lang.String
Example 6: javax.persistence.AccessType
• Available for mapping.
• Open Declaration: Open the editor and select the persistent attribute,
which is either the attribute or the get method
• Open Declared Type: Open the editor on the mapping type
Example 2: name
Example 2: address
• Available for enum constant.
Example 6: FIELD
Example 2 should be using either qualified path expressions or unqualified path expressions, so it's either: UPDATE Employee e SET e.name = 'JPQL' WHERE (SELECT a FROM address a) IS NOT NULL or UPDATE Employee SET name = 'JPQL' WHERE (SELECT a FROM address a) IS NOT NULL I checked in the fix for properly supporting an unqualified path expression. EclipseLink bug 397858 takes care of fixing issues related to validating the path expression of an update item when the entity is not aliased with an identification variable. |
Build Identifier: 20110218-0911 Dali currently supports JPQL completion in orm.xml files. It however does not support the well known Eclipse feature of using ctrl+click to navigate to the declaration of entities used in the query. I would like to request support for ctrl+click navigation on an entity type in the FROM clause to Java the declaration of that type. E.g. SELECT _person FROM Person _person ctrl+click on Person should open Person.java in an editor. Additionally, for completeness ctrl+click on _person could scroll the editor to the position in the FROM clause where this identification variable is declared. Reproducible: Always