[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-1173) Suggest table and column names in @Column(name=...) and @Table(name=...)

Max Rydahl Andersen (JIRA) jira-events at lists.jboss.org
Thu Apr 17 09:44:44 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBIDE-1173?page=comments#action_12409347 ] 
            
Max Rydahl Andersen commented on JBIDE-1173:
--------------------------------------------

I apply this patch and I get a message saying the Hibernate proposals did not complete correctly and the following is in the Error log:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1762)
at org.hibernate.eclipse.jdt.ui.internal.HQLJavaCompletionProposalComputer.getCatalogSchemaTableSimple(HQLJavaCompletionProposalComputer.java:341)
at org.hibernate.eclipse.jdt.ui.internal.HQLJavaCompletionProposalComputer.computeCompletionProposals(HQLJavaCompletionProposalComputer.java:145)
at org.eclipse.jdt.internal.ui.text.java.CompletionProposalComputerDescriptor.computeCompletionProposals(CompletionProposalComputerDescriptor.java:303)
at org.eclipse.jdt.internal.ui.text.java.CompletionProposalCategory.computeCompletionProposals(CompletionProposalCategory.java:264)
at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.collectProposals(ContentAssistProcessor.java:251)
at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.computeCompletionProposals(ContentAssistProcessor.java:220)
at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1759)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:478)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:475)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:410)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:404)
at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1588)
at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:176)
at org.eclipse.ui.texteditor.ContentAssistAction$1.run(ContentAssistAction.java:82)

And looking at the code I see that it assumes developers have written perfect code and have balanced () which of course is very seldom while writing code. 

I did this on the following line: @Table(name="XYZ") and tried code completing.




> Suggest table and column names in @Column(name=...) and @Table(name=...)
> ------------------------------------------------------------------------
>
>                 Key: JBIDE-1173
>                 URL: http://jira.jboss.com/jira/browse/JBIDE-1173
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: Hibernate
>            Reporter: Gavin King
>         Assigned To: Max Rydahl Andersen
>            Priority: Optional
>             Fix For: 2.1
>
>         Attachments: JBIDE-1173_20080417.zip
>
>
> We have all the schema information right there.  Use it!

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

        



More information about the jbosstools-issues mailing list