рефакторинг. переносил текущие объекты в другое место
This commit is contained in:
@@ -79,6 +79,6 @@ public class ArraysSet extends DataSet<Long, ProjectArray> {
|
||||
}
|
||||
@Override
|
||||
public void CheckAll(boolean flag) {
|
||||
Pass.passes.get(PassCode.MassSelectArrays).Do(flag,new Vector(Current.getProject().declaratedArrays.Data.values()));
|
||||
Pass.passes.get(PassCode.MassSelectArrays).Do(flag,new Vector(Global.mainModule.getProject().declaratedArrays.Data.values()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Utils.Index;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.DBArray.DBArray;
|
||||
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.Distribution.Dimension;
|
||||
@@ -104,7 +105,7 @@ public class ProjectArray extends DBObject {
|
||||
int idxPl = 3;
|
||||
for (int i = 0; i < numDeclPlaces; ++i, idxPl += 2) {
|
||||
String declFile = Utils_.toW(localSplited[idxPl]);
|
||||
DBProjectFile file = Current.getProject().db.files.Data.get(declFile);
|
||||
DBProjectFile file = Global.mainModule.getProject().db.files.Data.get(declFile);
|
||||
int declLine = Integer.parseInt(localSplited[idxPl + 1]);
|
||||
//declPlaces.add(new Pair<>(declFile, declLine));
|
||||
ArrayDecl decl = new ArrayDecl(shortName, location, file, declLine);
|
||||
@@ -219,8 +220,8 @@ public class ProjectArray extends DBObject {
|
||||
}
|
||||
public void CreateDimensions() {
|
||||
for (BigInteger regID : regIDs) {
|
||||
ParallelRegion region = Current.getProject().parallelRegions.get(regID);
|
||||
for (int i = 0; i < Current.getProject().maxdim; ++i) {
|
||||
ParallelRegion region = Global.mainModule.getProject().parallelRegions.get(regID);
|
||||
for (int i = 0; i < Global.mainModule.getProject().maxdim; ++i) {
|
||||
dimensions.add(new TemplateDimension(
|
||||
i, this, region
|
||||
));
|
||||
@@ -254,9 +255,9 @@ public class ProjectArray extends DBObject {
|
||||
if (!mask(banned_dimensions, binary)) {
|
||||
if (filter) {
|
||||
boolean valid = true;
|
||||
if (Current.getProject().f_distributed())
|
||||
if (Global.mainModule.getProject().f_distributed())
|
||||
valid = CheckFilterMask(i, true, binary);
|
||||
if (valid && Current.getProject().f_multiplied())
|
||||
if (valid && Global.mainModule.getProject().f_multiplied())
|
||||
valid = CheckFilterMask(i, false, binary);
|
||||
if (valid)
|
||||
varIDs.add(i);
|
||||
@@ -275,9 +276,9 @@ public class ProjectArray extends DBObject {
|
||||
if (!mask(banned_dimensions, binary)) {
|
||||
if (filter) {
|
||||
boolean valid = true;
|
||||
if (Current.getProject().f_distributed())
|
||||
if (Global.mainModule.getProject().f_distributed())
|
||||
valid = CheckFilterMask(i, true, binary);
|
||||
if (valid && Current.getProject().f_multiplied())
|
||||
if (valid && Global.mainModule.getProject().f_multiplied())
|
||||
valid = CheckFilterMask(i, false, binary);
|
||||
return valid;
|
||||
} else return true;
|
||||
@@ -344,12 +345,12 @@ public class ProjectArray extends DBObject {
|
||||
return CheckFilterMask(varID, distributed, "");
|
||||
}
|
||||
public void SaveUserState() throws Exception {
|
||||
if (Current.getProject().db.savedArrays.Data.containsKey(UniqKey)) {
|
||||
DBArray sa = Current.getProject().db.savedArrays.Data.get(UniqKey);
|
||||
if (Global.mainModule.getProject().db.savedArrays.Data.containsKey(UniqKey)) {
|
||||
DBArray sa = Global.mainModule.getProject().db.savedArrays.Data.get(UniqKey);
|
||||
sa.State = State;
|
||||
Current.getProject().db.Update(sa);
|
||||
Global.mainModule.getProject().db.Update(sa);
|
||||
} else
|
||||
Current.getProject().db.Insert(new DBArray(this));
|
||||
Global.mainModule.getProject().db.Insert(new DBArray(this));
|
||||
}
|
||||
//-----------------------------------------------------------------------
|
||||
@Override
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Arrays.Templates;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
public enum TemplateDimensionState {
|
||||
multiplied, //0
|
||||
distributed; //1
|
||||
public String getMaskDescription() {
|
||||
switch (this) {
|
||||
case distributed:
|
||||
if (Current.getProject().f_distributed()) {
|
||||
if (Global.mainModule.getProject().f_distributed()) {
|
||||
return "BLOCK";
|
||||
} else {
|
||||
if (Current.getProject().f_multiplied())
|
||||
if (Global.mainModule.getProject().f_multiplied())
|
||||
return " X ";
|
||||
else return "BLOCK";
|
||||
}
|
||||
case multiplied:
|
||||
if (Current.getProject().f_multiplied()) {
|
||||
if (Global.mainModule.getProject().f_multiplied()) {
|
||||
return " * ";
|
||||
} else {
|
||||
if (Current.getProject().f_distributed())
|
||||
if (Global.mainModule.getProject().f_distributed())
|
||||
return " X ";
|
||||
else return " * ";
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import _VisualDVM.Current;
|
||||
import Common.Visual.ControlForm;
|
||||
import Common.Visual.Tables.Grid.GridAnchestor;
|
||||
import Common.Visual.Tables.StyledTable;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.ProjectArray;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.Templates.TemplateDimension;
|
||||
@@ -32,10 +33,10 @@ public class DimensionsTableForm extends ControlForm<StyledTable> {
|
||||
public void CreateControl() {
|
||||
Vector<String> columns = new Vector<>();
|
||||
columns.add("шаблон");
|
||||
for (int i = 0; i < Current.getProject().maxdim; ++i)
|
||||
for (int i = 0; i < Global.mainModule.getProject().maxdim; ++i)
|
||||
columns.add(ProjectArray.alignNames[i]);
|
||||
Vector<Object> dimensions = new Vector<>();
|
||||
Current.getProject().templates.forEach(t -> dimensions.add(t.CreateTemplateCells()));
|
||||
Global.mainModule.getProject().templates.forEach(t -> dimensions.add(t.CreateTemplateCells()));
|
||||
control = new StyledTable(new GridAnchestor(columns, dimensions) {
|
||||
@Override
|
||||
public Object getValueAt(int rowIndex, int columnIndex) {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Arrays.UI;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.Files.UI.FileGraphTree;
|
||||
public class FileArraysTree extends FileGraphTree {
|
||||
public FileArraysTree() {
|
||||
super(Current.getFile().getArraysTree());
|
||||
super(Global.mainModule.getFile().getArraysTree());
|
||||
}
|
||||
@Override
|
||||
public String getBranchesName() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Arrays.UI;
|
||||
import Common.Current_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Menus.GraphMenu;
|
||||
import Common.Visual.Trees.StyledTree;
|
||||
import Common.Visual.Trees.TreeRenderers;
|
||||
@@ -12,11 +13,11 @@ import javax.swing.tree.TreePath;
|
||||
import static Common.Visual.Trees.TreeRenderers.RendererRule;
|
||||
public class RulesTree extends StyledTree {
|
||||
public RulesTree() {
|
||||
super(Current.getProject().align_rules_root);
|
||||
super(Global.mainModule.getProject().align_rules_root);
|
||||
setRootVisible(false);
|
||||
expandRow(0);
|
||||
ExpandAll();
|
||||
Current_.set(Current.ParallelRegion, null);
|
||||
Global.mainModule.set(Current.ParallelRegion, null);
|
||||
}
|
||||
@Override
|
||||
protected GraphMenu createMenu() {
|
||||
@@ -39,6 +40,6 @@ public class RulesTree extends StyledTree {
|
||||
region = (ParallelRegion) o;
|
||||
}
|
||||
}
|
||||
Current_.set(Current.ParallelRegion, region);
|
||||
Global.mainModule.set(Current.ParallelRegion, region);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package _VisualDVM.ProjectData.SapforData;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Database.Objects.iDBObject;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
@@ -21,7 +22,7 @@ public abstract class FileObject extends iDBObject {
|
||||
return "файл " + Utils_.Brackets(file) + " строка: " + line;
|
||||
}
|
||||
public DBProjectFile getFather() {
|
||||
return Current.getProject().db.files.Data.get(file);
|
||||
return Global.mainModule.getProject().db.files.Data.get(file);
|
||||
}
|
||||
public void Show(boolean focus) {
|
||||
UI.getMainWindow().getProjectWindow().GotoFile(file, line, focus);
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Functions.UI;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.Files.UI.FileGraphTree;
|
||||
public class FileFunctionsTree extends FileGraphTree {
|
||||
public FileFunctionsTree() {
|
||||
super(Current.getFile().getFunctionsTree());
|
||||
super(Global.mainModule.getFile().getFunctionsTree());
|
||||
}
|
||||
@Override
|
||||
public String getBranchesName() {
|
||||
|
||||
@@ -2,6 +2,7 @@ package _VisualDVM.ProjectData.SapforData.Functions.UI.Graph;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.ControlForm;
|
||||
import _VisualDVM.Global;
|
||||
import com.mxgraph.swing.mxGraphComponent;
|
||||
|
||||
import java.awt.*;
|
||||
@@ -11,7 +12,7 @@ public class FunctionsGraphForm extends ControlForm<mxGraphComponent> {
|
||||
}
|
||||
@Override
|
||||
public void CreateControl() {
|
||||
control = Current.getProject().DrawFunctionsGraph();
|
||||
control = Global.mainModule.getProject().DrawFunctionsGraph();
|
||||
}
|
||||
@Override
|
||||
public void Show() {
|
||||
|
||||
@@ -4,6 +4,7 @@ import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.Menus.VisualiserMenuItem;
|
||||
import Common.Visual.Menus.StyledPopupMenu;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import Visual_DVM_2021.Passes.All.SPF_GetGraphFunctionPositions;
|
||||
import Visual_DVM_2021.Passes.PassCode;
|
||||
@@ -19,8 +20,8 @@ public class FunctionsGraphMenu extends StyledPopupMenu {
|
||||
changeCurrent.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (Current.HasSelectedFunction()) {
|
||||
Current_.set(Current.Function, Current.getSelectionFunction());
|
||||
if (Global.mainModule.HasSelectedFunction()) {
|
||||
Global.mainModule.set(Current.Function, Global.mainModule.getSelectionFunction());
|
||||
UI.getMainWindow().getProjectWindow().getFunctionsWindow().ShowCurrentFunction();
|
||||
if (SPF_GetGraphFunctionPositions.showByCurrentFunction) {
|
||||
Pass.passes.get(PassCode.SPF_GetGraphFunctionPositions).Do();
|
||||
@@ -32,8 +33,8 @@ public class FunctionsGraphMenu extends StyledPopupMenu {
|
||||
}
|
||||
@Override
|
||||
public void CheckElementsVisibility() {
|
||||
if (Current.HasSelectedFunction()) {
|
||||
changeCurrent.setText("Назначить процедуру " + Utils_.DQuotes(Current.getSelectionFunction().funcName) + " текущей.");
|
||||
if (Global.mainModule.HasSelectedFunction()) {
|
||||
changeCurrent.setText("Назначить процедуру " + Utils_.DQuotes(Global.mainModule.getSelectionFunction().funcName) + " текущей.");
|
||||
changeCurrent.setEnabled(true);
|
||||
} else {
|
||||
changeCurrent.setText("Невозможно назначить текущую процедуру: узел графа не выбран");
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Current_;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.SapforData.Functions.FuncCoordinates;
|
||||
import _VisualDVM.ProjectData.SapforData.Functions.FuncInfo;
|
||||
import _VisualDVM.ProjectData.SapforData.Functions.FunctionType;
|
||||
@@ -138,10 +139,10 @@ public class FunctionsGraphUI extends mxGraph {
|
||||
// UI.Info("++");
|
||||
LinkedHashMap<String, Object> mxVertexes = new LinkedHashMap<>();
|
||||
for (String name : graph.vertexCoordinates.keySet()) {
|
||||
funcInfo = Current.getProject().allFunctions.get(name);
|
||||
funcInfo = Global.mainModule.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) Global.mainModule.get(Current.Function);
|
||||
if ((current_fi != null) && (funcInfo.funcName.equals(current_fi.funcName))) {
|
||||
vertexType = "current";
|
||||
}
|
||||
@@ -200,18 +201,18 @@ public class FunctionsGraphUI extends mxGraph {
|
||||
// UI.Info(cell.getGeometry().getPoint().toString());
|
||||
Point point = cell.getGeometry().getPoint();
|
||||
try {
|
||||
if (Current.getProject().db.funcCoordinates.containsKey(funcName)) {
|
||||
coords = Current.getProject().db.funcCoordinates.get(funcName);
|
||||
if (Global.mainModule.getProject().db.funcCoordinates.containsKey(funcName)) {
|
||||
coords = Global.mainModule.getProject().db.funcCoordinates.get(funcName);
|
||||
coords.name = funcName;
|
||||
coords.X = point.getX();
|
||||
coords.Y = point.getY();
|
||||
Current.getProject().db.Update(coords);
|
||||
Global.mainModule.getProject().db.Update(coords);
|
||||
} else {
|
||||
coords = new FuncCoordinates();
|
||||
coords.name = funcName;
|
||||
coords.X = point.getX();
|
||||
coords.Y = point.getY();
|
||||
Current.getProject().db.Insert(coords);
|
||||
Global.mainModule.getProject().db.Insert(coords);
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
@@ -231,10 +232,10 @@ public class FunctionsGraphUI extends mxGraph {
|
||||
mxCell mx_cell = (mxCell) cell;
|
||||
if (mx_cell.isVertex()) {
|
||||
String func_name = (String) mx_cell.getValue();
|
||||
FuncInfo fi = Current.getProject().allFunctions.get(func_name);
|
||||
FuncInfo fi = Global.mainModule.getProject().allFunctions.get(func_name);
|
||||
switch (e.getClickCount()) {
|
||||
case 1:
|
||||
Current_.set(Current.SelectedFunction, fi);
|
||||
Global.mainModule.set(Current.SelectedFunction, fi);
|
||||
break;
|
||||
case 2:
|
||||
switch (fi.type) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Functions.UI;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Menus.SelectionTreeMenu;
|
||||
import Common.Visual.Trees.SelectableTree;
|
||||
import _VisualDVM.ProjectData.SapforData.Functions.FuncInfo;
|
||||
@@ -13,7 +14,7 @@ public class InlineMenu extends SelectionTreeMenu {
|
||||
}
|
||||
@Override
|
||||
public void SelectAll(boolean select) {
|
||||
for (FuncInfo fi : Current.getProject().allFunctions.values())
|
||||
for (FuncInfo fi : Global.mainModule.getProject().allFunctions.values())
|
||||
fi.SelectAllChildren(select);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Functions.UI;
|
||||
import Common.Current_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Menus.GraphMenu;
|
||||
import Common.Visual.Trees.SelectableTree;
|
||||
import Common.Visual.Trees.TreeRenderers;
|
||||
import _VisualDVM.ProjectData.SapforData.FileObject;
|
||||
public class InlineTree extends SelectableTree {
|
||||
public InlineTree() {
|
||||
super(Current.getProject().inline_root);
|
||||
super(Global.mainModule.getProject().inline_root);
|
||||
}
|
||||
@Override
|
||||
public TreeRenderers getRenderer() {
|
||||
@@ -19,7 +20,7 @@ public class InlineTree extends SelectableTree {
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentObject() {
|
||||
Object o = Current_.get(getCurrent());
|
||||
Object o = Global.mainModule.get(getCurrent());
|
||||
if (o instanceof FileObject) {
|
||||
((FileObject) o).Show(false);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Functions.UI;
|
||||
import Common.Current_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Menus.GraphMenu;
|
||||
import Common.Visual.Trees.SelectableTree;
|
||||
import Common.Visual.Trees.TreeRenderers;
|
||||
import _VisualDVM.ProjectData.SapforData.FileObject;
|
||||
public class InlineTree2 extends SelectableTree {
|
||||
public InlineTree2() {
|
||||
super(Current.getProject().inline_root2);
|
||||
super(Global.mainModule.getProject().inline_root2);
|
||||
}
|
||||
@Override
|
||||
public TreeRenderers getRenderer() {
|
||||
@@ -23,7 +24,7 @@ public class InlineTree2 extends SelectableTree {
|
||||
}
|
||||
@Override
|
||||
public void ShowCurrentObject() {
|
||||
Object o = Current_.get(getCurrent());
|
||||
Object o = Global.mainModule.get(getCurrent());
|
||||
if (o instanceof FileObject) {
|
||||
((FileObject) o).Show(false);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Includes.UI;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Menus.SelectionTreeMenu;
|
||||
import Common.Visual.Trees.SelectableTree;
|
||||
import _VisualDVM.ProjectData.SapforData.Includes.FileInfo;
|
||||
@@ -13,7 +14,7 @@ public class IncludesMenu extends SelectionTreeMenu {
|
||||
}
|
||||
@Override
|
||||
public void SelectAll(boolean select) {
|
||||
for (FileInfo fi : Current.getProject().addictedFiles.values())
|
||||
for (FileInfo fi : Global.mainModule.getProject().addictedFiles.values())
|
||||
fi.SelectAllChildren(select);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Includes.UI;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Menus.GraphMenu;
|
||||
import Common.Visual.Trees.SelectableTree;
|
||||
import Common.Visual.Trees.TreeRenderers;
|
||||
public class IncludesTree extends SelectableTree {
|
||||
public IncludesTree() {
|
||||
super(Current.getProject().includes_root);
|
||||
super(Global.mainModule.getProject().includes_root);
|
||||
}
|
||||
@Override
|
||||
public Current getCurrent() {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Loops.UI;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.Files.UI.FileGraphTree;
|
||||
public class FileLoopsTree extends FileGraphTree {
|
||||
public FileLoopsTree() {
|
||||
super(Current.getFile().getLoopsTree());
|
||||
super(Global.mainModule.getFile().getLoopsTree());
|
||||
}
|
||||
@Override
|
||||
public String getBranchesName() {
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Utils.Index;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.Distribution.AlignRule;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.Distribution.DataDirective;
|
||||
@@ -63,7 +64,7 @@ public class ParallelRegion extends DBObject {
|
||||
//-------------------------------------------------------
|
||||
if (new_array.isTemplFlag == 1) {
|
||||
maxdim = Math.max(maxdim, new_array.dimSize);
|
||||
Current.getProject().templates.add(new_array);
|
||||
Global.mainModule.getProject().templates.add(new_array);
|
||||
new_array.regIDs.add(regionId);
|
||||
} else if (new_array.isLoopArrayFlag != 1) arrays_count++;
|
||||
}
|
||||
@@ -82,7 +83,7 @@ public class ParallelRegion extends DBObject {
|
||||
for (String FKey : lines.keySet()) {
|
||||
for (Pair<Integer, Integer> L : lines.get(FKey)) {
|
||||
lines_count += (L.getValue() - L.getKey());
|
||||
DBProjectFile f = Current.getProject().db.files.Data.get(FKey);
|
||||
DBProjectFile f = Global.mainModule.getProject().db.files.Data.get(FKey);
|
||||
loops_count += f.FragmentLoopCount(L.getKey(), L.getValue());
|
||||
fc_count += f.FragmentFunctionCallsCount(L.getKey(), L.getValue());
|
||||
fd_count += f.FragmentFunctionDeclsCount(L.getKey(), L.getValue());
|
||||
@@ -111,7 +112,7 @@ public class ParallelRegion extends DBObject {
|
||||
loops_count = 0;
|
||||
for (String FKey : lines.keySet()) {
|
||||
for (Pair<Integer, Integer> L : lines.get(FKey)) {
|
||||
DBProjectFile f = Current.getProject().db.files.Data.get(FKey);
|
||||
DBProjectFile f = Global.mainModule.getProject().db.files.Data.get(FKey);
|
||||
loops_count += f.FragmentLoopCount(L.getKey(), L.getValue());
|
||||
}
|
||||
}
|
||||
@@ -121,7 +122,7 @@ public class ParallelRegion extends DBObject {
|
||||
fc_count = 0;
|
||||
for (String FKey : lines.keySet()) {
|
||||
for (Pair<Integer, Integer> L : lines.get(FKey)) {
|
||||
DBProjectFile f = Current.getProject().db.files.Data.get(FKey);
|
||||
DBProjectFile f = Global.mainModule.getProject().db.files.Data.get(FKey);
|
||||
fc_count += f.FragmentFunctionCallsCount(L.getKey(), L.getValue());
|
||||
fd_count += f.FragmentFunctionDeclsCount(L.getKey(), L.getValue());
|
||||
}
|
||||
@@ -131,7 +132,7 @@ public class ParallelRegion extends DBObject {
|
||||
arrays_count=0;
|
||||
for (String FKey : lines.keySet()) {
|
||||
for (Pair<Integer, Integer> L : lines.get(FKey)) {
|
||||
DBProjectFile f = Current.getProject().db.files.Data.get(FKey);
|
||||
DBProjectFile f = Global.mainModule.getProject().db.files.Data.get(FKey);
|
||||
arrays_count += f.FragmentArraysCount(L.getKey(), L.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.ProjectData.SapforData.Regions.UI;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.Tables.StyledCellLabel;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.SapforData.Arrays.ProjectArray;
|
||||
import javafx.util.Pair;
|
||||
|
||||
@@ -40,15 +41,15 @@ public class ArrayAlignmentBar extends JToolBar {
|
||||
add(label);
|
||||
ChangeListener changeListener = e -> {
|
||||
//инфа о связях. из списка всех объявленных массивов.
|
||||
ProjectArray d_array = Current.getProject().declaratedArrays.get(array.id);
|
||||
ProjectArray d_array = Global.mainModule.getProject().declaratedArrays.get(array.id);
|
||||
//опять же, берем инфу из объявлений!
|
||||
for (ProjectArray d_link : d_array.links.values()) {
|
||||
//это массивы из объявлений. прежде чем их трогать проверим а есть ли они в текущей области.
|
||||
// по адресам принадлежность смотреть нельзя.
|
||||
// на момент поиска массивов у них их еще нет. а вот ид совпадают.
|
||||
if (Current.getParallelRegion().ArrayBelongsToRegion(d_link.id)) {
|
||||
if (Global.mainModule.getParallelRegion().ArrayBelongsToRegion(d_link.id)) {
|
||||
//инфа о массиве уже из области. имеющая адрес и бар.
|
||||
ProjectArray r_link = Current.getParallelRegion().getArrayById(d_link.id);
|
||||
ProjectArray r_link = Global.mainModule.getParallelRegion().getArrayById(d_link.id);
|
||||
Pair<JSpinner, JSpinner> pair = r_link.bar.dimensions.get(dim);
|
||||
pair.getKey().setValue(K.getValue());
|
||||
pair.getValue().setValue(B.getValue());
|
||||
|
||||
Reference in New Issue
Block a user