v++
ограничения подстановки заголовков.
This commit is contained in:
7
.idea/workspace.xml
generated
7
.idea/workspace.xml
generated
@@ -9,11 +9,8 @@
|
||||
<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/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Constants.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/TestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/TestingPlanner.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMTestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMTestingPlanner.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/UserConnection.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/UserConnection.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/RemoteInitialiseUser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/RemoteInitialiseUser.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/PassCode_2021.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/PassCode_2021.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/AddSapforPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/AddSapforPackage.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
||||
@@ -37,6 +37,9 @@ 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[]{
|
||||
PassCode_2021.SPF_InsertIncludesPass
|
||||
};
|
||||
public static final PassCode_2021[] terminalSapforTestingCodes = new PassCode_2021[]{
|
||||
PassCode_2021.CreateParallelVariants,
|
||||
PassCode_2021.SPF_SharedMemoryParallelization,
|
||||
|
||||
@@ -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 = 1056;
|
||||
version = 1057;
|
||||
String pattern = "MMM dd yyyy HH:mm:ss";
|
||||
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
||||
date_text = df.format(getClassBuildTime());
|
||||
|
||||
@@ -7,8 +7,8 @@ import Common.UI.UI;
|
||||
import Common.Utils.Index;
|
||||
import ProjectData.LanguageName;
|
||||
import TestingSystem.Common.Group.Group;
|
||||
import TestingSystem.Common.Test.Test;
|
||||
import TestingSystem.Common.TasksPackageState;
|
||||
import TestingSystem.Common.Test.Test;
|
||||
import TestingSystem.SAPFOR.Json.SapforConfiguration_json;
|
||||
import TestingSystem.SAPFOR.Json.SapforTasksPackage_json;
|
||||
import TestingSystem.SAPFOR.Json.SapforTest_json;
|
||||
@@ -90,8 +90,26 @@ public class AddSapforPackage extends AddObjectPass<SapforPackage> {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
boolean checkStartingCode(SapforConfiguration sapforConfiguration, PassCode_2021 code, int count, Vector<PassCode_2021> codes) {
|
||||
if (count > 2) {
|
||||
Log.Writeln_("Неверная конфигурация:" + sapforConfiguration.id + ": " +
|
||||
code.getDescription() +
|
||||
" возможно только один раз.");
|
||||
return false;
|
||||
}
|
||||
//--
|
||||
if ((count == 1) && codes.size() > 1) {
|
||||
if (!codes.firstElement().equals(code)) {
|
||||
Log.Writeln_("Неверная конфигурация:" + sapforConfiguration.id + ": " +
|
||||
code.getDescription() +
|
||||
" может быть только первой командой!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//--
|
||||
public boolean getConfigurationCommands(SapforConfiguration sapforConfiguration) {
|
||||
int headers_count = 0;
|
||||
//1. получить список всех команд.
|
||||
Vector<PassCode_2021> codes = new Vector<>();
|
||||
//-- счетчик завершающих команд.
|
||||
@@ -99,6 +117,10 @@ public class AddSapforPackage extends AddObjectPass<SapforPackage> {
|
||||
for (PassCode_2021 code : Constants.terminalSapforTestingCodes)
|
||||
terminalCodesCount.put(code, new Index());
|
||||
//--
|
||||
LinkedHashMap<PassCode_2021, Index> startingCodesCount = new LinkedHashMap<>();
|
||||
for (PassCode_2021 code : Constants.startingSapforTestingCodes)
|
||||
startingCodesCount.put(code, new Index());
|
||||
//--
|
||||
for (SapforConfigurationCommand command : Global.testingServer.db.sapforConfigurationCommands.Data.values()) {
|
||||
if (command.sapforconfiguration_id == sapforConfiguration.id) {
|
||||
codes.add(command.passCode);
|
||||
@@ -108,6 +130,10 @@ public class AddSapforPackage extends AddObjectPass<SapforPackage> {
|
||||
terminalCodesCount.get(t_code).Inc();
|
||||
}
|
||||
//---
|
||||
for (PassCode_2021 s_code : Constants.startingSapforTestingCodes) {
|
||||
if (command.passCode.equals(s_code))
|
||||
startingCodesCount.get(s_code).Inc();
|
||||
}
|
||||
}
|
||||
}
|
||||
//--
|
||||
@@ -121,8 +147,13 @@ public class AddSapforPackage extends AddObjectPass<SapforPackage> {
|
||||
))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//-
|
||||
for (PassCode_2021 s_code : Constants.startingSapforTestingCodes) {
|
||||
if (!checkStartingCode(sapforConfiguration, s_code,
|
||||
startingCodesCount.get(s_code).getValue(), codes
|
||||
))
|
||||
return false;
|
||||
}
|
||||
//--
|
||||
return true;
|
||||
}
|
||||
@@ -234,8 +265,12 @@ public class AddSapforPackage extends AddObjectPass<SapforPackage> {
|
||||
SapforConfiguration_json configuration_json = new SapforConfiguration_json();
|
||||
configuration_json.id = configuration.id;
|
||||
configuration_json.flags = configuration.getFlags();
|
||||
Vector<PassCode_2021> codes = configuration.getPassCodes();
|
||||
//--- коррекцию кода нельзя вызвать если инклуды есть. в общем случае.
|
||||
if (!codes.firstElement().equals(PassCode_2021.SPF_InsertIncludesPass))
|
||||
configuration_json.codes.add(PassCode_2021.SPF_CorrectCodeStylePass); //всегда добавляется.
|
||||
configuration_json.codes.addAll(configuration.getPassCodes());
|
||||
//--
|
||||
configuration_json.codes.addAll(codes);
|
||||
//--->>
|
||||
package_json.configurations.add(configuration_json);
|
||||
//-->>
|
||||
|
||||
Reference in New Issue
Block a user