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

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

@@ -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