facebook

Xdoclet and OJB-Module

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #197838 Reply

    Hi!

    Since MyEclipseIde supports XDoclet I thought about opening my knowledge in this direction. Struts- and Web-Classes are no problem, but yesterday I wanted to use XDoclet to generate my database related XML-Files with the OJB-XDoclet-Module.

    I copied the module-jar-file (xdoclet-ojb-module-1.2b3-dev.jar) in the org.jboss.ide.eclipse.xdoclet.core-directory.
    Did the 2 refreshs as mentioned in the documentation.

    Codecompletion is working – but I have some problems getting the XDoclet-Configuration of my project to recognize my ojb-doclet.

    If I add a new XDoclet-Configuration I can only choose between the following doclets: documentdoclet, ejbdoclet, hibernatedoclet, jbossaop, jdodoclet, jmxdoclet, mockobjectdoclet, webdoclet and xdoclet.

    How do I get my new Doclet in this list? Does the module need to declare something?

    I’m using Eclipse2.1.1, MyEclipseIDE 2.5.1, Java 1.4.2, Windows 2000.

    Greetings,
    Gerald

    #197844

    Scott Anderson
    Participant

    Gerald,

    Good question. In all honesty, I haven’t tried this myself. I’ll have to look into it and get back to you.

    –Scott
    MyEclipse Support

    #197852

    Scott Anderson
    Participant

    Gerald,

    xdoclet-ojb-module-1.2b3-dev.jar

    Where did you get this XDoclet module? I just downloaded the distribution from the XDoclet site and it’s not contained in it.

    –Scott
    MyEclipse Support

    #197854

    Hello Scott!

    I downloaded it from the ojb-site, it’s included in the the following file: http://db.apache.org/builds/ojb/1.0.rc4/db-ojb-1.0.rc4-contrib.tgz

    As far as I got it it will be included in the official xdoclet-distribution, but it isn’t yet.

    Thank you for your help,
    Gerald

    #197863

    Scott Anderson
    Participant

    Gerald,

    I don’t think the Apache guys are finished with this yet. There is no xtags.xml file in the archive and all the packaging looks “wrong”. Compare it to the archives for the other XDoclet packages and you’ll see what I mean.

    Have you thought about using Hibernate? It’s already packaged in and does the same thing.

    –Scott
    MyEclipse Support

    #197864

    Hi Scott!

    I’m not quite sure if I understand you right. I just tried to compare the ojb-module with the web-module.

    The directory-structure looks quite similar and there is a META-INF/xtags.xml (with, at least as far as I can say from outside, the same syntax):
    #jar tf xdoclet-ojb-module-1.2b3-dev.jar
    META-INF/
    META-INF/MANIFEST.MF
    META-INF/xdoclet.xml
    xdoclet/
    xdoclet/modules/
    xdoclet/modules/apache/
    xdoclet/modules/apache/soap/
    xdoclet/modules/apache/soap/ejb/
    xdoclet/modules/apache/soap/ejb/ApacheSoapSubTask.class
    xdoclet/modules/apache/soap/ejb/XDocletModulesApacheSoapEjbMessages.class
    xdoclet/modules/apache/soap/ejb/XDocletModulesApacheSoapEjbMessagesMessages.properties
    xdoclet/modules/apache/soap/ejb/XDocletModulesApacheSoapEjbMessagesMessages_pt_BR.properties
    xdoclet/modules/apache/struts/
    xdoclet/modules/apache/struts/ejb/
    xdoclet/modules/apache/struts/ejb/StrutsFormSubTask.class
    xdoclet/modules/apache/struts/ejb/XDocletModulesApacheStrutsEjbMessages.class
    xdoclet/modules/apache/struts/ejb/XDocletModulesApacheStrutsEjbMessagesMessages.properties
    xdoclet/modules/apache/struts/ejb/XDocletModulesApacheStrutsEjbMessagesMessages_pt_BR.properties
    xdoclet/modules/apache/struts/StrutsConfigXmlSubTask$StrutsVersion.class
    xdoclet/modules/apache/struts/StrutsConfigXmlSubTask.class
    xdoclet/modules/apache/struts/StrutsFormTagsHandler.class
    xdoclet/modules/apache/struts/StrutsValidationXmlSubTask.class
    xdoclet/modules/apache/struts/StrutsValidatorTagsHandler.class
    xdoclet/modules/apache/soap/ejb/resources/
    xdoclet/modules/apache/struts/ejb/resources/
    xdoclet/modules/apache/struts/resources/
    META-INF/xtags.xml
    xdoclet/modules/apache/soap/ejb/resources/apache-soap.xdt
    xdoclet/modules/apache/struts/ejb/resources/struts_form.xdt
    xdoclet/modules/apache/struts/resources/struts-config_1_0.dtd
    xdoclet/modules/apache/struts/resources/struts-config_1_1.dtd
    xdoclet/modules/apache/struts/resources/struts_config_xml.xdt
    xdoclet/modules/apache/struts/resources/validation_1_1.dtd
    xdoclet/modules/apache/struts/resources/validation_xml.xdt

    I downloaded the file db-ojb-1.0.rc4-contrib.tgz and decompressed it.
    Then I copied the xdoclet-ojb-module-1.2b3-dev.jar to the jboss-xdoclet-directory.
    Refreshed the XDoclet-Modules and -Data.
    And the Doclet-Tag-Completion in the Sourceeditor is working.

    But maybe I should really have a look at Hibernate.

    Gerald

    #197895

    Hi Scott!

    Sorry for the wrong filelisting in my last post. (but the ojb-file looks quite similar – compared by the directory-structure)

    I tried to take my problem from the other side. I moved the xdoclet-hibernate-module-1.2b4.jar out of the xdoclet.core-directory. After refreshing the lists through the xdoclet-preferences I tried to create a new xdoclet-configuration (through Project/Properties) The entry for hibernate was still there. So for me it looks like as if the doclet-list (that you see when adding a new configuration to your project) isn’t refreshed – just the tag-list (for the tag-code-completion)

    Then I had a look at the following file: org.jboss.ide.eclipse.xdoclet.run_2.5.1\resources\standards.xml
    For me it looks like as if the available doclets are configured in this file. But the modification-date of this file hasn’t changed.

    Could you check if this file should be updated when a new module is added to the xdoclet.core-directory?

    Greetings,
    Gerald

    #197897

    Scott Anderson
    Participant

    Gerald,

    Congratulations on your clever snooping. 🙂

    Currently, our XDoclet support will allow you to upgrade supported XDoclets, but not add completely new ones. For that, our team needs to modify a couple of the XML files (standards.xml being one of them). So presently, adding OJB would be an enhancement request to the product team.

    –Scott
    MyEclipse Support

    #197899

    Hi!

    Okay – I will keep OJB as my choosen persitence-layer and – while the “new doclet”-support is still limited – hack the standards.xml-file.

    I think the following will satisfy my (very basic) needs for the moment:
    <task name=”ojbdoclet” className=”xdoclet.modules.ojb.OjbDocletTask” used=”true”>
    <attribute name=”excludedTags” used=”false”/>
    <attribute name=”destDir” used=”true”/>
    <attribute name=”mergeDir” used=”false”/>
    <attribute name=”force” used=”false”/>
    <attribute name=”verbose” used=”false”/>
    <attribute name=”addedTags” used=”false”/>
    <element name=”fileset” displayName=”fileset” used=”true”>
    <attribute name=”dir” used=”true”/>
    <attribute name=”includes” used=”false”/>
    <attribute name=”excludes” used=”false”/>
    </element>
    <element name=”ojbrepository” displayName=”ojbrepository” used=”true”>
    <attribute name=”destinationFile” used=”true”/>
    </element>
    <element name=”torqueschema” displayName=”torqueschema” used=”true”>
    <attribute name=”databaseName” used=”true”/>
    <attribute name=”destinationFile” used=”true”/>
    </element>
    </task>

    Greetings,
    Gerald

    #197905

    Scott Anderson
    Participant

    Gerald,

    Good deal. And now you’ve made it very easy for us to add support for OJB in an upcoming release. 🙂

    –Scott
    MyEclipse Support

    #197909

    Hi!

    It’s not complete, just enough to get started. If I have time I will look a little bit deeper into the configuration of the OJB-Module and add the remaining parameters. That’s a great way to get used to XDoclet, OJB and MyEclipse… 😉

    Greetings,
    Gerald

    #197917

    Scott Anderson
    Participant

    Gerald,

    Thanks for diving in. Once you finish the integration, please let us know and we’ll be glad to roll it into the product. 🙂

    –Scott
    MyEclipse Support

    #229419

    Dave S-B
    Member

    I’m trying to do this exact same thing – I notice the posting dates are from 2003, so before I go off hacking….
    Has anything changed since then with regards including custom XDoclet modules (specifically the OJB one)? If it’s not been implemented, this would be a *really* useful feature as we often would like to use XDoclet modules that aren’t part of the core and even have been known to create custom modules ourselves for specific projects.

Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: Xdoclet and OJB-Module

You must be logged in to post in the forum log in