diff --git a/napi_IntelliJ_plugin/src/com/sk/dialog/GenerateDialogPane.java b/napi_IntelliJ_plugin/src/com/sk/dialog/GenerateDialogPane.java index a45373bdcf450ef39cd0f7e7eef40ec3e76d4a9d..45b731b59207557bb821769ba2ca53074f32b94c 100644 --- a/napi_IntelliJ_plugin/src/com/sk/dialog/GenerateDialogPane.java +++ b/napi_IntelliJ_plugin/src/com/sk/dialog/GenerateDialogPane.java @@ -458,21 +458,21 @@ public class GenerateDialogPane extends JDialog { } static class StreamConsumer extends Thread { - InputStream is; + InputStream inS; - StreamConsumer(InputStream is) { + StreamConsumer(InputStream in) { super.setName("StreamConsumer"); - this.is = is; + this.is = in; } @Override public void run() { try { - InputStreamReader isr = new InputStreamReader(is); - BufferedReader br = new BufferedReader(isr); - String line; - while ((line = br.readLine()) != null) { - LOG.error("StreamConsumer" + line); + InputStreamReader inStr = new InputStreamReader(in); + BufferedReader bufR = new BufferedReader(inStr); + String lineStr; + while ((lineStr = bufR.readLine()) != null) { + LOG.error("StreamConsumer" + lineStr); } } catch (IOException ioException) { LOG.error("StreamConsumer io error" + ioException); diff --git a/napi_vs_plugin/src/gen/tools/VsPluginTool.js b/napi_vs_plugin/src/gen/tools/VsPluginTool.js index c00a6a7114c5d9df6fba42dc6ff0a9170760ffb3..217c030d1fd75af314e7dbf75b4cc0fc24c7048c 100644 --- a/napi_vs_plugin/src/gen/tools/VsPluginTool.js +++ b/napi_vs_plugin/src/gen/tools/VsPluginTool.js @@ -63,36 +63,35 @@ function checkFileError(ifname) { } function utf8ArrayToStr(array) { - var out, i, len, c; - var char2, char3; + var res, i, arrLen; + var ch1, ch2, ch3; - out = ""; - len = array.length; + res = ""; + arrLen = array.length; i = 0; - while (i < len) { - c = array[i++]; - switch (c >> 4) { - case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: - // 0xxxxxxx - out += String.fromCharCode(c); + while (i < arrLen) { + ch1 = array[i++]; + switch (ch1 >> 4) { + // 0xxxxxxx + case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: + res += String.fromCharCode(ch1); break; + // 110x xxxx 10xx xxxx case 12: case 13: - // 110x xxxx 10xx xxxx - char2 = array[i++]; - out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F)); + ch2 = array[i++]; + res += String.fromCharCode(((ch1 & 0x1F) << 6) | (ch2 & 0x3F)); break; + // 1110 xxxx 10xx xxxx 10xx xxxx case 14: - // 1110 xxxx 10xx xxxx 10xx xxxx - char2 = array[i++]; - char3 = array[i++]; - out += String.fromCharCode(((c & 0x0F) << 12) | - ((char2 & 0x3F) << 6) | - ((char3 & 0x3F) << 0)); + ch2 = array[i++]; + ch3 = array[i++]; + res += String.fromCharCode(((ch1 & 0x0F) << 12) | + ((ch2 & 0x3F) << 6) | + ((ch3 & 0x3F) << 0)); break; } - } - - return out; + } + return res; } function readFile(fn) {