2015-02-02 3 views
0

У меня есть проект GWT под названием ProjectA, который представляет собой простой проект веб-приложения, сгенерированный с помощью плагина GWT eclipse.SuperDevMode с зависимым источником проекта

Кроме того, у меня есть второй проект (projectB), который является чистой Java-проект со следующей структурой

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  
    } 

} 

В gwt.xml Projecta, я включен <inherits name="com.test.Shared" />. Я использую TestClass.start() в некотором методе projectA. Затем я включил projectB в projectA. Поэтому я щелкнул правой кнопкой мыши в проектеA> Свойства> Путь сборки Java> Проекты и добавил projectB. Я переключился на вкладку Order and Export и активировал галочку на projectB.

Пока все хорошо. Когда я выполнить GWT компиляции на Projecta я не получаю никаких ошибок, но когда я бегу 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, но я хочу иметь возможность изменять код проектаB все время.

Как заставить SuperDevMode работать при использовании связанного проектаB?

ответ

-1

Генераторы могут потребовать скомпилировать файлы .class на вашем пути. Поэтому попробуйте включить папку bin/(или что-то, что она вызывается Eclipse) в путь к классам

Смежные вопросы