[jbosside-issues] [JBoss JIRA] Commented: (JBIDE-434) support configurable strategy for "format HQL" function in HQL editor

Max Andersen (JIRA) jira-events at lists.jboss.org
Thu Feb 15 16:29:30 EST 2007


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

we currently just use the default one used for hibernate's sql/hql format logging. Patches welcome ;)

> support configurable strategy for "format HQL" function in HQL editor
> ---------------------------------------------------------------------
>
>                 Key: JBIDE-434
>                 URL: http://jira.jboss.com/jira/browse/JBIDE-434
>             Project: JBoss IDE
>          Issue Type: Feature Request
>          Components: Hibernate Tools
>    Affects Versions: 2.0.0.Beta2
>            Reporter: Joseph Marques
>         Assigned To: Max Andersen
>
> I use the HQL editor to mock up new JPQL statements, and then copy and paste them from there over into some @NamedQuery definition on the appropriate class.  Persons responsible for maintaining multiple back-end codebases, or those motivated individuals that have personal projects on the side, might have to adhere to multiple code conventions across these different bases.  In order to facilitate more control in this arena, which I believe would also add significant value to the tool, the HQL editor could support formatting statements based on a configurable strategy.  Here are some suggestions:
> 1) Alias with "AS" - yes / no - determines whether all aliases should have "AS" inserted before it, if missing, or not
> 2) Captialization - ALLCAPS / allsmall / Firstletter
> 3) Relationship syntax - legacy / modern - determine whether inner joins shoudl be "IN (obj.relationships) rel" / "INNER JOIN obj.relationships rel
> 4) Explicit inner/outer - yes/no - determine whether the optional "inner" and "outer" keywords should be part of the formatted hql/jpql
> But that's just to start.  In an ideal world, every part of the formatting would be configurable (similar to how Eclipse offers extermely flexible code formatting) including:
> * before / after / or both before & after what hql/jpql keywords the statement should break to the next line
> * whether aliases should be automatically introduced (when they don't exist) for better readability

-- 
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