no message

This commit is contained in:
2023-11-26 16:11:17 +03:00
parent 253de8526a
commit 269615abcb
15 changed files with 43 additions and 41 deletions

22
.idea/workspace.xml generated
View File

@@ -8,16 +8,20 @@
<component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Utils/Utils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Utils/Utils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ProjectData/Files/DBProjectFile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/Files/DBProjectFile.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ProjectData/Files/ProjectFile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/Files/ProjectFile.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Constants.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ProjectData/Project/db_project_info.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/Project/db_project_info.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Repository/Component/Sapfor/Sapfor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Component/Sapfor/Sapfor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/Group/Group.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Group/Group.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/Test/Test.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Test/Test.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/TestingServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/TestingServer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/ConvertCorrectnessTests.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/ConvertCorrectnessTests.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CreateTestFromDirectory.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CreateTestFromDirectory.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ProjectData/SapforData/Functions/FuncCall.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/SapforData/Functions/FuncCall.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ProjectData/SapforData/Functions/FuncCallH.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/SapforData/Functions/FuncCallH.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Repository/Component/Visualiser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Component/Visualiser.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DVMConvertProject.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DVMConvertProject.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SPF_CreateParallelVariant.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SPF_CreateParallelVariant.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SPF_GetGraphFunctions.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SPF_GetGraphFunctions.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SPF_InlineProcedure.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SPF_InlineProcedure.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SPF_InlineProcedures.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SPF_InlineProcedures.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SapforPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SapforPass.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SapforTransformation.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SapforTransformation.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/Transformation.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/Transformation.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -12,7 +12,7 @@
"AutoUpdateSearch": true,
"ConfirmPassesStart": true,
"ShowPassesDone": true,
"FocusPassesResult": true,
"FocusPassesResult": false,
"GlobalDBName": "db7.sqlite",
"ProjectDBName": "new_project_base.sqlite",
"BugReportsDBName": "bug_reports.sqlite",

View File

