no message
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user