no message

This commit is contained in:
2025-01-18 01:36:02 +03:00
parent 69151dd7a8
commit 18b4d58682
47 changed files with 724 additions and 532 deletions

View File

@@ -1,7 +1,7 @@
package _VisualDVM.Passes.All;
import Common.Visual.Windows.Dialog.VFileChooser;
import _VisualDVM.Global;
import _VisualDVM.GlobalProperties;
import _VisualDVM.NormalProperties;
import _VisualDVM.Passes.CurrentComponentPass;
import java.io.File;
@@ -22,15 +22,15 @@ public class InstallComponentFromFolder extends CurrentComponentPass {
if (super.canStart(args)) {
VFileChooser fileChooser = target.getFileChooser();
String propertyName = target.getComponentType() + "Path";
String lastDirectory = (String) GlobalProperties.class.getField(propertyName).get(Global.properties);
String lastDirectory = (String) NormalProperties.class.getField(propertyName).get(Global.normalProperties);
if (!lastDirectory.isEmpty()) {
//настройка выставлена не впервые, устанавливаем ее как папку
fileChooser.SetCurrentDirectory(lastDirectory);
}
boolean res = (file = fileChooser.ShowDialog()) != null;
File newDirectory = fileChooser.getCurrentDirectory();
GlobalProperties.class.getField(propertyName).set(Global.properties, newDirectory.getAbsolutePath());
Global.properties.Update();
NormalProperties.class.getField(propertyName).set(Global.normalProperties, newDirectory.getAbsolutePath());
Global.normalProperties.Update();
return res;
}
return false;