Xdoclet2(一):找回Doclipse缺失的標籤提示--Qtags

使用Xdoclet2的Eclipse插件Doclipse,發現裏面僅提供了Plugin的Tag的提示。而如果要自已寫Plugin的時候就發現這個插件沒有提供最原始的Tag的提示,即Qtags。參考了Doclipse的文檔之後想自已動手寫一個XML文件來提供提示功能。(Doclipse插件除了提供默認的Plugin 配文件,還可以從用戶指定的一個文件查找符合格式的Plugin配置文件)。後來發現Xdoclet2的源碼中的Plugin里居然有Qtags的Plugin,這樣一來,代碼比較搞笑,在Qtags的源碼裏面使用Qtags的標籤生成Qtags標籤提示文件。而我再次去Doclipse的包裏找的時候,卻沒發現有Qtags的配置,鬱悶。於是只有自已配Ant腳本,手動生成Qtags的配置文件。
<?xml version="1.0" encoding="ISO-8859-1"?>

<doclipse>
  <description>@ tags</description>
  <tag target="class" doc="" name="@command.class">
    <attribute required="true" doc="" name="name"/>
    <attribute required="false" doc="" name="generate"/>
  </tag>
  <tag target="" doc="class level tag to specify deprecated aliases of current tag. those will be
bombed on creation" name="@qtags.alias"/>
  <tag target="class method" doc="specify one of the allowed values for tag or parameter" name="@qtags.allowed-value"/>
  <tag target="method" doc="specify default value for tag or tag parameter. this can be used only
on method level." name="@qtags.default"/>
  <tag target="class" doc="class level tag to specify deprecation of \@-tag." name="@qtags.deprecated"/>
  <tag target="class" doc="class level tag to specify that marked interface shall be not generated
itself. ( But methods will be used ) This is necessary to allow tag interface inheritance. ( For example,
hibernate has load of collection tags which share a lot of common parameters. )" name="@qtags.ignore"/>
  <tag target="method" doc="Specify the token used in list processing" name="@qtags.list-token"/>
  <tag target="class" doc="class level tag to specify allowed locations. this tag cab ne used only on class level to specify
locations where usage is allowed. Recognized values are &quot;class&quot; &quot;method&quot; &quot;constructor&quot; &quot;field&quot;" name="@qtags.location"/>
  <tag target="class" doc="specify that this tag can be use once on given program element" name="@qtags.once"/>
  <tag target="method" doc="specify that certain value is required to be present." name="@qtags.required"/>
</doclipse>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章