mybatis / mybatipse

Eclipse plugin adding support for MyBatis SQL Mapper Framework.
Eclipse Public License 1.0
332 stars 91 forks source link

Add MyBatis DTDs to XML Catalog #32

Closed paulkrause88 closed 6 years ago

paulkrause88 commented 9 years ago

I've completely switched from using Eclipse Lab's mybatiseditor plugin to mybatipse, and I love it. The overall user experience is much better. One feature that I miss is the way that mybatiseditor adds the following to the Eclipse XML Catalog as Plugin Specified Entries:

-//ibatis.apache.org//DTD SQL Map 2.0//EN -//ibatis.apache.org//DTD SQL Map Config 2.0//EN -//mybatis.org//DTD Config 3.0//EN and -//mybatis.org//DTD Mapper 3.0//EN.

Adding entries pointing to the appropriate jar:file URI's would have dual benefits, not only speeding up Eclipse, but lessing the load on the project's websites.

See also: https://github.com/mybatis/generator/issues/5

harawata commented 9 years ago

I'm happy to hear you like it, Paul :-) And thank you for the suggestion!

MyBatipse actually included the XML catalogs up until version 1.0.3, but I decided to remove it from the plugin. The reason is that these DTD files sometimes are updated to add new features/settings and if the DTD files were included in the plugin, XML editor reports error even though the files on the web site are updated. (although I'm not so sure, modifying an existing DTD file might be an irregular procedure)

Regarding the load on the project's website, Eclipse (3.5 or higher) automatically caches the DTD files to avoid unnecessary requests being sent.

So...does it make sense?

p.s. MyBatipse does not (and won't) support iBatis 2.x product line. Due to some fundamental differences/limitations, it is difficult (if possible) to provide the same level of editor support in iBatis 2.x files.

paulkrause88 commented 9 years ago

Interesting. I did not know that! I agree that it could be problematic to include the DTDs in the plugin. One thing the plugin could do is register the DTDs included in whatever MyBatis jars it finds in the classpath, but that may be complicated, just because class-loaders are such a mess to work with..

kazuki43zoo commented 7 years ago

Hi @paulkrause88 @harawata, Can close this issue or not?

paulkrause88 commented 6 years ago

I will close this issue since it doesn't seem useful.