no message

This commit is contained in:
2024-10-14 12:14:01 +03:00
parent 3a29898d5f
commit 452c4c7268
466 changed files with 1255 additions and 1100 deletions

View File

@@ -0,0 +1,45 @@
package _VisualDVM.Passes.All;
import _VisualDVM.Global;
import _VisualDVM.Visual.UI;
import _VisualDVM.ProjectData.SapforData.Functions.FuncCoordinates;
import _VisualDVM.ProjectData.SapforData.Functions.UI.Graph.FunctionsGraphForm;
import Common.Passes.Pass;
public class SaveFunctionsGraphCoordinates extends Pass {
FunctionsGraphForm graphForm = null;
@Override
protected boolean needsAnimation() {
return true;
}
@Override
public String getIconPath() {
return "/icons/ScreenShot.png";
}
@Override
protected boolean canStart(Object... args) {
graphForm = UI.getMainWindow().getProjectWindow().getFunctionsWindow().getFunctionsGraphWindow();
if (!graphForm.isShown())
Log.Writeln_("Сначала отобразите граф");
if (Global.mainModule.getProject().functionsGraph.isEmpty())
Log.Writeln_("Граф процедур пуст");
return Log.isEmpty();
}
@Override
protected void body() throws Exception {
for (String funcName : Global.mainModule.getProject().functionsGraph.vertexCoordinates.keySet()) {
FuncCoordinates coords = null;
if (Global.mainModule.getProject().db.funcCoordinates.containsKey(funcName)) {
coords = Global.mainModule.getProject().db.funcCoordinates.get(funcName);
coords.name=funcName;
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 = Global.mainModule.getProject().functionsGraph.vertexCoordinates.get(funcName).getKey();
coords.Y = Global.mainModule.getProject().functionsGraph.vertexCoordinates.get(funcName).getValue();
Global.mainModule.getProject().db.Insert(coords);
}
}
}
}