продолжение рефакторинга. создал предка для класса current
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.UI;
|
||||
@@ -18,7 +19,7 @@ public class RenameFile extends ChangeFilePass<DBProjectFile> {
|
||||
protected boolean canStart(Object... args) {
|
||||
resetArgs();
|
||||
current = false;
|
||||
if (Current.Check(Log, Current.SelectedFile)) {
|
||||
if (CurrentAnchestor.Check(Log, Current.SelectedFile)) {
|
||||
old = Current.getSelectedFile();
|
||||
current = Current.HasFile() && Current.getFile().file.equals(old.file);
|
||||
if ((ff = new FileNameForm()).ShowDialog("Введите новое имя файла", old.file.getName())) {
|
||||
@@ -58,7 +59,7 @@ public class RenameFile extends ChangeFilePass<DBProjectFile> {
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
Current.getSapfor().ResetAllAnalyses();
|
||||
Current.set(Current.SelectedFile, target);
|
||||
CurrentAnchestor.set(Current.SelectedFile, target);
|
||||
if (current)
|
||||
passes.get(PassCode_2021.OpenCurrentFile).Do(target);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user