论坛首页 Java企业应用论坛

花一个小时做了一个XDcolet Tags在eclipse中的javadoc模板,...

浏览 16570 次
该帖已经被评为精华帖
作者 正文
   发表时间:2003-09-14  
汗!
上午贴的xml文件有误,下午吃完饭才发现!大家原谅则个!

想使用eclipse做hibernate开发,准备用Xdoclet生成代码,
在网上找了半天也没有找到插件,自己对插件又不熟,索性做了一个JavaDoc的XDoclet for hibernate的模板,大家在eclipse里面导入就可以象写javadoc一样写XDoclet的Tag了.

例子如下:
    [img src="hibernate..gif"][/img]

导出的xml文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<templates>
<template name="@hibernate.array" description="Defines a array" context="javadoc" enabled="true">@hibernate.array table=&& where=&& cascade=&all:none:save-update:delete& schema=&&</template>
<template name="@hibernate.bag" description="Defines a bag" context="javadoc" enabled="true">@hibernate.bag table=&& order-by=&& where=&& lazy=&false& cascade=&all:none:save-update:delete& inverse=&& schema=&&</template>
<template name="@hibernate.class" description="Declare a persistent class" context="javadoc" enabled="true">@hibernate.class table=&& dynamic-update=&& dynamic-insert=&& polymorphism=&explicit:implicit& discriminator-value=&& mutable=&& schema=&& proxy=&&</template>
<template name="@hibernate.collection-element" description="Defines a collection-element" context="javadoc" enabled="true">@hibernate.collection-element column=&& type=&& length=&& not-null=&false& unique=&false&</template>
<template name="@hibernate.collection-index" description="Defines a collection-index" context="javadoc" enabled="true">@hibernate.collection-index column=&& type=&& length=&&</template>
<template name="@hibernate.collection-jcs-cache " description="Defines a @hibernate.collection-jcs-cache " context="javadoc" enabled="true">@hibernate.collection-jcs-cache  usage=&read-write:nonstrict-read-write:read-only&</template>
<template name="@hibernate.collection-key" description="Declares a collection key" context="javadoc" enabled="true">@hibernate.collection-key column=&&</template>
<template name="@hibernate.collection-many-to-many" description="Defines a collection-many-to-many" context="javadoc" enabled="true">@hibernate.collection-many-to-many column=&& class=&& outer-join=&true:false:auto&</template>
<template name="@hibernate.collection-one-to-many" description="Defines a collection-one-to-many" context="javadoc" enabled="true">@hibernate.collection-one-to-many class=&&</template>
<template name="@hibernate.column" description="Customize column mapping" context="javadoc" enabled="true">@hibernate.column name=&& length=&&not-null=&& unique=&false& index=&& unique-key=&& sql-type=&&</template><template name="@hibernate.component" description="Declares a component" context="javadoc" enabled="true">@hibernate.component class=&&</template>
<template name="@hibernate.composite-element" description="Defines a composite-element" context="javadoc" enabled="true">@hibernate.composite-element class=&&</template><template name="@hibernate.discriminator" description="Defines a discriminator" context="javadoc" enabled="true">@hibernate.discriminator column=&false& type=&& length=&false&</template>
<template name="@hibernate.generator-param" description="Declare a named query for class" context="javadoc" enabled="true">@hibernate.generator-param name=&& value=&&</template><template name="@hibernate.id" description="Declares an identifier property" context="javadoc" enabled="true">@hibernate.id column=&& type=&& length=&& unsaved-value=&& generator-class=&uuid.hex:uuid.string:increment:assigned:native:identity:sequence:hilo:seqhilo:foreign&</template>
<template name="@hibernate.jcs-cache" description="Enables caching" context="javadoc" enabled="true">@hibernate.jcs-cache usage=&read-write: nonstrict-read-write:read-only&</template>
<template name="@hibernate.joined-subclass" description="Declare the current class as joined subclass " context="javadoc" enabled="true">@hibernate.joined-subclass proxy=&& dynamic-update=&& dynamic-insert=&& schema=&&</template>
<template name="@hibernate.joined-subclass-key" description="Declares a joined-subclass key " context="javadoc" enabled="true">@hibernate.joined-subclass-key column=&&</template>
<template name="@hibernate.list" description="Defines a list" context="javadoc" enabled="true">@hibernate.list table=&& where=&& lazy=&false& cascade=&all:none:save-update:delete& schema=&&</template>
<template name="@hibernate.many-to-one" description="Declares a many-to-one association" context="javadoc" enabled="true">@hibernate.many-to-one column=&& class=&& cascade=&all:none:save-update:delete& not-null=&& unique=&false& outer-join=&true:false:auto& insert=&false& update=&false&</template>
<template name="@hibernate.map" description="Defines a map" context="javadoc" enabled="true">@hibernate.map table=&& sort=&& order-by=&& where=&& lazy=&false& cascade=&all:none:save-update:delete& schema=&&</template>
<template name="@hibernate.one-to-one" description="Declares a one-to-one association" context="javadoc" enabled="true">@hibernate.one-to-one class=&& constrained=&false& cascade=&all:none:save-update:delete& outer-join=&true:false:auto&</template>
<template name="@hibernate.primitive-array" description="Defines a primitive-array" context="javadoc" enabled="true">@hibernate.primitive-array table=&& where=&& cascade=&all:none:save-update:delete& schema=&&</template>
<template name="@hibernate.property" description="Defines a property" context="javadoc" enabled="true">@hibernate.property column=&& type=&& length=&& not-null=&& unique=&false& insert=&false& update=&false&</template><template name="@hibernate.query" description="Declare a named query for class" context="javadoc" enabled="true">@hibernate.query name=&& query=&&</template>
<template name="@hibernate.set" description="Defines a set" context="javadoc" enabled="true">@hibernate.set table=&& sort=&& order-by=&& where=&& lazy=&false& cascade=&all:none:save-update:delete& inverse=&& schema=&&</template>
<template name="@hibernate.subclass" description="Declare the current class as subclass" context="javadoc" enabled="true">@hibernate.subclass dynamic-update=&false& dynamic-insert=&false& discriminator-value=&& proxy=&&</template>
<template name="@hibernate.timestamp" description="Declares a timestamp property" context="javadoc" enabled="true">@hibernate.timestamp column=&&</template>
<template name="@hibernate.version" description="Declares a version property" context="javadoc" enabled="true">@hibernate.version column=&& type=&& Valid=&integer:short:long:timestamp:calendar &</template>
</templates>
   发表时间:2003-09-14  
