0

ProjectAGWT eclipse プラグインで生成された単純な Web アプリケーション プロジェクトであるGWT プロジェクトがあります。

また、次の構造を持つ純粋な Java プロジェクトである 2 番目のプロジェクト (projectB) があります。

src/com/test/shared/TestClass.java
src/com/test/Shared.gwt.xml

Shared.gwt.xml は次のようになります。

<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='shared'>
    <inherits name='com.google.gwt.user.User'/>
    <source path='shared'/>
</module>

TestClass.java は次のとおりです。

public class TestClass {

  public static void start() {
    // do something    
  }

}

projectA の gwt.xml に を含め<inherits name="com.test.Shared" />ました。TestClass.start()projectAのいくつかのメソッドで使用します。次に、projectA に projectB を含めました。したがって、projectA > Properties > Java Build Path > Projects を右クリックし、projectB を追加しました。タブに切り替えて、Order and ExportprojectB のチェックマークを有効にしました。

ここまでは順調ですね。projectA で GWT コンパイルを実行するとエラーは発生しませんが、projectA を SuperDevMode で実行すると、コンパイラは次のエラーを出力します。

GET /recompile/mobilePhoneGapIOS
   Job test.mobile.MobilePhoneGapIOS_1_4
      starting job: test.mobile.MobilePhoneGapIOS_1_4
      binding: mgwt.density=xhigh
      Compiling module test.mobile.MobilePhoneGapIOS
         Ignored 1 unit with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
         Computing all possible rebind results for 'com.gwtplatform.mvp.client.ApplicationController'
            Rebinding com.gwtplatform.mvp.client.ApplicationController
               Invoking generator com.gwtplatform.mvp.rebind.ApplicationControllerGenerator
                  [ERROR] The type 'test.mobile.client.BootstrapperImpl' was not found.
         [ERROR] Errors in 'gen/com/google/gwt/lang/test_00046mobile_00046MobilePhoneGapIOS__EntryMethodHolder.java'
            [ERROR] Line 3: Failed to resolve 'com.gwtplatform.mvp.client.ApplicationController' via deferred binding
         [WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)
            [WARN] com.gwtplatform.mvp.client.ApplicationControllerImpl
         Unification traversed 597 fields and methods and 351 types. 2 are considered part of the current module and 22 had all of their fields and methods traversed.
         [WARN] Some stale types ([test.mobile.client.BootstrapperImpl$7, test.mobile.client.BootstrapperImpl$6, test.mobile.client.BootstrapperImpl$5, test.mobile.client.BootstrapperImpl$4, test.mobile.client.BootstrapperImpl$3, test.mobile.client.BootstrapperImpl$2$3, test.mobile.client.BootstrapperImpl, test.mobile.client.BootstrapperImpl$2$2, test.mobile.client.BootstrapperImpl$2, test.mobile.client.BootstrapperImpl$1, com.gwtplatform.dispatch.rest.client.serialization.com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment, test.mobile.client.BootstrapperImpl$9, test.mobile.client.BootstrapperImpl$8, com.gwtplatform.mvp.client.com_gwtplatform_mvp_client_DesktopGinjectorImpl, com.gwtplatform.mvp.client.DesktopGinjectorProvider, test.mobile.client.BootstrapperImpl$2$1, test.mobile.client.com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment, com.gwtplatform.mvp.client.ClientGinjector, test.mobile.client.BootstrapperImpl$10]) were not reprocessed as was expected. This is either a compiler bug or a Generator has legitimately stopped creating these types.
      [ERROR] Compiler returned false
      [WARN] recompile failed
      [WARN] continuing to serve previous version 

エラーには TestClass クラスは表示されませんが、コメントアウトすると (使用しないでくださいTestClass.start())、SDM で問題なくコンパイルされます。

projectB をプリコンパイルして、ソースを jar lib として projectA に含めることができることはわかっていますが、projectB のコードをいつでも変更できるようにしたいと考えています。

リンクされた projectB を使用しているときに SuperDevMode を機能させるにはどうすればよいですか?

4

1 に答える 1