Исправление недочета с spf директивами. Пустые версии пакета отображаются серым. v++
This commit is contained in:
15
.idea/workspace.xml
generated
15
.idea/workspace.xml
generated
@@ -7,8 +7,15 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/Json/SapforVersionState.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" 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/TestingSystem/SAPFOR/Json/SapforVersion_json.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/Json/SapforVersion_json.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/PerformSapforTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/PerformSapforTask.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTask/SapforTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTask/SapforTask.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/VersionSummary.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/VersionSummary.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/icons/versions/TestVersion.png" beforeDir="false" afterPath="$PROJECT_DIR$/src/icons/versions/Empty.png" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -30,8 +37,8 @@
|
||||
<list>
|
||||
<option value="FxmlFile" />
|
||||
<option value="Interface" />
|
||||
<option value="Enum" />
|
||||
<option value="Class" />
|
||||
<option value="Enum" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
@@ -86,7 +93,7 @@
|
||||
<property name="UI_DESIGNER_EDITOR_MODE.UIDesignerToolWindowManager.SHOW" value="true" />
|
||||
<property name="UI_DESIGNER_EDITOR_MODE.UIDesignerToolWindowManager.WIDTH" value="509" />
|
||||
<property name="extract.method.default.visibility" value="public" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/src/icons/Transformations" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/src/icons/versions" />
|
||||
<property name="project.structure.last.edited" value="Artifacts" />
|
||||
<property name="project.structure.proportion" value="0.15" />
|
||||
<property name="project.structure.side.proportion" value="0.2" />
|
||||
@@ -99,8 +106,8 @@
|
||||
<recent name="controls.Trees" />
|
||||
</key>
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons\Transformations" />
|
||||
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons\versions" />
|
||||
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons\Transformations" />
|
||||
<recent name="C:\Users\misha\Documents\visual_sapfor_2023\src\icons" />
|
||||
<recent name="C:\Users\misha\Documents\visual_dvm_2020\src\icons" />
|
||||
<recent name="C:\Users\misha\Documents\visual_dvm_2020\src\icons\Transformations" />
|
||||
|
||||
@@ -450,7 +450,7 @@ public abstract class Sapfor extends OSDComponent {
|
||||
FileUtils.write(file,
|
||||
Utils.DQuotes(sapfor_drv)
|
||||
+ (flags.isEmpty() ? "" : (" " + flags))
|
||||
+ " -noLogo -spf"
|
||||
+ " -noLogo"
|
||||
+ " " + command +
|
||||
" 1>" +
|
||||
Utils.DQuotes(outputFile.getAbsolutePath()) +
|
||||
@@ -500,7 +500,7 @@ public abstract class Sapfor extends OSDComponent {
|
||||
"parse",
|
||||
sapfor_drv,
|
||||
workspace,
|
||||
"-parse *.f *.for *.fdv *.f90 *.f77",
|
||||
"-parse -spf *.f *.for *.fdv *.f90 *.f77",
|
||||
flags,
|
||||
Constants.parse_out_file,
|
||||
Constants.parse_err_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 = 1040;
|
||||
version = 1041;
|
||||
String pattern = "MMM dd yyyy HH:mm:ss";
|
||||
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
||||
date_text = df.format(getClassBuildTime());
|
||||
|
||||
@@ -488,7 +488,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
test.sender_name = account.name;
|
||||
test.sender_address = account.email;
|
||||
test.group_id = group.id;
|
||||
test.files=file.getName();
|
||||
test.files = file.getName();
|
||||
db.Insert(test);
|
||||
testsIds.add(test);
|
||||
//->>
|
||||
@@ -512,8 +512,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
//--
|
||||
if (Sapfor.getMinMaxDim(Sapfor.getTempCopy(new File(sapfor.call_command)), tempProject, test)) {
|
||||
db.Update(test);
|
||||
}
|
||||
else
|
||||
} else
|
||||
throw new RepositoryRefuseException("Не удалось определить размерность теста " + Utils.Brackets(test.description));
|
||||
break;
|
||||
case c:
|
||||
|
||||
6
src/TestingSystem/SAPFOR/Json/SapforVersionState.java
Normal file
6
src/TestingSystem/SAPFOR/Json/SapforVersionState.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package TestingSystem.SAPFOR.Json;
|
||||
public enum SapforVersionState {
|
||||
Empty, //версия оказалась пуста.
|
||||
Normal, //версия построена
|
||||
HasErrors //в журнале версии есть ошибки. то есть, не удалось построить следующую версию.
|
||||
}
|
||||
@@ -25,7 +25,6 @@ public class SapforVersion_json implements Serializable {
|
||||
public String version = "";
|
||||
@Expose
|
||||
public String description = "";
|
||||
public boolean success = true;
|
||||
//поля для отображения деревьев.
|
||||
public File Home = null;
|
||||
public LinkedHashMap<String, ProjectFile> files = new LinkedHashMap<>();
|
||||
@@ -50,7 +49,8 @@ public class SapforVersion_json implements Serializable {
|
||||
public String toString() {
|
||||
return Home.getName() + " : " + Utils.Brackets(description);
|
||||
}
|
||||
public void init(File configurationRoot) {
|
||||
public SapforVersionState init(File configurationRoot) {
|
||||
SapforVersionState state = SapforVersionState.Empty;
|
||||
String relativePath = Global.isWindows ? Utils.toW(version) : version;
|
||||
Home = Paths.get(configurationRoot.getAbsolutePath(), relativePath).toFile();
|
||||
files = new LinkedHashMap<>();
|
||||
@@ -66,11 +66,14 @@ public class SapforVersion_json implements Serializable {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!files.isEmpty())
|
||||
state = SapforVersionState.Normal;
|
||||
}
|
||||
parse_out = new ProjectFile(Paths.get(Home.getAbsolutePath(), Constants.data, Constants.parse_out_file).toFile());
|
||||
parse_err = new ProjectFile(Paths.get(Home.getAbsolutePath(), Constants.data, Constants.parse_err_file).toFile());
|
||||
out = new ProjectFile(Paths.get(Home.getAbsolutePath(), Constants.data, Constants.out_file).toFile());
|
||||
err = new ProjectFile(Paths.get(Home.getAbsolutePath(), Constants.data, Constants.err_file).toFile());
|
||||
return state;
|
||||
}
|
||||
public boolean isMatch(SapforVersion_json version_json) {
|
||||
if (!description.equals(version_json.description)) {
|
||||
|
||||
@@ -29,6 +29,7 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
|
||||
//--
|
||||
File sapfor_drv;
|
||||
SapforConfiguration_json sapforConfiguration_json;
|
||||
SapforVersion_json version_json;
|
||||
//-----
|
||||
File root;
|
||||
File parentTask;
|
||||
@@ -39,6 +40,7 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
|
||||
sapfor_drv = (File) args[0];
|
||||
sapforConfiguration_json = (SapforConfiguration_json) args[1];
|
||||
target = (SapforTask) args[2];
|
||||
version_json = null;
|
||||
//--->>
|
||||
parentTask = Paths.get(Global.Home, String.valueOf(sapforConfiguration_json.id), target.test_description).toFile();
|
||||
root = new File(Global.Home, String.valueOf(sapforConfiguration_json.id));
|
||||
@@ -47,9 +49,9 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
|
||||
return true;
|
||||
}
|
||||
protected boolean parse() throws Exception {
|
||||
if (Sapfor.parse(sapfor_drv, parentTask, target.flags)){
|
||||
if (Sapfor.parse(sapfor_drv, parentTask, target.flags)) {
|
||||
return true;
|
||||
}else {
|
||||
} else {
|
||||
target.state = TaskState.DoneWithErrors;
|
||||
return false;
|
||||
}
|
||||
@@ -59,7 +61,7 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
|
||||
task = new File(parentTask, "v1");
|
||||
Utils.CheckAndCleanDirectory(task); //папка для преобразования.
|
||||
//если версия пустая, это тоже результат тестирования. Поэтому должна учитываться в древе.
|
||||
target.versions.add(new SapforVersion_json(
|
||||
target.versions.add(version_json =new SapforVersion_json(
|
||||
root.getAbsolutePath(),
|
||||
task.getAbsolutePath(), code.getDescription()));
|
||||
//---
|
||||
@@ -97,7 +99,6 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
|
||||
files.sort(Comparator.comparingInt(o -> Integer.parseInt(o.getName().substring(1))));
|
||||
for (File file : files)
|
||||
target.variants.add(
|
||||
|
||||
new SapforVersion_json(
|
||||
root.getAbsolutePath(),
|
||||
file.getAbsolutePath(), PassCode_2021.SPF_CreateParallelVariant.getDescription()));
|
||||
@@ -107,7 +108,7 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
target.StartDate = new Date().getTime();
|
||||
target.versions.add(new SapforVersion_json(target.test_description, ""));
|
||||
target.versions.add(version_json = new SapforVersion_json(target.test_description, ""));
|
||||
for (PassCode_2021 code : sapforConfiguration_json.codes) {
|
||||
if (parse()) {
|
||||
if (code.equals(PassCode_2021.CreateParallelVariants))
|
||||
|
||||
@@ -4,6 +4,7 @@ import Common.Current;
|
||||
import Common.Database.DBObject;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.Tasks.TaskState;
|
||||
import TestingSystem.SAPFOR.Json.SapforVersionState;
|
||||
import TestingSystem.SAPFOR.Json.SapforVersion_json;
|
||||
import TestingSystem.SAPFOR.SapforTasksPackage.UI.VersionSummary;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
@@ -75,29 +76,31 @@ public class SapforTask extends DBObject {
|
||||
public SapforTask() {
|
||||
}
|
||||
public DefaultMutableTreeNode getVersionsTree(File configurationRoot) {
|
||||
DefaultMutableTreeNode root = null;
|
||||
DefaultMutableTreeNode child = null;
|
||||
DefaultMutableTreeNode parent = null;
|
||||
VersionSummary root = null;
|
||||
VersionSummary child = null;
|
||||
VersionSummary parent = null;
|
||||
//--
|
||||
for (SapforVersion_json version_json : versions) {
|
||||
version_json.init(configurationRoot);
|
||||
version_json.task = this;
|
||||
//-
|
||||
child = new VersionSummary(version_json);
|
||||
child = new VersionSummary(version_json, version_json.init(configurationRoot));
|
||||
if (parent == null) {
|
||||
root = child;
|
||||
parent = child;
|
||||
} else {
|
||||
if (!child.state.equals(SapforVersionState.Empty)) {
|
||||
parent.add(child);
|
||||
parent = child;
|
||||
}
|
||||
}
|
||||
//-
|
||||
}
|
||||
if (parent != null) {
|
||||
for (SapforVersion_json version_json : variants) {
|
||||
version_json.init(configurationRoot);
|
||||
version_json.task = this;
|
||||
parent.add(new VersionSummary(version_json));
|
||||
if (!child.state.equals(SapforVersionState.Empty)) {
|
||||
parent.add(new VersionSummary(version_json, version_json.init(configurationRoot)));
|
||||
}
|
||||
}
|
||||
}
|
||||
//--
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
package TestingSystem.SAPFOR.SapforTasksPackage.UI;
|
||||
import TestingSystem.SAPFOR.Json.SapforVersionState;
|
||||
import TestingSystem.SAPFOR.Json.SapforVersion_json;
|
||||
public class VersionSummary extends SapforPackageTreeNode{
|
||||
|
||||
public class VersionSummary extends SapforPackageTreeNode {
|
||||
public String version_name = "";
|
||||
public String version_description = "";
|
||||
public VersionSummary(SapforVersion_json version_json) {
|
||||
public SapforVersionState state = SapforVersionState.Empty;
|
||||
public VersionSummary(SapforVersion_json version_json, SapforVersionState state_in) {
|
||||
setUserObject(version_json);
|
||||
version_name = version_json.Home.getName();
|
||||
version_description = version_json.description;
|
||||
state = state_in;
|
||||
}
|
||||
@Override
|
||||
public String getImageKey() {
|
||||
return "TestVersion";
|
||||
return state.toString();
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return version_name+ " : " +version_description;
|
||||
return version_name + " : " + version_description;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +169,9 @@ public class SapforTasksPackageSupervisor {
|
||||
//Очистка
|
||||
//очистка служебных файлов.
|
||||
Utils.deleteFilesByExtensions(new File(sapforTasksPackage.workspace),
|
||||
"proj", "dep", "jar", "sh", "exe", "bat");
|
||||
"proj", "dep", "jar"
|
||||
// ,"sh", "exe", "bat"
|
||||
);
|
||||
}
|
||||
public void Perform() throws Exception {
|
||||
if (packageNeedsKill()) {
|
||||
|
||||
BIN
src/icons/versions/Empty.png
Normal file
BIN
src/icons/versions/Empty.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 653 B |
BIN
src/icons/versions/HasErrors.png
Normal file
BIN
src/icons/versions/HasErrors.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 690 B |
|
Before Width: | Height: | Size: 829 B After Width: | Height: | Size: 829 B |
Reference in New Issue
Block a user