удаление отладочной печати сравнения и не только
This commit is contained in:
@@ -184,9 +184,7 @@ public abstract class SQLiteDatabase extends Database {
|
||||
try {
|
||||
field_value = Enum.valueOf(enum_class, string);
|
||||
} catch (Exception ignore) {
|
||||
System.out.println(Utils.Brackets(string) + "not found");
|
||||
field_value = enum_constants[0];
|
||||
System.out.println(field_value);
|
||||
}
|
||||
} else field_value = enum_constants[0];
|
||||
} else
|
||||
|
||||
@@ -265,7 +265,6 @@ public class Global {
|
||||
if (files != null) {
|
||||
for (File file : files) {
|
||||
if (file.getName().contains(Constants.old_tests_db_name)) {
|
||||
System.out.println("found " + Utils.Brackets(file.getAbsolutePath()));
|
||||
try {
|
||||
Utils.forceDeleteWithCheck(file);
|
||||
} catch (Exception ex) {
|
||||
|
||||
@@ -195,13 +195,11 @@ public class DataSetControlForm extends ControlWithCurrentForm<DataTable> {
|
||||
//обновление в БД при ручном изменении размера столбиков.--------->>
|
||||
getTableHeader().addMouseListener(new MouseAdapter() {
|
||||
public void mouseReleased(MouseEvent arg0) {
|
||||
System.out.println("Header mouse released");
|
||||
String new_colNamesAndSizes = getColumnsProfile();
|
||||
// check if changed, if yes, persist...
|
||||
if (!colNamesAndSizes.equals(new_colNamesAndSizes)) {
|
||||
colNamesAndSizes = new_colNamesAndSizes;
|
||||
SaveColumns();
|
||||
System.out.println("columns updated");
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -216,7 +214,6 @@ public class DataSetControlForm extends ControlWithCurrentForm<DataTable> {
|
||||
if ((row >= 0)) {
|
||||
if (row != current_row_i) {
|
||||
current_row_i = row;
|
||||
// System.out.println("current row_i="+current_row_i);
|
||||
getDataSource().setCurrent(control.getRowObject(row));
|
||||
if (events_on) {
|
||||
try {
|
||||
@@ -228,7 +225,6 @@ public class DataSetControlForm extends ControlWithCurrentForm<DataTable> {
|
||||
}
|
||||
} else {
|
||||
current_row_i = Constants.Nan;
|
||||
// System.out.println("no current row_i="+current_row_i);
|
||||
getDataSource().dropCurrent();
|
||||
if (events_on) {
|
||||
try {
|
||||
|
||||
@@ -29,12 +29,10 @@ public abstract class ProvidedTokenMaker extends AbstractTokenMaker {
|
||||
public abstract void Body(TokenProvider provider);
|
||||
public abstract void performFinish(TokenProvider provider);
|
||||
public Token getTokenList(Segment text, int startTokenType, int startOffset) {
|
||||
// System.out.println(Utils.Brackets(text.toString()));
|
||||
resetTokenList();
|
||||
//структура для хранения индексов смещений, текущего состояния и т д.
|
||||
TokenProvider provider = new TokenProvider(text, startTokenType, startOffset);
|
||||
// provider.checkFortranWrap();
|
||||
// System.out.println(this.);
|
||||
while (provider.canRead()) {
|
||||
provider.readNext();
|
||||
Body(provider);
|
||||
|
||||
@@ -356,10 +356,8 @@ public class UI {
|
||||
}
|
||||
}
|
||||
public static void refreshTheme_r(Accessible accessible) {
|
||||
// System.out.println(accessible.getClass().getSimpleName() + ": children_count: ");
|
||||
AccessibleContext context = accessible.getAccessibleContext();
|
||||
if (accessible instanceof ThemeElement) {
|
||||
// System.out.println(accessible.getClass().getSimpleName() + ": refresh theme");
|
||||
((ThemeElement) accessible).applyTheme();
|
||||
} else {
|
||||
if ((accessible instanceof JPanel) ||
|
||||
@@ -390,8 +388,8 @@ public class UI {
|
||||
Component res = null;
|
||||
try {
|
||||
res = windowsStack.peek();
|
||||
} catch (Exception ex) {
|
||||
System.out.println("NO FRONT WINDOW FOUND");
|
||||
} catch (Exception ignored){
|
||||
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,6 @@ public class Dialog<T, F extends DialogFields> extends JDialog implements ThemeE
|
||||
addWindowListener(new WindowAdapter() {
|
||||
public void windowClosing(WindowEvent e) {
|
||||
UI.windowsStack.pop();
|
||||
System.out.println("Previous Front Window");
|
||||
onCancel();
|
||||
onClose();
|
||||
}
|
||||
@@ -121,7 +120,6 @@ public class Dialog<T, F extends DialogFields> extends JDialog implements ThemeE
|
||||
ShowTitle();
|
||||
setAlwaysOnTop(isOnTop());
|
||||
UI.windowsStack.push(this);
|
||||
System.out.println("New Front Window");
|
||||
setVisible(true);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,6 @@ public class SearchReplaceForm extends Form {
|
||||
}
|
||||
public void setMode(boolean replace) {
|
||||
replace_mode = replace;
|
||||
System.out.println("MODE CHANGED");
|
||||
tfReplace.setEnabled(replace_mode);
|
||||
String prefix = replace_mode ? "Заменить" : "Найти";
|
||||
bNext.setText(prefix + " далее");
|
||||
@@ -103,9 +102,6 @@ public class SearchReplaceForm extends Form {
|
||||
public void applyParams() {
|
||||
String toFind = Utils.hideRegularMetasymbols(tfFind.getText());
|
||||
String toReplace = Utils.hideRegularMetasymbols(tfReplace.getText());
|
||||
System.out.println("toFind=" + toFind);
|
||||
System.out.println("toReplace" + toReplace);
|
||||
System.out.println("============");
|
||||
context.setSearchFor(toFind);
|
||||
context.setMatchCase(registerOn.isSelected());
|
||||
context.setWholeWord(wholeWordOn.isSelected());
|
||||
|
||||
@@ -13,8 +13,6 @@ public class StringTemplate {
|
||||
public StringTemplate(String p, String s) {
|
||||
prefix = Utils.pack(p);
|
||||
suffix = Utils.pack(s);
|
||||
// System.out.println(Utils.Brackets(prefix));
|
||||
// System.out.println(Utils.Brackets(suffix));
|
||||
String[] prefix_words = prefix.split(" ");
|
||||
String[] suffix_words = suffix.split(" ");
|
||||
//настраиваем регулярное выражение----------
|
||||
@@ -37,25 +35,16 @@ public class StringTemplate {
|
||||
return text_in.substring(m.start(), m.end());
|
||||
}
|
||||
public boolean check(String text_in) {
|
||||
// System.out.println("sentense = " + Utils.Brackets(text_in));
|
||||
// System.out.println("pattern = " + Utils.Brackets(pattern));
|
||||
return Pattern.compile(pattern, Pattern.CASE_INSENSITIVE | Pattern.MULTILINE).matcher(text_in).find();
|
||||
}
|
||||
public String check_and_get_param(String text_in) {
|
||||
Pattern regex = Pattern.compile(pattern, Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);
|
||||
Matcher matcher = regex.matcher(text_in);
|
||||
// System.out.println("sentense = " + Utils.Brackets(text_in));
|
||||
// System.out.println("pattern = " + Utils.Brackets(pattern));
|
||||
if (matcher.find()) {
|
||||
// System.out.println("match found " + matcher.start() + " " + matcher.end());
|
||||
String sentence = text_in.substring(matcher.start(), matcher.end());
|
||||
// System.out.println("sentence=" + Utils.Brackets(sentence));
|
||||
String prefix_ = getFirstMatch(prefix, sentence);
|
||||
// System.out.println("prefix_ = " + Utils.Brackets(prefix_));
|
||||
String suffix_ = getFirstMatch(suffix, sentence);
|
||||
// System.out.println("suffix_ = " + Utils.Brackets(suffix_));
|
||||
String param = sentence.substring(prefix_.length(), sentence.length() - suffix_.length());
|
||||
// System.out.println("param = " + Utils.Brackets(param));
|
||||
return param;
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -124,7 +124,6 @@ public class Utils {
|
||||
.anyMatch(b -> b.equals(Character.UnicodeBlock.CYRILLIC));
|
||||
}
|
||||
public static void CheckDirectory(File dir) {
|
||||
// System.out.println("check: "+dir);
|
||||
if (!dir.exists()) {
|
||||
try {
|
||||
FileUtils.forceMkdir(dir);
|
||||
@@ -134,7 +133,6 @@ public class Utils {
|
||||
}
|
||||
}
|
||||
public static void CheckAndCleanDirectory(File dir) {
|
||||
// System.out.println("check and clean: "+dir);
|
||||
if (dir.exists()) {
|
||||
File[] files = dir.listFiles();
|
||||
if (files != null)
|
||||
@@ -174,7 +172,6 @@ public class Utils {
|
||||
}
|
||||
public static double getFileSizeMegaBytes(File file) {
|
||||
double res = file.length() / (1024 * 1024);
|
||||
System.out.println(res);
|
||||
return res;
|
||||
}
|
||||
public static void CleanDirectory(File dir) {
|
||||
@@ -534,7 +531,6 @@ public class Utils {
|
||||
public static ImageIcon getIcon(String path) {
|
||||
URL imageUrl = Utils.class.getResource(path);
|
||||
if (imageUrl == null) {
|
||||
System.out.println("image: " + Brackets(path) + "not found");
|
||||
return null;
|
||||
}
|
||||
return new ImageIcon(imageUrl);
|
||||
@@ -542,7 +538,6 @@ public class Utils {
|
||||
public static ImageIcon getTabIcon(String path) {
|
||||
URL imageUrl = Utils.class.getResource(path);
|
||||
if (imageUrl == null) {
|
||||
System.out.println("image: " + Brackets(path) + "not found");
|
||||
return null;
|
||||
}
|
||||
ImageIcon icon = new ImageIcon(imageUrl);
|
||||
@@ -646,18 +641,13 @@ public class Utils {
|
||||
throw new PassException("Не удалось удалить файл " + Brackets(file.getAbsolutePath()) + " за " + attempts + " попыток");
|
||||
}
|
||||
public static byte[] packFile(File src) throws Exception {
|
||||
System.out.println("pack begins: " + src.getAbsolutePath());
|
||||
byte[] dst = Files.readAllBytes(src.toPath());
|
||||
System.out.println("pack done: bytes:" + dst.length);
|
||||
return dst;
|
||||
}
|
||||
public static void unpackFile(byte[] bytes, File dst) throws Exception {
|
||||
FileOutputStream os = new FileOutputStream(dst);
|
||||
System.out.println(dst.getAbsolutePath());
|
||||
System.out.println("unpack begins: bytes:" + bytes.length);
|
||||
os.write(bytes);
|
||||
os.close();
|
||||
System.out.println("unpack done to " + dst.getAbsolutePath());
|
||||
}
|
||||
public static Socket createClientSocket(InetAddress address, int port, int timeout) throws Exception {
|
||||
Socket socket = new Socket();
|
||||
@@ -692,8 +682,6 @@ public class Utils {
|
||||
for (String ext : extensions) {
|
||||
if (file_extension.equalsIgnoreCase(ext)) {
|
||||
res.add(file);
|
||||
// System.out.println(file.getAbsolutePath() + ":" + Utils.Brackets(file_extension));
|
||||
// System.out.println("MATCH");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -742,7 +730,6 @@ public class Utils {
|
||||
InputStreamReader isrStdout = new InputStreamReader(stdout);
|
||||
BufferedReader brStdout = new BufferedReader(isrStdout);
|
||||
String line = brStdout.readLine();
|
||||
System.out.println(line);
|
||||
return line;
|
||||
}
|
||||
public static Vector<String> readAllLines(Process process) throws Exception {
|
||||
@@ -752,7 +739,6 @@ public class Utils {
|
||||
BufferedReader brStdout = new BufferedReader(isrStdout);
|
||||
String line;
|
||||
while ((line = brStdout.readLine()) != null) {
|
||||
System.out.println(line);
|
||||
output.add(line);
|
||||
}
|
||||
return output;
|
||||
@@ -830,18 +816,15 @@ public class Utils {
|
||||
// #pragma dvm array distribute[block][block], не важно
|
||||
String packedLine = remove(pack(line).toLowerCase(), "\n", "\r", "\t");
|
||||
if (packedLine.startsWith(prefix)) {
|
||||
// System.out.println(n + ": " + packedLine);
|
||||
packedLine = packedLine.substring(prefix.length());
|
||||
boolean bracketOpen = false;
|
||||
int pragmaMax = 0;
|
||||
String distr = "";
|
||||
for (int i = packedLine.indexOf('['); i < packedLine.length(); ++i) {
|
||||
char c = packedLine.charAt(i);
|
||||
// System.out.print(c);
|
||||
if (bracketOpen) {
|
||||
if (c == ']') {
|
||||
bracketOpen = false;
|
||||
// System.out.println("<DISTR>="+Utils.DQuotes(distr));
|
||||
if (distr.equals("block"))
|
||||
pragmaMax++;
|
||||
distr = "";
|
||||
@@ -856,7 +839,6 @@ public class Utils {
|
||||
}
|
||||
}
|
||||
}
|
||||
// System.out.println("< - " + pragmaMax);
|
||||
fileMax = Math.max(fileMax, pragmaMax);
|
||||
}
|
||||
++n;
|
||||
@@ -914,7 +896,6 @@ public class Utils {
|
||||
Pattern pattern = Pattern.compile(regex);
|
||||
Matcher matcher = pattern.matcher(text);
|
||||
while (matcher.find()) res++;
|
||||
System.out.println("matches=" + res);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -974,9 +955,7 @@ public class Utils {
|
||||
Vector<File> sources = new Vector<>();
|
||||
if (files != null) {
|
||||
for (File file : files) {
|
||||
// System.out.println(file.getAbsolutePath());
|
||||
if (isSource(file)) {
|
||||
// System.out.println(file.getAbsolutePath() + " is source!");
|
||||
sources.add(file);
|
||||
}
|
||||
}
|
||||
@@ -1030,7 +1009,6 @@ public class Utils {
|
||||
old.sort((o1, o2) -> Long.compare(o2.lastModified(), o1.lastModified()));
|
||||
for (int i = count - 1; i < old.size(); ++i) {
|
||||
File file = old.get(i);
|
||||
System.out.println(file.getName() + ":" + file.lastModified());
|
||||
FileUtils.forceDelete(file);
|
||||
}
|
||||
}
|
||||
@@ -1149,7 +1127,6 @@ public class Utils {
|
||||
}
|
||||
public static boolean checkFileCreation(File file) {
|
||||
for (int i = 1; i <= 10; ++i) {
|
||||
System.out.println("Проверка " + i + " существования файла " + Utils.Brackets(file.getAbsolutePath()));
|
||||
if (file.exists()) return true;
|
||||
else sleep(1000);
|
||||
}
|
||||
@@ -1192,32 +1169,25 @@ public class Utils {
|
||||
boolean hasWrap = false;
|
||||
int wi;
|
||||
//------
|
||||
//System.out.println("checking wrap...");
|
||||
//с нуля потому что и уже увеличено.
|
||||
for (int j = 0; (j < 6) && ((wi = i + j) < chars.length); ++j) {
|
||||
char s = chars[wi];
|
||||
// System.out.print(s);
|
||||
if ((j == 0) && ((s == 'c') || (s == 'C') || (s == '!'))) {
|
||||
// System.out.println("next line is FL comment");
|
||||
break;
|
||||
}
|
||||
if ((j > 0) && (j < 5) && (s == '!')) {
|
||||
// System.out.println("next line is comment");
|
||||
break;
|
||||
}
|
||||
if ((j == 5) && (s != ' ')) {
|
||||
hasWrap = true;
|
||||
i = wi + 1;
|
||||
// System.out.println("next line is WRAP");
|
||||
break;
|
||||
}
|
||||
}
|
||||
// System.out.println();
|
||||
//-----
|
||||
if (hasWrap)
|
||||
break;
|
||||
}
|
||||
// System.out.println();
|
||||
//добавление строки в результат.
|
||||
if ((line.length() > 0) || Global.db.settings.get(SettingName.EmptyLinesOn).toBoolean()
|
||||
// Global.db.settings.get(SettingName.SpacesOn).toBoolean()
|
||||
|
||||
@@ -82,12 +82,10 @@ public class DVMHelpParser {
|
||||
case "Output and debugging options:":
|
||||
case "Convertation options:":
|
||||
case "Optimization options:":
|
||||
System.out.println(t_line + " Options chapter started!");
|
||||
state = HelpParserState.OptionsChapter;
|
||||
ResetOption();
|
||||
break;
|
||||
case "Environment variables":
|
||||
System.out.println(t_line + " Environments chapter started!");
|
||||
state = HelpParserState.EnvironmentsChapterHeader;
|
||||
break;
|
||||
}
|
||||
@@ -99,7 +97,6 @@ public class DVMHelpParser {
|
||||
case OptionsChapter:
|
||||
if (t_line.isEmpty()) {
|
||||
TryConfirmOption();
|
||||
System.out.println("Chapter ended");
|
||||
state = HelpParserState.Search;
|
||||
} else {
|
||||
char[] symbols = t_line.toCharArray();
|
||||
@@ -107,9 +104,6 @@ public class DVMHelpParser {
|
||||
optionState = OptionState.SearchName;
|
||||
//-
|
||||
for (char c : symbols) {
|
||||
//-
|
||||
// System.out.print(c);
|
||||
//-
|
||||
switch (optionState) {
|
||||
case SearchName:
|
||||
switch (c) {
|
||||
@@ -176,7 +170,6 @@ public class DVMHelpParser {
|
||||
case EnvironmentsChapter:
|
||||
if (t_line.isEmpty()) {
|
||||
TryConfirmEnvironment();
|
||||
System.out.println("Chapter ended");
|
||||
state = HelpParserState.Search;
|
||||
} else {
|
||||
char[] symbols = line.toCharArray();
|
||||
|
||||
@@ -208,8 +208,6 @@ public class ShellParser {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// System.out.println(Utils.Brackets(state));
|
||||
// }
|
||||
} else
|
||||
state = ShellParserState.End;
|
||||
} catch (Exception ex) {
|
||||
@@ -279,7 +277,6 @@ public class ShellParser {
|
||||
if (lines.size() > 0) {
|
||||
last_line = lines.lastElement();
|
||||
if (no_extra_read = last_line.endsWith(invitationBuilder.toString())) {
|
||||
System.out.println("needs trim");
|
||||
lines.remove(lines.size() - 1);
|
||||
//больше ничего не читаем. но. обрезаем ее конец.
|
||||
last_line = last_line.substring(0, last_line.length() - invitationBuilder.length());
|
||||
|
||||
@@ -27,10 +27,8 @@ public class Validator {
|
||||
public void Validate() {
|
||||
for (i = getStartIndex(); i < chars.length && continueCondition(); ++i) {
|
||||
c = chars[i];
|
||||
System.out.print(c);
|
||||
Body();
|
||||
}
|
||||
System.out.println();
|
||||
PerformFinish();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user