рефакторинг. переносил текущие объекты в другое место

This commit is contained in:
2024-10-13 22:08:13 +03:00
parent 09b64218bd
commit 6afa2dc892
240 changed files with 1472 additions and 1518 deletions

View File

@@ -5,6 +5,7 @@ import Common.Visual.Windows.Form;
import _VisualDVM.Current;
import Common.Visual.TextField.StyledTextField;
import Common.Visual.Trees.StyledTree;
import _VisualDVM.Global;
import _VisualDVM.Visual.UI;
import Visual_DVM_2021.Passes.PassCode;
import Common.Passes.Pass;
@@ -172,8 +173,8 @@ public class SearchReplaceForm extends Form {
DefaultMutableTreeNode selectedFile = (DefaultMutableTreeNode) getLastSelectedPathComponent();
if (selectedFile != null) {
Pair<String, Long> info = (Pair<String, Long>) selectedFile.getUserObject();
if (Current.getProject().db.files.containsKey(info.getKey())) {
Pass.passes.get(PassCode.OpenCurrentFile).Do(Current.getProject().db.files.get(info.getKey()));
if (Global.mainModule.getProject().db.files.containsKey(info.getKey())) {
Pass.passes.get(PassCode.OpenCurrentFile).Do(Global.mainModule.getProject().db.files.get(info.getKey()));
//--->>>
replaceOn.setSelected(false);
setMode(false);
@@ -195,7 +196,7 @@ public class SearchReplaceForm extends Form {
super.Show();
//------->>
showNoFilesMatches();
if (lastProjectPath.equals(Current.getProject().Home.getAbsolutePath()))
if (lastProjectPath.equals(Global.mainModule.getProject().Home.getAbsolutePath()))
showFilesMatches();
else
dropFilesMatches();
@@ -238,8 +239,8 @@ public class SearchReplaceForm extends Form {
public void actionPerformed(ActionEvent e) {
try {
showNoFilesMatches();
lastProjectPath = Current.getProject().Home.getAbsolutePath();
matches = Current.getProject().getMatches(
lastProjectPath = Global.mainModule.getProject().Home.getAbsolutePath();
matches = Global.mainModule.getProject().getMatches(
tfFind.getText(),
registerOn.isSelected(),
wholeWordOn.isSelected());