@@ -58,8 +58,8 @@ public class Constants {
public static final String attachments = "attachments";
public static final String statistic = "statistic";
public static final String unknown_metric = "";
public static final String old_tests_db_name = "tests2025";
public static final String tests_db_name = "tests2026";
public static final String old_tests_db_name = "tests2026";
public static final String tests_db_name = "tests2027";
public static final String dateNaN = "NaN";
//пробный коммит. изменение комментария.++
//кронтаб и перезагрузка

View File

@@ -1014,7 +1014,7 @@ public class db_project_info extends DBObject {
}
return null;
}
public void migrateFilesSettings(db_project_info target, boolean migrate_arrays, boolean migrate_headers, boolean sapforStyle) throws Exception {
public void migrateFilesSettings(db_project_info target, boolean migrate_arrays, boolean sapforStyle) throws Exception {
Pair<LinkedHashMap<String, DBProjectFile>, LinkedHashMap<String, DBProjectFile>> sortedFiles = sortFiles();
//--
LinkedHashMap<String, DBProjectFile> programs = sortedFiles.getKey();
@@ -1040,8 +1040,6 @@ public class db_project_info extends DBObject {
version_file.importSettings(file, sapforStyle);
target.db.Update(version_file);
} else {
if (//!file.state.equals(FileState.Excluded)&&
(!file.fileType.equals(FileType.header) || migrate_headers)) {
File toCopy = Paths.get(target.Home.getAbsolutePath(), file.name).toFile();
if (!toCopy.exists())
Files.copy(file.file.toPath(), toCopy.toPath());
@@ -1051,7 +1049,6 @@ public class db_project_info extends DBObject {
target.db.Insert(new_version_file);
}
}
}
//---
target.languageName = this.languageName;
target.maxdim = this.maxdim;
@@ -1098,7 +1095,7 @@ public class db_project_info extends DBObject {
//теперь копируем инфу по файлам.
if (cloneData) {
db_project_info res = new db_project_info(dst);
migrateFilesSettings(res, false, true, false);
migrateFilesSettings(res, true, false);
}
}
public void Clone(File dst) throws Exception {

View File

@@ -8,7 +8,7 @@ import Visual_DVM_2021.Passes.Pass_2021;
public class FuncCall extends FileObjectWithMessages {
public String funcName = ""; //не нужны дополнительные поля.имя функции это уже ключ.
public boolean canBeInlined = false;
public FuncInfo parent = null;
public int parent_offset = 0;
public FuncCall(DBProjectFile father_in, String funcName_in, int line_in) {
super(father_in, line_in);
funcName = funcName_in;
@@ -35,7 +35,4 @@ public class FuncCall extends FileObjectWithMessages {
UI.Info("Для подстановки функций требуется выполнить проход " + Utils.DQuotes(PassCode_2021.SPF_GetGraphFunctions.getDescription()));
}
}
public int getInlineOffset(){
return parent.line-line;
}
}

View File

@@ -15,6 +15,7 @@ public class FuncCallH extends FuncCall {
line = funcCall_in.line;
funcName = funcCall_in.funcName;
canBeInlined = funcCall_in.canBeInlined;
parent_offset = funcCall_in.parent_offset;
}
//особый случай. только для мейна
//его объявление - его же и вызов.
@@ -24,6 +25,7 @@ public class FuncCallH extends FuncCall {
line = funcInfo.line;
funcName = funcInfo.funcName;
canBeInlined = true;
parent_offset = 0;
}
@Override
public String getSelectionText() {

View File

@@ -62,7 +62,7 @@ public class Visualiser extends Component {
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
@Override
public void GetVersionInfo() {
version = 1034;
version = 1036;
String pattern = "MMM dd yyyy HH:mm:ss";
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
date_text = df.format(getClassBuildTime());

View File

@@ -143,7 +143,7 @@ public class DVMConvertProject extends ComponentsRepositoryPass<db_project_info>
@Override
protected void performDone() throws Exception {
target.joinExistingVersion(version, getDescription());
target.migrateFilesSettings(target.last_version, false, false, false);
target.migrateFilesSettings(target.last_version, false, false);
}
@Override
public JMenuItem createMenuItem() {

View File

@@ -64,7 +64,7 @@ public class SPF_CreateParallelVariant extends SapforTransformation {
@Override
protected void performDone() throws Exception {
Global.transformationPermission = TransformationPermission.VariantsOnly;
target.migrateFilesSettings(target.last_version, true, false, true);
target.migrateFilesSettings(target.last_version, true, true);
if (Current.hasUI())
variant.UpdateStats(sapfor.getPredictorStats(), target.last_version.name);
}

View File

@@ -85,7 +85,7 @@ public class SPF_GetGraphFunctions extends SapforAnalysis {
int c_line = Integer.parseInt(splited[idx.Inc()]);
//-
FuncCall fc = new FuncCall(file, call_name, c_line);
fc.parent = nf;
fc.parent_offset = nf.line - fc.line;
nf.calls.add(fc);
}
}

View File

@@ -16,7 +16,7 @@ public class SPF_InlineProcedure extends SapforFilesModification {
protected boolean canStart(Object... args) throws Exception {
if (super.canStart(args) && (call = (args.length > 0) ? (FuncCall) args[0] : null) != null) {
addOpt1 = call.funcName + "|" + Current.getFile().name;
addOpt2 = String.valueOf(call.getInlineOffset());
addOpt2 = String.valueOf(call.parent_offset);
Global.changeSetting(SettingName.PARSE_FOR_INLINE, "1");
// Pass_2021.passes.get(PassCode_2021.UpdateSetting).Do(SettingName.PARSE_FOR_INLINE, "1");
SPF_ParseFilesWithOrder.silent = true;

View File

@@ -31,7 +31,7 @@ public class SPF_InlineProcedures extends SapforTransformation {
Result.add(String.valueOf(selected_children.size()));
for (FuncCall fc : selected_children) {
Result.add(fc.file);
Result.add(String.valueOf(fc.getInlineOffset()));
Result.add(String.valueOf(fc.parent_offset));
}
}
}

View File

@@ -1,6 +1,7 @@
package Visual_DVM_2021.Passes;
import Common.Current;
import Common.UI.UI;
import ProjectData.ProjectView;
public class SapforPass extends SilentSapforPass {
//отличается наличием журнала и сообщений
@Override
@@ -12,8 +13,7 @@ public class SapforPass extends SilentSapforPass {
target.db.BeginTransaction();
try {
unpackMessages();
}
catch (PassException ex){
} catch (PassException ex) {
Log.Writeln_(ex.getMessage());
}
target.db.Commit();
@@ -24,6 +24,8 @@ public class SapforPass extends SilentSapforPass {
@Override
protected void showFinish() throws Exception {
UI.getMainWindow().getProjectWindow().RefreshProjectTreeAndMessages();
Current.set(Current.ProjectView, ProjectView.Files);
UI.getMainWindow().getProjectWindow().ShowProjectView();
UI.getMainWindow().getProjectWindow().ShowProjectSapforLog();
}
@Override

View File

@@ -55,7 +55,7 @@ public class SapforTransformation extends SapforPass {
@Override
protected void performDone() throws Exception {
//миграция типов файлов.
target.migrateFilesSettings(target.last_version, true, false, true);
target.migrateFilesSettings(target.last_version, true , true);
if (resetAnalysesAfter())
sapfor.ResetAllAnalyses();
}

View File

@@ -37,7 +37,7 @@ public class Transformation extends CurrentProjectPass {
protected void performDone() throws Exception {
//миграция типов файлов.
//это несапфоровские дела.тут копируем хедеры сами.
target.migrateFilesSettings(target.last_version, true, true, false);
target.migrateFilesSettings(target.last_version, true, false);
}
@Override
protected void performFail() throws Exception {