рефакторинг. переносил текущие объекты в другое место
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import _VisualDVM.ProjectData.SapforData.Functions.FuncCoordinates;
|
||||
import _VisualDVM.ProjectData.SapforData.Functions.UI.Graph.FunctionsGraphForm;
|
||||
@@ -19,26 +20,26 @@ public class SaveFunctionsGraphCoordinates extends Pass {
|
||||
graphForm = UI.getMainWindow().getProjectWindow().getFunctionsWindow().getFunctionsGraphWindow();
|
||||
if (!graphForm.isShown())
|
||||
Log.Writeln_("Сначала отобразите граф");
|
||||
if (Current.getProject().functionsGraph.isEmpty())
|
||||
if (Global.mainModule.getProject().functionsGraph.isEmpty())
|
||||
Log.Writeln_("Граф процедур пуст");
|
||||
return Log.isEmpty();
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
for (String funcName : Current.getProject().functionsGraph.vertexCoordinates.keySet()) {
|
||||
for (String funcName : Global.mainModule.getProject().functionsGraph.vertexCoordinates.keySet()) {
|
||||
FuncCoordinates coords = null;
|
||||
if (Current.getProject().db.funcCoordinates.containsKey(funcName)) {
|
||||
coords = Current.getProject().db.funcCoordinates.get(funcName);
|
||||
if (Global.mainModule.getProject().db.funcCoordinates.containsKey(funcName)) {
|
||||
coords = Global.mainModule.getProject().db.funcCoordinates.get(funcName);
|
||||
coords.name=funcName;
|
||||
coords.X = Current.getProject().functionsGraph.vertexCoordinates.get(funcName).getKey();
|
||||
coords.Y = Current.getProject().functionsGraph.vertexCoordinates.get(funcName).getValue();
|
||||
Current.getProject().db.Update(coords);
|
||||
coords.X = Global.mainModule.getProject().functionsGraph.vertexCoordinates.get(funcName).getKey();
|
||||
coords.Y = Global.mainModule.getProject().functionsGraph.vertexCoordinates.get(funcName).getValue();
|
||||
Global.mainModule.getProject().db.Update(coords);
|
||||
} else {
|
||||
coords = new FuncCoordinates();
|
||||
coords.name=funcName;
|
||||
coords.X = Current.getProject().functionsGraph.vertexCoordinates.get(funcName).getKey();
|
||||
coords.Y = Current.getProject().functionsGraph.vertexCoordinates.get(funcName).getValue();
|
||||
Current.getProject().db.Insert(coords);
|
||||
coords.X = Global.mainModule.getProject().functionsGraph.vertexCoordinates.get(funcName).getKey();
|
||||
coords.Y = Global.mainModule.getProject().functionsGraph.vertexCoordinates.get(funcName).getValue();
|
||||
Global.mainModule.getProject().db.Insert(coords);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user