промежуточный. небольшой рефакторинг. наследие DBProjectFile от ProjectFile.
This commit is contained in:
@@ -9,6 +9,8 @@ import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import java.io.File;
|
||||
import java.util.Vector;
|
||||
public class SapforTask extends DBObject {
|
||||
//------------------------------------>>
|
||||
@@ -50,6 +52,45 @@ public class SapforTask extends DBObject {
|
||||
//-----------
|
||||
public SapforTask() {
|
||||
}
|
||||
/*
|
||||
public static Vector<DefaultMutableTreeNode> getTaskConfigurationDescription(SapforTask task) {
|
||||
Vector<DefaultMutableTreeNode> res = new Vector<>();
|
||||
DefaultMutableTreeNode codesNode = new DefaultMutableTreeNode("Проходы");
|
||||
Vector<String> codes = new Vector<>(Arrays.asList(task.codes.split(" ")));
|
||||
for (String code_s : codes)
|
||||
codesNode.add(new DefaultMutableTreeNode(PassCode_2021.valueOf(code_s).getDescription()));
|
||||
res.add(codesNode);
|
||||
DefaultMutableTreeNode flagsNode = new DefaultMutableTreeNode("Флаги");
|
||||
flagsNode.add(new DefaultMutableTreeNode(task.flags));
|
||||
res.add(flagsNode);
|
||||
return res;
|
||||
}
|
||||
*/
|
||||
public DefaultMutableTreeNode getVersionsTree(File configurationRoot) {
|
||||
DefaultMutableTreeNode root = null;
|
||||
DefaultMutableTreeNode child = null;
|
||||
DefaultMutableTreeNode parent = null;
|
||||
//--
|
||||
for (SapforVersion_json version_json : versions) {
|
||||
version_json.init(configurationRoot);
|
||||
child = new DefaultMutableTreeNode(version_json);
|
||||
if (parent == null) {
|
||||
root = child;
|
||||
parent = child;
|
||||
} else {
|
||||
parent.add(child);
|
||||
parent = child;
|
||||
}
|
||||
}
|
||||
if (parent != null) {
|
||||
for (SapforVersion_json version_json : variants) {
|
||||
version_json.init(configurationRoot);
|
||||
parent.add(new DefaultMutableTreeNode(version_json));
|
||||
}
|
||||
}
|
||||
//--
|
||||
return root;
|
||||
}
|
||||
public void Reset() {
|
||||
state = TaskState.Inactive;
|
||||
versions.clear();
|
||||
|
||||
Reference in New Issue
Block a user