no message
This commit is contained in:
@@ -7,6 +7,7 @@ import GlobalData.Settings.SettingName;
|
||||
import GlobalData.Tasks.TaskState;
|
||||
import ProjectData.Files.DBProjectFile;
|
||||
import ProjectData.Project.db_project_info;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.PassException;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
@@ -1190,7 +1191,7 @@ public class Utils {
|
||||
}
|
||||
//добавление строки в результат.
|
||||
if ((line.length() > 0) || Global.db.settings.get(SettingName.EmptyLinesOn).toBoolean()
|
||||
// Global.db.settings.get(SettingName.SpacesOn).toBoolean()
|
||||
// Global.db.settings.get(SettingName.SpacesOn).toBoolean()
|
||||
) {
|
||||
lines.add(line.toString());
|
||||
visible_lines.add(v_line.toString());
|
||||
@@ -1209,7 +1210,7 @@ public class Utils {
|
||||
//строка оборвалась на EOF
|
||||
//добавление строки в результат.
|
||||
if ((line.length() > 0) || Global.db.settings.get(SettingName.EmptyLinesOn).toBoolean()
|
||||
// && Global.db.settings.get(SettingName.SpacesOn).toBoolean()
|
||||
// && Global.db.settings.get(SettingName.SpacesOn).toBoolean()
|
||||
) {
|
||||
lines.add(line.toString());
|
||||
visible_lines.add(v_line.toString());
|
||||
@@ -1250,8 +1251,8 @@ public class Utils {
|
||||
return true;
|
||||
}
|
||||
//--
|
||||
private static void get_newest_file_date_r(File dir, Vector<Long> dates){
|
||||
Vector<File> files= new Vector(Arrays.asList(dir.listFiles(new FileFilter() {
|
||||
private static void get_newest_file_date_r(File dir, Vector<Long> dates) {
|
||||
Vector<File> files = new Vector(Arrays.asList(dir.listFiles(new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File pathname) {
|
||||
return pathname.isFile();
|
||||
@@ -1267,18 +1268,18 @@ public class Utils {
|
||||
dates.add(files.firstElement().lastModified());
|
||||
}
|
||||
//--
|
||||
Vector<File> subdirs= new Vector(Arrays.asList(dir.listFiles(new FileFilter() {
|
||||
Vector<File> subdirs = new Vector(Arrays.asList(dir.listFiles(new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File pathname) {
|
||||
return pathname.isDirectory();
|
||||
}
|
||||
})));
|
||||
if (!subdirs.isEmpty()){
|
||||
for (File subdir: subdirs)
|
||||
if (!subdirs.isEmpty()) {
|
||||
for (File subdir : subdirs)
|
||||
get_newest_file_date_r(subdir, dates);
|
||||
}
|
||||
}
|
||||
public static long getNewestFileDate(File dir){
|
||||
public static long getNewestFileDate(File dir) {
|
||||
Vector<Long> dates = new Vector<>();
|
||||
get_newest_file_date_r(dir, dates);
|
||||
Collections.sort(dates);
|
||||
@@ -1289,24 +1290,24 @@ public class Utils {
|
||||
return dates.firstElement();
|
||||
}
|
||||
//методы работают только с непустыми запакованными данными
|
||||
public static Vector<Integer> unpackIntegers(String packed, String separator){
|
||||
public static Vector<Integer> unpackIntegers(String packed, String separator) {
|
||||
Vector<Integer> ids = new Vector<>();
|
||||
String[] data = packed.split(separator);
|
||||
if (data.length > 0) {
|
||||
for (String s: data) {
|
||||
for (String s : data) {
|
||||
if (!s.isEmpty())
|
||||
ids.add(Integer.parseInt(s));
|
||||
}
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
public static Vector<String> unpack_s(String packed, String separator){
|
||||
public static Vector<String> unpack_s(String packed, String separator) {
|
||||
Vector<String> ids = new Vector<>();
|
||||
String[] data = packed.split(separator);
|
||||
if (data.length > 0) {
|
||||
for (String s: data) {
|
||||
for (String s : data) {
|
||||
if (!s.isEmpty())
|
||||
ids.add(s);
|
||||
ids.add(s);
|
||||
}
|
||||
}
|
||||
return ids;
|
||||
|
||||
Reference in New Issue
Block a user