看的我都动心了,都有点想用Eclipse了。不过我不太懂Eclipse,不能帮助你测试了。
0 请登录后投票
   发表时间:2003-09-14  
真好啊,我对ellispe也不熟悉,请问我要出现开发平台上面的标签,需要把上面的xml怎么做?
0 请登录后投票
   发表时间:2003-09-14  
恩,搞了一下,可是找不到到底把这个xml文件怎么放入开发平台作为模块使用,能不能说明一下到底是哪个菜单选项,怎么操作?谢
0 请登录后投票
   发表时间:2003-09-14  
窗口-&gt;首选项-&gt;java-&gt;编辑器-&gt;模板-&gt;导入;即可
0 请登录后投票
   发表时间:2003-09-16  
导入template 失败。
0 请登录后投票
   发表时间:2003-09-16  
不能使用&吧~~
这种选择该怎样改?
&all:none:save-update:delete&
0 请登录后投票
   发表时间:2003-09-16  
我也导入失败,说有非法字符
0 请登录后投票
   发表时间:2003-09-16  
能不能把这个和我的插件结合在一起.

大家一起想想, 有什么可以关联的地方.
0 请登录后投票
   发表时间:2003-09-16  
晕,怎么输入都不对劲,“&”的地方实际是这几个字符的组合
“&”+“q”+“u”+“o”+“t”+“;”
怎么打标记都不灵,没办法就这么写了。
大家用编辑器将“&”,用下面几个字符构成的字符串替换就可以了。
0 请登录后投票
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics