продолжение рефакторинга. создал предка для класса current
This commit is contained in:
@@ -2,7 +2,7 @@ package ProjectData.SapforData.Arrays;
|
||||
import Common_old.Current;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.DataSetControlForm;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import GlobalData.Settings.SettingName;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ProjectData.SapforData.Arrays.UI;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.ControlForm;
|
||||
import Common.Visual.ControlForm;
|
||||
import Common_old.UI.Tables.Grid.GridAnchestor;
|
||||
import Common_old.UI.Tables.StyledTable;
|
||||
import Common_old.UI.UI;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package ProjectData.SapforData.Arrays.UI;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Menus.GraphMenu;
|
||||
import Common_old.UI.Trees.StyledTree;
|
||||
@@ -15,7 +16,7 @@ public class RulesTree extends StyledTree {
|
||||
setRootVisible(false);
|
||||
expandRow(0);
|
||||
ExpandAll();
|
||||
Current.set(Current.ParallelRegion, null);
|
||||
CurrentAnchestor.set(Current.ParallelRegion, null);
|
||||
}
|
||||
@Override
|
||||
protected GraphMenu createMenu() {
|
||||
@@ -38,6 +39,6 @@ public class RulesTree extends StyledTree {
|
||||
region = (ParallelRegion) o;
|
||||
}
|
||||
}
|
||||
Current.set(Current.ParallelRegion, region);
|
||||
CurrentAnchestor.set(Current.ParallelRegion, region);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ProjectData.SapforData.Functions.UI.Graph;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.ControlForm;
|
||||
import Common.Visual.ControlForm;
|
||||
import com.mxgraph.swing.mxGraphComponent;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package ProjectData.SapforData.Functions.UI.Graph;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Menus.VisualiserMenuItem;
|
||||
@@ -19,7 +20,7 @@ public class FunctionsGraphMenu extends StyledPopupMenu {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (Current.HasSelectedFunction()) {
|
||||
Current.set(Current.Function, Current.getSelectionFunction());
|
||||
CurrentAnchestor.set(Current.Function, Current.getSelectionFunction());
|
||||
UI.getMainWindow().getProjectWindow().getFunctionsWindow().ShowCurrentFunction();
|
||||
if (SPF_GetGraphFunctionPositions.showByCurrentFunction) {
|
||||
Pass_2021.passes.get(PassCode_2021.SPF_GetGraphFunctionPositions).Do();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package ProjectData.SapforData.Functions.UI.Graph;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.UI;
|
||||
@@ -140,7 +141,7 @@ public class FunctionsGraphUI extends mxGraph {
|
||||
funcInfo = Current.getProject().allFunctions.get(name);
|
||||
String vertexType = funcInfo.type.toString();
|
||||
if (SPF_GetGraphFunctionPositions.showByCurrentFunction) {
|
||||
FuncInfo current_fi = (FuncInfo) Current.get(Current.Function);
|
||||
FuncInfo current_fi = (FuncInfo) CurrentAnchestor.get(Current.Function);
|
||||
if ((current_fi != null) && (funcInfo.funcName.equals(current_fi.funcName))) {
|
||||
vertexType = "current";
|
||||
}
|
||||
@@ -233,7 +234,7 @@ public class FunctionsGraphUI extends mxGraph {
|
||||
FuncInfo fi = Current.getProject().allFunctions.get(func_name);
|
||||
switch (e.getClickCount()) {
|
||||
case 1:
|
||||
Current.set(Current.SelectedFunction, fi);
|
||||
CurrentAnchestor.set(Current.SelectedFunction, fi);
|
||||
break;
|
||||
case 2:
|
||||
switch (fi.type) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package ProjectData.SapforData.Functions.UI;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Menus.GraphMenu;
|
||||
import Common_old.UI.Trees.SelectableTree;
|
||||
@@ -18,7 +19,7 @@ public class InlineTree extends SelectableTree {
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentObject() {
|
||||
Object o = Current.get(getCurrent());
|
||||
Object o = CurrentAnchestor.get(getCurrent());
|
||||
if (o instanceof FileObject) {
|
||||
((FileObject) o).Show(false);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package ProjectData.SapforData.Functions.UI;
|
||||
import Common.CurrentAnchestor;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Menus.GraphMenu;
|
||||
import Common_old.UI.Trees.SelectableTree;
|
||||
@@ -22,7 +23,7 @@ public class InlineTree2 extends SelectableTree {
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentObject() {
|
||||
Object o = Current.get(getCurrent());
|
||||
Object o = CurrentAnchestor.get(getCurrent());
|
||||
if (o instanceof FileObject) {
|
||||
((FileObject) o).Show(false);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ProjectData.SapforData.Regions;
|
||||
import Common_old.Current;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common_old.UI.DataSetControlForm;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ProjectData.SapforData.Variants;
|
||||
import Common_old.Current;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common_old.UI.DataSetControlForm;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
|
||||
import static Common_old.UI.Tables.TableRenderers.*;
|
||||
public class VariantsSet extends DataSet<String, ParallelVariant> {
|
||||
|
||||
Reference in New Issue
Block a user