History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-16603
Type: Usability Problem Usability Problem
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Peter Gromov
Reporter: Alexander Chernikov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Hibernate configuration file: improve class FQ names completion (when the single package statement is found in existent entry)

Created: 29 Apr 07 19:01   Updated: 03 Oct 08 20:12
Component/s: J2EE.Hibernate
Fix Version/s: Diana 8858

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 6,929
Fixed in build: 8,855


 Description  « Hide
Consider any property in hibernate.cfg.xml, which has the FQ class name as a value. E.g.
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
Provide such existent entry in config file. Put cursor into not short class name, but into package name, e.g. after a couple of chars within "dialect".
Press Ctrl+Space. Since "dialect" is the only choice it is immediately expanded. After that pressing either Enter or Tab in the completion list anyway corrupts the value: duplicate "dialect" is inserted.

Compare to java. Provide something like
java.util.ResourceBundle r;
within java method and invoke Ctrl+Space with cursor inside "util". The value is not expanded into code, and Tab does not currupt code.



 All   Comments   Work Log   Change History      Sort Order:
Alexander Chernikov - 20 Mar 08 17:06
8240: still the same, BTW.

Peter Gromov - 25 Sep 08 19:58
Now Tab overwrites the rest of the package name, as expected

Alexander Chernikov - 26 Sep 08 17:46
8838: yes, it overwrites the package name. In specified case it produces the following wrong code:
 <property name="dialect">org.hibernate.dialect.DerbyDialect.DerbyDialect</property> 

Because this property's completion suggests not the package names one by one, but full qualified names.
If you think this is not so expected, then comment; for now closing.


Alexander Chernikov - 26 Sep 08 18:30
To configure the hibernate do the following:
1. Add Hibernate facet to the module.
2. In Hibernate facet properties, Descriptor table do Add descriptor. Agree to add some hibernate.cfg.xml into a source root.
3. If the module has no dependencies to libraries required for Hibernate, then facet properties show Fix button. Use to to add jars.
4. Apply properties, go to hibernate.cfg.xml in editor. Insert an element like:
 <property name="dialect">org.hibernate.dialect.DerbyDialect</property> 

inside <session-factory> element.
5. Try completion there. It suggests FQN of SQL dialect classes.


Alexander Chernikov - 03 Oct 08 20:12
8860: fix confirmed.