-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: newbie help with eclipse and XML mapping editor
PostPosted: Thu Apr 28, 2005 4:58 am 
Newbie

Joined: Thu Apr 28, 2005 4:09 am
Posts: 1
Hi,
I am using Hibernate3 Tools plugin for Eclipse. The problem is that so far
I haven't been able to make XML editor in Eclipse to do semantic
auto-completion for class names and property/field names
(the tag completion is working fine, though), so I came here for help.

I followed the setup instruction found in http://www.hibernate.org/hib_docs/tools/.
Basically, I downloaded Eclipse and JBoss-IDE with the versions indicated,
and also the Hibernate3 Tools.

I unzipped them as instructed and start running Eclipse. Then, after creating
a Java project, I created one Java class (e.g., User.java) in some
arbitrary package. Some private vars and their setters/getters were
also created at this point.

Then, is there any particular way of creating User.hbm.xml in Eclipse?
I couldn't find any choice for a "Hibernate Mapping File" in New wizard.
(in the Hibernate folder of the wizard, I saw only
"Console Configuration", "Hibernate Artifact Generation" and
"Hibernate Configuration File")
So I did it the "normal" way, which is creating a simple "File"
with the name User.hbm.xml.

Then, I started typing the XML preamble as follows:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

So far, in this step, the XML editor is able to complete the tags for me,
but it still doesn't do semantic completion. Basically,
it shows me what tag I can use and what property can be specified for the tag.
But it doesn't do any completion when I tried to type package name,
class name, or field name.

Is there any step I was missing? I just started using Eclipse yesterday,
so I might have done something really stupid. But since everything
looks ok, I don't know what went wrong.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 06, 2005 6:44 pm 
Newbie

Joined: Fri May 06, 2005 6:04 pm
Posts: 11
Location: ES - Brazil
Hi,

did you find the solution? I´m having the same problem.

I´m using eclipse 3.1M4 and JBossIDE-1.4.1-jre1.5. I followed the same steps (installed eclipse, installed JBoss, placed the hibernate tools plugin at the eclipse plugin directory).

When I right click at the file.hbm.xml it shows that it is edited using "XML editor (JBoss-IDE)". Should apear a "hibernate mapping editor" or something like it there?

Thanks

Pedro - Brazil


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 07, 2005 5:03 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you need to setup the hibernate mapping editor as an editor for .xml files (eclipse does not support extensions with a dot thus you cant register .hbm.xml as an extension)

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.