では、自分で作成したGWT用のライブラリを第3者にも使えるようにするにはどうすればいいのでしょうか?実は、1点だけ注意点が必要です。
inheritsタグとは何なのか?
inheritsタグには、自分が作成したクラスのクラス名(パッケージ名含む)をかけばいいというものではありません。実はこのタグは、そこに記述されたGWTモジュールを呼びだそうとします。つまり、inheritsタグはクラスを呼び出しているのではなく、GWTモジュール(~gwt.xmlファイル)を呼び出しているのです。
~.gwt.xmlファイルを用意する
自作したライブラリに、.gwt.xmlファイルを用意しましょう。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd"> | |
<module> | |
<source path=""/> | |
</module> |
< inherits name='org.ochilab.gwt.client.util.Gwttool'/>というように呼び出すことができます。
0 件のコメント:
コメントを投稿