Revert "упорядочил папки с кодом."

This reverts commit 44c6daffa3.
This commit is contained in:
2023-11-19 02:12:44 +03:00
parent 44c6daffa3
commit 28908bcfac
596 changed files with 1569 additions and 2140 deletions

View File

@@ -0,0 +1,28 @@
package Visual_DVM_2021.Passes.All;
import Common.Global;
import Common.GlobalProperties;
import Visual_DVM_2021.Passes.Pass_2021;
import java.lang.reflect.Field;
public class UpdateProperty extends Pass_2021<Object> {
//todo в дальнейшем, все настройки перевести в properties, и перенести сюда функционал UpdateSetting (?)
String name = "";
Field field = null;
Object oldValue = null;
Object newValue = null;
@Override
protected boolean canStart(Object... args) throws Exception {
name = (String) args[0];
newValue = args[1];
//--
field = GlobalProperties.class.getField(name);
oldValue = field.get(Global.properties);
//---
return !newValue.equals(oldValue);
}
@Override
protected void body() throws Exception {
field.set(Global.properties, newValue);
Global.properties.Update();
}
}