no message
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
package Common;
|
||||
import GlobalData.Machine.Machine;
|
||||
import GlobalData.Machine.MachineType;
|
||||
import GlobalData.User.User;
|
||||
import Common.Utils.Vector_;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
|
||||
import java.util.Vector;
|
||||
import java.util.regex.Pattern;
|
||||
public class Constants {
|
||||
public static final int Nan = -1;
|
||||
@@ -38,14 +37,23 @@ public class Constants {
|
||||
public static final String package_json = "package_json";
|
||||
public static final String results_json = "results_json";
|
||||
//--
|
||||
public static final PassCode_2021[] startingSapforTestingCodes = new PassCode_2021[]{
|
||||
public static final PassCode_2021[] startingSapforTestingCodes_old = new PassCode_2021[]{
|
||||
PassCode_2021.SPF_InsertIncludesPass
|
||||
};
|
||||
public static final PassCode_2021[] terminalSapforTestingCodes = new PassCode_2021[]{
|
||||
public static final PassCode_2021[] terminalSapforTestingCodes_old = new PassCode_2021[]{
|
||||
PassCode_2021.CreateParallelVariants,
|
||||
PassCode_2021.SPF_SharedMemoryParallelization,
|
||||
PassCode_2021.SPF_InsertDvmhRegions
|
||||
};
|
||||
//--
|
||||
public static final Vector<PassCode_2021> startSapforCodes =
|
||||
new Vector_<>(PassCode_2021.SPF_InsertIncludesPass);
|
||||
|
||||
public static final Vector<PassCode_2021> terminalSapforCodes =
|
||||
new Vector_<>( PassCode_2021.CreateParallelVariants,
|
||||
PassCode_2021.SPF_SharedMemoryParallelization,
|
||||
PassCode_2021.SPF_InsertDvmhRegions);
|
||||
//---
|
||||
public static final int parser_group = -1;
|
||||
public static final int compiler_group = -2;
|
||||
// DBProjectFile
|
||||
|
||||
@@ -56,7 +56,7 @@ public class MainMenuBar extends VisualiserMenuBar {
|
||||
setPreferredSize(new Dimension(0, 30));
|
||||
//---
|
||||
|
||||
/*
|
||||
|
||||
add(new MenuBarButton() {
|
||||
{
|
||||
setIcon("/icons/Apply.png");
|
||||
@@ -66,7 +66,6 @@ public class MainMenuBar extends VisualiserMenuBar {
|
||||
});
|
||||
}
|
||||
});
|
||||
*/
|
||||
ShowProject(false);
|
||||
}
|
||||
public void ShowUpdatesIcon() {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Common.UI;
|
||||
import Common.Constants;
|
||||
import Common.Current;
|
||||
import Common.Database.DataSet;
|
||||
import Common.Global;
|
||||
@@ -16,6 +17,7 @@ import Common.UI.Trees.GraphTreeCellRenderer;
|
||||
import Common.UI.Trees.SelectionTreeCellRenderer;
|
||||
import Common.UI.Windows.FormType;
|
||||
import Common.UI.Windows.SearchReplaceForm;
|
||||
import Common.Utils.Index;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.Compiler.CompilersDBTable;
|
||||
import GlobalData.Compiler.CompilersMenuBar;
|
||||
@@ -481,4 +483,5 @@ public class UI {
|
||||
public static void ShowProfilesWindow() {
|
||||
getProfilesWindow().ShowDialog("");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
8
src/Common/Utils/Vector_.java
Normal file
8
src/Common/Utils/Vector_.java
Normal file
@@ -0,0 +1,8 @@
|
||||
package Common.Utils;
|
||||
import java.util.Vector;
|
||||
public class Vector_<T> extends Vector<T> {
|
||||
public Vector_(T... data){
|
||||
for (T object: data)
|
||||
this.add(object);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user