2014-08-27 43 views
-1

我試圖建立通過Eclipse的UWC。我將Ant插件安裝到Eclipse。我使用JRE 1.7和1.6,但在這兩種情況下我都沒有成功。我收到以下錯誤。 有沒有人使用過這個工具?通用維基轉換器使用Eclipse

Buildfile: C:\Users\****\workspace\UWCbuild\appfusions-universal-wiki-converter-cc46cdb17c5c\build.xml 
    init: 
    compile.module.uwc.production: 
    [javac2] C:\Users\*****\workspace\UWCbuild\appfusions-universal-wiki-converter-cc46cdb17c5c\build.xml:156: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds 
    [javac2] Compiling 62 source files to C:\Users\******\workspace\UWCbuild\appfusions-universal-wiki-converter-cc46cdb17c5c\target\uwc\classes 
    [javac2] C:\Users\******\workspace\UWCbuild\appfusions-universal-wiki-converter-cc46cdb17c5c\src\com\atlassian\uwc\ui\FeedbackWindow.java:296: error: incompatible types 
    [javac2]   method = (State.Type) methodObj; 
    [javac2]     ^
    [javac2] required: java.awt.Window.Type 
    [javac2] found: com.atlassian.uwc.ui.State.Type 
    [javac2] C:\Users\******\workspace\UWCbuild\appfusions-universal-wiki-converter-cc46cdb17c5c\src\com\atlassian\uwc\ui\FeedbackWindow.java:321: error: incomparable types: java.awt.Window.Type and com.atlassian.uwc.ui.State.Type 
    [javac2]  if (method == State.Type.NOTE) { 
    [javac2]     ^
    [javac2] C:\Users\******\workspace\UWCbuild\appfusions-universal-wiki-converter-cc46cdb17c5c\src\com\atlassian\uwc\ui\FeedbackWindow.java:337: error: incomparable types: java.awt.Window.Type and com.atlassian.uwc.ui.State.Type 
    [javac2]  if (method == State.Type.STEP) { 
    [javac2]     ^
    [javac2] C:\Users\******\workspace\UWCbuild\appfusions-universal-wiki-converter-cc46cdb17c5c\src\com\atlassian\uwc\ui\FeedbackWindow.java:341: error: incomparable types: java.awt.Window.Type and com.atlassian.uwc.ui.State.Type 
    [javac2]  else if (method == State.Type.MAX) { 
    [javac2]      ^
    [javac2] Note: Some input files use or override a deprecated API. 
    [javac2] Note: Recompile with -Xlint:deprecation for details. 
    [javac2] Note: Some input files use unchecked or unsafe operations. 
    [javac2] Note: Recompile with -Xlint:unchecked for details. 
    [javac2] 4 errors 

    BUILD FAILED 
    C:\Users\******\workspace\UWCbuild\appfusions-universal-wiki-converter-cc46cdb17c5c\build.xml:156: Compile failed; see the compiler error output for details. 

    Total time: 2 seconds 

感謝您尋找

+0

問題在問題本身中重現它所需的最短代碼。沒有明確問題陳述的問題對其他讀者無益。請參見[如何創建最小,完整和可驗證示例](http://stackoverflow.com/help/mcve)。 – DavidPostill 2014-08-27 10:15:16

+0

@DavidPostill thx爲提示。 我正在使用在bitbucket.org上提供的版本 可用於 https://bitbucket.org/appfusions/universal-wiki-converter/downloads – michaelsteven 2014-08-27 10:44:33

+0

請**編輯**您的問題包括**最短的代碼要重現它在問題本身** – DavidPostill 2014-08-27 10:58:04

回答

1

我們得到了通過CMDLINE建設成爲一個Linux機器上完全一樣的錯誤 - 所以到Eclipse的不相關。

我們解決了這個問題 - 至少對於我們 - 通過修改的src/COM/Atlassian的/ UWC/UI/FeedbackWindow.java,改變了幾個類型和/或類型轉換。下面

被註釋掉的線是與原有的:尋求幫助調試(「爲什麼不是這個代碼的工作?」)必須包括所期望的行爲,一個具體問題或錯誤並且

//import com.atlassian.uwc.ui.State.Type; 
import com.atlassian.uwc.ui.State; 
... 

public void update(Observable stateObs, Object methodObj) { 
    State state; 
    //Type method; 
    State.Type method; 
    CastProblem problem = CastProblem.NOT_STATE; 
    try { 
     state = (State) stateObs; 
     problem = CastProblem.NOT_TYPE; //state cast didn't fail; let's try methodObj. Used by ClassCastException catch block 
     //method = (Type) methodObj; 
     method = (State.Type) methodObj; 
    } catch (ClassCastException e) { 
... 

//private void updateFeedbackTextArea(State state, Type method) { 
private void updateFeedbackTextArea(State state, State.Type method) { 
    //if ((State.Type) method == State.Type.NOTE) { 
    if (method == State.Type.NOTE) { 
... 

//private synchronized void updateProgressBar(State state, Type method) { 
private synchronized void updateProgressBar(State state, State.Type method) { 
...