[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-922) Error performing HQL completion when 'tab' characters are present

Joseph Marques (JIRA) noreply at atlassian.com
Thu Apr 5 12:15:04 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_26635 ] 

Joseph Marques commented on HBX-922:
------------------------------------

It also happens for nested queries.

This auto-completion works:

SELECT a
FROM ObjectA AS a
WHERE a.stuff = 
(SELECT s FROM ObjectS AS s JOIN s. <-- auto-completion here succeeds

But it fails when there's a tab before the nested query:

SELECT a
FROM ObjectA AS a
WHERE a.stuff = 
<tab>(SELECT s FROM ObjectS AS s JOIN s. <-- auto-completion here fails

> Error performing HQL completion when 'tab' characters are present
> -----------------------------------------------------------------
>
>                 Key: HBX-922
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-922
>             Project: Hibernate Tools
>          Issue Type: Bug
>    Affects Versions: 3.2beta10
>            Reporter: Joseph Marques
>
> I'll get auto-completion for the "others" alias if I type:
> SELECT a 
> FROM ObjectA AS a 
> JOIN a.others AS others
> WHERE others.
> However, I if put a tab just before the join:
> SELECT a 
> FROM ObjectA AS a  
> <tab>JOIN a.others AS others
> WHERE others.
> Then I'll get an exception in the Error log:
> java.lang.StringIndexOutOfBoundsException: String index out of range: 108
> 	at java.lang.String.<init>(Unknown Source)
> 	at java.lang.String.valueOf(Unknown Source)
> 	at org.hibernate.tool.ide.completion.HQLAnalyzer.getSubQueries(HQLAnalyzer.java:206)
> 	at org.hibernate.tool.ide.completion.HQLAnalyzer.getVisibleSubQueries(HQLAnalyzer.java:130)
> 	at org.hibernate.tool.ide.completion.HQLAnalyzer.getVisibleEntityNames(HQLAnalyzer.java:142)
> 	at org.hibernate.tool.ide.completion.HQLCodeAssist.codeComplete(HQLCodeAssist.java:34)
> 	at org.hibernate.eclipse.hqleditor.HQLCompletionProcessor.computeProposals(HQLCompletionProcessor.java:117)
> 	at org.hibernate.eclipse.hqleditor.HQLCompletionProcessor.computeCompletionProposals(HQLCompletionProcessor.java:75)
> 	at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1612)
>         ...
> I don't believe this was an issue back in beta8.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list