+ private void updateEnableThreads() {\r
+ int lineET;\r
+ if (targetLines[threadEnableId] != null) {\r
+ lineET = targetLineNumber[threadEnableId];\r
+ } else {\r
+ lineET = targetLineNumberMax;\r
+ targetLineNumber[threadEnableId] = lineET;\r
+ targetLineNumberMax++;\r
+ }\r
+ if (jCheckBoxEnableThreads.isSelected() == true) {\r
+ targetFileContents[lineET] = "MULTIPLE_THREAD = enabled";\r
+ targetLines[threadEnableId] = targetFileContents[lineET];\r
+ } else {\r
+ targetFileContents[lineET] = "#MT#";\r
+ targetLines[threadEnableId] = "";\r
+ }\r
+ }\r
+ \r
+ private void updateThreadCount() {\r
+ int lineTC;\r
+\r
+ if (targetLines[threadCountId] != null) {\r
+ lineTC = targetLineNumber[threadCountId];\r
+ } else {\r
+ lineTC = targetLineNumberMax;\r
+ targetLineNumber[threadCountId] = lineTC;\r
+ targetLineNumberMax++;\r
+ }\r
+ if (jCheckBoxEnableThreads.isSelected() == true) {\r
+ // Threading must be enabled\r
+ if (jTextFieldThreadCount.getText().length() > 0) {\r
+ // Thread Count must be greater than 0\r
+ Scanner scan = new Scanner(jTextFieldThreadCount.getText().trim()); \r
+ if (scan.nextInt() > 0) { \r
+ targetFileContents[lineTC] = "MAX_CONCURRENT_THREAD_NUMBER = " + jTextFieldThreadCount.getText().trim();\r
+ targetLines[threadCountId] = targetFileContents[lineTC];\r
+ } else {\r
+ Log.wrn("Build Preferences", "Threading Enabled, but thread count is not set, setting to default of 1.");\r
+ targetFileContents[lineTC] = "MAX_CONCURRENT_THREAD_NUMBER = 1";\r
+ targetLines[threadCountId] = "MAX_CONCURRENT_THREAD_NUMBER = 1";\r
+ }\r
+ } else {\r
+ Log.wrn("Build Preferences", "Threading Enabled, but thread count is not set, setting to default of 1.");\r
+ targetFileContents[lineTC] = "MAX_CONCURRENT_THREAD_NUMBER = 1";\r
+ targetLines[threadCountId] = "MAX_CONCURRENT_THREAD_NUMBER = 1";\r
+ }\r
+ } else {\r
+ // Don't track threads if threading is not enabled\r
+ targetFileContents[lineTC] = "#MT#";\r
+ targetLines[threadCountId] = "";\r
+ threadCount = "";\r
+ }\r
+ \r
+ }\r