no message
This commit is contained in:
@@ -48,7 +48,7 @@ public class AddBugReport extends AddObjectPass<BugReport> {
|
||||
target.project_version = "";
|
||||
target.visualiser_version = Global.visualiser.version;
|
||||
target.sapfor_version = Global.Components.get(ComponentType.Sapfor_F).version;
|
||||
target.sapfor_settings =((GlobalDatabase) Utils_.db).settings.getSapforSettingsText();
|
||||
target.sapfor_settings =(Global.mainModule.getDb()).settings.getSapforSettingsText();
|
||||
target.percentage = 0;
|
||||
target.description = "Черновик отчёта об ошибке.\nЗаполните описание ошибочной ситуации, и нажмите 'Опубликовать'";
|
||||
target.date = new Date().getTime();
|
||||
|
||||
@@ -2,6 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import Common.Passes.AddObjectPass;
|
||||
@@ -11,7 +12,7 @@ public class AddCompiler extends AddObjectPass<Compiler> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
@Override
|
||||
public Class<? extends DBObject> getOwner() {
|
||||
|
||||
@@ -2,6 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.DVMParameter.DVMParameter;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||||
import Common.Passes.AddObjectPass;
|
||||
@@ -15,6 +16,6 @@ public class AddDVMParameter extends AddObjectPass<DVMParameter> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.GlobalData.EnvironmentValue.EnvironmentValue;
|
||||
import Common.Passes.AddObjectPass;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.EnvironmentValue.EnvironmentValue;
|
||||
public class AddEnvironmentValue extends AddObjectPass<EnvironmentValue> {
|
||||
public AddEnvironmentValue() {
|
||||
super(EnvironmentValue.class);
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.GlobalData.Compiler.CompilerType;
|
||||
import _VisualDVM.GlobalData.GlobalDatabase;
|
||||
@@ -14,12 +15,12 @@ public class AddMachine extends AddObjectPass<Machine> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (super.canStart(args)) {
|
||||
if (target.type.equals(MachineType.Local) && ((GlobalDatabase) Utils_.db).machines.LocalMachineExists()) {
|
||||
if (target.type.equals(MachineType.Local) && Global.mainModule.getDb().machines.LocalMachineExists()) {
|
||||
Log.Writeln_("Локальная машина уже добавлена.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Passes.AddObjectPass;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.Makefile.Makefile;
|
||||
import _VisualDVM.GlobalData.Module.Module;
|
||||
import _VisualDVM.ProjectData.LanguageName;
|
||||
import Common.Passes.AddObjectPass;
|
||||
public class AddMakefile extends AddObjectPass<Makefile> {
|
||||
public AddMakefile() {
|
||||
super(Makefile.class);
|
||||
@@ -25,6 +25,6 @@ public class AddMakefile extends AddObjectPass<Makefile> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||||
import Common.Passes.AddObjectPass;
|
||||
@@ -15,6 +16,6 @@ public class AddRunConfiguration extends AddObjectPass<RunConfiguration> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Database;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.Machine.MachineType;
|
||||
import _VisualDVM.GlobalData.User.User;
|
||||
@@ -14,7 +15,7 @@ public class AddUser extends AddObjectPass<User> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
@Override
|
||||
public Class<? extends DBObject> getOwner() {
|
||||
|
||||
@@ -2,6 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.Current_;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.GlobalData.SapforProfile.SapforProfile;
|
||||
import _VisualDVM.GlobalData.SapforProfileSetting.SapforProfileSetting;
|
||||
@@ -33,12 +34,12 @@ public class ApplyProfile extends Pass<SapforProfile> {
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
Vector<SapforProfileSetting> settings = new Vector<>();
|
||||
for (SapforProfileSetting sapforProfileSetting : ((GlobalDatabase) Utils_.db).sapforProfilesSettings.Data.values())
|
||||
for (SapforProfileSetting sapforProfileSetting : Global.mainModule.getDb().sapforProfilesSettings.Data.values())
|
||||
if (sapforProfileSetting.sapforprofile_id == target.id)
|
||||
settings.add(sapforProfileSetting);
|
||||
//--
|
||||
for (SapforProfileSetting setting : settings)
|
||||
if (((GlobalDatabase) Utils_.db).settings.containsKey(setting.name))
|
||||
if (Global.mainModule.getDb().settings.containsKey(setting.name))
|
||||
passes.get(PassCode.UpdateSetting).Do(setting.name, setting.value);
|
||||
//--
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.Current_;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.GlobalData.GlobalDatabase;
|
||||
@@ -54,12 +55,12 @@ public class Compile extends Pass<db_project_info> {
|
||||
//------------------------------------------
|
||||
compilationTask.CompleteSummary(target.compilation_maxtime);
|
||||
compilationTask.state = TaskState.Inactive;
|
||||
Utils_.db.Insert(compilationTask);
|
||||
Global.mainModule.getDb().Insert(compilationTask);
|
||||
Utils.forceDeleteWithCheck(compilationTask.getLocalWorkspace());
|
||||
}
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
((GlobalDatabase) Utils_.db).compilationTasks.ShowUI(compilationTask.getPK());
|
||||
Global.mainModule.getDb().compilationTasks.ShowUI(compilationTask.getPK());
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
@@ -86,7 +87,7 @@ public class Compile extends Pass<db_project_info> {
|
||||
}
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
((GlobalDatabase) Utils_.db).compilationTasks.ShowUI(compilationTask.getPK());
|
||||
Global.mainModule.getDb().compilationTasks.ShowUI(compilationTask.getPK());
|
||||
UI.getDebugWindow().ShowLastCompilationTask();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Current_;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Menus.PassMenuItem;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import _VisualDVM.Utils;
|
||||
@@ -99,7 +100,7 @@ public class DVMConvertProject extends ComponentsRepositoryPass<db_project_info>
|
||||
Vector<String> unit_args = new Vector<>();
|
||||
unit_args.add(target.name);
|
||||
unit_args.add(target.languageName.toString());
|
||||
unit_args.add(((GlobalDatabase) Utils_.db).settings.get(SettingName.DVMConvertationOptions).toString());
|
||||
unit_args.add((Global.mainModule.getDb()).settings.get(SettingName.DVMConvertationOptions).toString());
|
||||
unit_args.addAll(programsNames);
|
||||
unit.arg = String.join("\n", unit_args);
|
||||
Command(unit);
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import Common.Passes.DeleteObjectPass;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
public class DeleteCompiler extends DeleteObjectPass<Compiler> {
|
||||
public DeleteCompiler() {
|
||||
super(Compiler.class);
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.DVMParameter.DVMParameter;
|
||||
import Common.Passes.DeleteObjectPass;
|
||||
public class DeleteDVMParameter extends DeleteObjectPass<DVMParameter> {
|
||||
@@ -9,6 +10,6 @@ public class DeleteDVMParameter extends DeleteObjectPass<DVMParameter> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.GlobalData.Tasks.Task;
|
||||
@@ -10,21 +11,21 @@ import java.util.stream.Collectors;
|
||||
public class DeleteDebugResults extends CurrentProjectPass {
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
((GlobalDatabase) Utils_.db).compilationTasks.ClearUI();
|
||||
((GlobalDatabase) Utils_.db).runTasks.ClearUI();
|
||||
Global.mainModule.getDb().compilationTasks.ClearUI();
|
||||
Global.mainModule.getDb().runTasks.ClearUI();
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
Vector<Task> toDelete = ((GlobalDatabase) Utils_.db).compilationTasks.Data.values().stream().filter(task -> task.belongsToProject(target)).collect(Collectors.toCollection(Vector::new));
|
||||
((GlobalDatabase) Utils_.db).runTasks.Data.values().stream().filter(task -> task.belongsToProject(target)).forEach(toDelete::add);
|
||||
Vector<Task> toDelete = Global.mainModule.getDb().compilationTasks.Data.values().stream().filter(task -> task.belongsToProject(target)).collect(Collectors.toCollection(Vector::new));
|
||||
Global.mainModule.getDb().runTasks.Data.values().stream().filter(task -> task.belongsToProject(target)).forEach(toDelete::add);
|
||||
for (Task task : toDelete) {
|
||||
Utils.forceDeleteWithCheck(task.getLocalWorkspace());
|
||||
Utils_.db.Delete(task);
|
||||
Global.mainModule.getDb().Delete(task);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
((GlobalDatabase) Utils_.db).compilationTasks.ShowUI();
|
||||
((GlobalDatabase) Utils_.db).runTasks.ShowUI();
|
||||
Global.mainModule.getDb().compilationTasks.ShowUI();
|
||||
Global.mainModule.getDb().runTasks.ShowUI();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.GlobalDatabase;
|
||||
import Common.Visual.Windows.Dialog.Dialog;
|
||||
import _VisualDVM.Utils;
|
||||
@@ -24,7 +25,7 @@ public class DeleteDownloadedBugReports extends Pass<DirInfosDataSet> {
|
||||
target = (DirInfosDataSet) passes.get(PassCode.GetOldBugReports).target;
|
||||
if (target.Data.isEmpty()){
|
||||
Log.Writeln_("Не найдено отчетов, не использовавшихся " +
|
||||
((GlobalDatabase) Utils_.db).settings.get(SettingName.BugReportsAgeLimit).toInt32() +
|
||||
(Global.mainModule.getDb()).settings.get(SettingName.BugReportsAgeLimit).toInt32() +
|
||||
" месяцев и более!");
|
||||
return false;
|
||||
}
|
||||
@@ -48,7 +49,7 @@ public class DeleteDownloadedBugReports extends Pass<DirInfosDataSet> {
|
||||
}
|
||||
};
|
||||
if (dialog.ShowDialog("Найдено "+target.size()+" отчетов, не использовавшихся " +
|
||||
((GlobalDatabase) Utils_.db).settings.get(SettingName.BugReportsAgeLimit).toInt32()+
|
||||
(Global.mainModule.getDb()).settings.get(SettingName.BugReportsAgeLimit).toInt32()+
|
||||
" месяцев и более. Удалить?")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.GlobalData.EnvironmentValue.EnvironmentValue;
|
||||
import Common.Passes.DeleteObjectPass;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.EnvironmentValue.EnvironmentValue;
|
||||
public class DeleteEnvironmentValue extends DeleteObjectPass<EnvironmentValue> {
|
||||
public DeleteEnvironmentValue() {
|
||||
super(EnvironmentValue.class);
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import Common.Passes.DeleteObjectPass;
|
||||
public class DeleteMachine extends DeleteObjectPass<Machine> {
|
||||
@@ -9,6 +10,6 @@ public class DeleteMachine extends DeleteObjectPass<Machine> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Makefile.Makefile;
|
||||
import Common.Passes.DeleteObjectPass;
|
||||
public class DeleteMakefile extends DeleteObjectPass<Makefile> {
|
||||
@@ -9,6 +10,6 @@ public class DeleteMakefile extends DeleteObjectPass<Makefile> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.SapforProfile.SapforProfile;
|
||||
import Common.Passes.DeleteObjectPass;
|
||||
public class DeleteProfile extends DeleteObjectPass<SapforProfile> {
|
||||
@@ -9,6 +10,6 @@ public class DeleteProfile extends DeleteObjectPass<SapforProfile> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||||
import Common.Passes.DeleteObjectPass;
|
||||
public class DeleteRunConfiguration extends DeleteObjectPass<RunConfiguration> {
|
||||
@@ -9,6 +10,6 @@ public class DeleteRunConfiguration extends DeleteObjectPass<RunConfiguration> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.GlobalData.Tasks.CompilationTask.CompilationTask;
|
||||
@@ -19,7 +20,7 @@ public class DeleteSelectedCompilationTasks extends Pass<Vector<CompilationTask>
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = new Vector<>();
|
||||
((GlobalDatabase) Utils_.db).compilationTasks.Data.values().stream().filter(task -> task.isVisible() && task.isSelected() && task.isPassive()).forEach(task -> target.add(task));
|
||||
Global.mainModule.getDb().compilationTasks.Data.values().stream().filter(task -> task.isVisible() && task.isSelected() && task.isPassive()).forEach(task -> target.add(task));
|
||||
if (target.isEmpty()) {
|
||||
Log.Writeln_("Не отмечено ни одной задачи для удаления.");
|
||||
return false;
|
||||
@@ -27,21 +28,21 @@ public class DeleteSelectedCompilationTasks extends Pass<Vector<CompilationTask>
|
||||
}
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
((GlobalDatabase) Utils_.db).compilationTasks.ClearUI();
|
||||
Global.mainModule.getDb().compilationTasks.ClearUI();
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
for (CompilationTask task : target) {
|
||||
for (RunTask runTask : task.getRunTasks().values()) {
|
||||
Utils_.db.Delete(runTask);
|
||||
Global.mainModule.getDb().Delete(runTask);
|
||||
Utils.forceDeleteWithCheck(runTask.getLocalWorkspace());
|
||||
}
|
||||
Utils_.db.Delete(task);
|
||||
Global.mainModule.getDb().Delete(task);
|
||||
Utils.forceDeleteWithCheck(task.getLocalWorkspace());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
((GlobalDatabase) Utils_.db).compilationTasks.ShowUI();
|
||||
Global.mainModule.getDb().compilationTasks.ShowUI();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.GlobalData.Tasks.RunTask.RunTask;
|
||||
@@ -18,7 +19,7 @@ public class DeleteSelectedRunTasks extends Pass<Vector<RunTask>> {
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = new Vector<>();
|
||||
((GlobalDatabase) Utils_.db).runTasks.Data.values().stream().filter(task -> task.isVisible() && task.isSelected() && task.isPassive()).forEach(task -> target.add(task));
|
||||
(Global.mainModule.getDb()).runTasks.Data.values().stream().filter(task -> task.isVisible() && task.isSelected() && task.isPassive()).forEach(task -> target.add(task));
|
||||
if (target.isEmpty()) {
|
||||
Log.Writeln_("Не отмечено ни одной задачи для удаления.");
|
||||
return false;
|
||||
@@ -26,17 +27,17 @@ public class DeleteSelectedRunTasks extends Pass<Vector<RunTask>> {
|
||||
}
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
((GlobalDatabase) Utils_.db).runTasks.ClearUI();
|
||||
Global.mainModule.getDb().runTasks.ClearUI();
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
for (RunTask task : target) {
|
||||
Utils_.db.Delete(task);
|
||||
Global.mainModule.getDb().Delete(task);
|
||||
Utils.forceDeleteWithCheck(task.getLocalWorkspace());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
((GlobalDatabase) Utils_.db).runTasks.ShowUI();
|
||||
Global.mainModule.getDb().runTasks.ShowUI();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.User.User;
|
||||
import Common.Passes.DeleteObjectPass;
|
||||
public class DeleteUser extends DeleteObjectPass<User> {
|
||||
@@ -9,6 +10,6 @@ public class DeleteUser extends DeleteObjectPass<User> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import Common.Passes.Pass;
|
||||
public class DropFastAccess extends Pass {
|
||||
@@ -11,7 +12,7 @@ public class DropFastAccess extends Pass {
|
||||
protected void body() throws Exception {
|
||||
for (Pass pass : Pass.FAPasses) {
|
||||
pass.stats.Drop();
|
||||
Utils_.db.Update(pass.stats);
|
||||
Global.mainModule.getDb().Update(pass.stats);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.DBLastProject.DBLastProject;
|
||||
import Common.Passes.Pass;
|
||||
public class DropLastProjects extends Pass {
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
Utils_.db.DeleteAll(DBLastProject.class);
|
||||
Global.mainModule.getDb().DeleteAll(DBLastProject.class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Repository.EmailMessage;
|
||||
import _VisualDVM.Repository.Subscribes.Subscriber;
|
||||
import _VisualDVM.Repository.Subscribes.UI.SubscriberForm;
|
||||
@@ -62,7 +63,7 @@ public class EditAccount extends Email {
|
||||
super.performDone();
|
||||
Current.getAccount().name = name;
|
||||
Current.getAccount().email = email;
|
||||
Utils_.db.Update(Current.getAccount());
|
||||
Global.mainModule.getDb().Update(Current.getAccount());
|
||||
//это не регистрация. только заполнение почты в своей бд и ее подтверждение на реальность.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import Common.Passes.EditObjectPass;
|
||||
public class EditCompiler extends EditObjectPass<Compiler> {
|
||||
@@ -9,6 +10,6 @@ public class EditCompiler extends EditObjectPass<Compiler> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.DVMParameter.DVMParameter;
|
||||
import Common.Passes.EditObjectPass;
|
||||
public class EditDVMParameter extends EditObjectPass<DVMParameter> {
|
||||
@@ -9,6 +10,6 @@ public class EditDVMParameter extends EditObjectPass<DVMParameter> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.EnvironmentValue.EnvironmentValue;
|
||||
import Common.Passes.EditObjectPass;
|
||||
public class EditEnvironmentValue extends EditObjectPass<EnvironmentValue> {
|
||||
@@ -9,6 +10,6 @@ public class EditEnvironmentValue extends EditObjectPass<EnvironmentValue> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import Common.Passes.EditObjectPass;
|
||||
public class EditMachine extends EditObjectPass<Machine> {
|
||||
@@ -9,6 +10,6 @@ public class EditMachine extends EditObjectPass<Machine> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Makefile.Makefile;
|
||||
import Common.Passes.EditObjectPass;
|
||||
public class EditMakefile extends EditObjectPass<Makefile> {
|
||||
@@ -9,6 +10,6 @@ public class EditMakefile extends EditObjectPass<Makefile> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Module.Module;
|
||||
import Common.Passes.EditObjectPass;
|
||||
public class EditModule extends EditObjectPass<Module> {
|
||||
@@ -9,6 +10,6 @@ public class EditModule extends EditObjectPass<Module> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.SapforProfile.SapforProfile;
|
||||
import Common.Passes.EditObjectPass;
|
||||
public class EditProfile extends EditObjectPass<SapforProfile> {
|
||||
@@ -9,6 +10,6 @@ public class EditProfile extends EditObjectPass<SapforProfile> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||||
import Common.Passes.EditObjectPass;
|
||||
public class EditRunConfiguration extends EditObjectPass<RunConfiguration> {
|
||||
@@ -9,6 +10,6 @@ public class EditRunConfiguration extends EditObjectPass<RunConfiguration> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.User.User;
|
||||
import Common.Passes.EditObjectPass;
|
||||
public class EditUser extends EditObjectPass<User> {
|
||||
@@ -9,6 +10,6 @@ public class EditUser extends EditObjectPass<User> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class GetOldBugReports extends Pass<DirInfosDataSet> {
|
||||
//---
|
||||
Calendar c = new GregorianCalendar();
|
||||
c.setTimeInMillis(System.currentTimeMillis());
|
||||
c.add(Calendar.MONTH, -((GlobalDatabase) Utils_.db).settings.get(SettingName.BugReportsAgeLimit).toInt32());
|
||||
c.add(Calendar.MONTH, -(Global.mainModule.getDb()).settings.get(SettingName.BugReportsAgeLimit).toInt32());
|
||||
Date date = c.getTime();
|
||||
System.out.println(date);
|
||||
long border = date.getTime();
|
||||
|
||||
@@ -2,6 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.Current_;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.GlobalData.RemoteFile.RemoteFile;
|
||||
import _VisualDVM.GlobalData.User.UserState;
|
||||
@@ -43,7 +44,7 @@ public class InitialiseUser extends Pass {
|
||||
if (passes.get(PassCode.PublishRemoteWorkspace).Do(workspace)) {
|
||||
Current.getUser().workspace = workspace.path;
|
||||
Current.getUser().state = UserState.ready_to_work;
|
||||
Utils_.db.Update(Current.getUser());
|
||||
Global.mainModule.getDb().Update(Current.getUser());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,7 +52,7 @@ public class InitialiseUser extends Pass {
|
||||
//рега была. просто заносим то что там пользователю
|
||||
Current.getUser().workspace = workspace.path;
|
||||
Current.getUser().state = UserState.ready_to_work;
|
||||
Utils_.db.Update(Current.getUser());
|
||||
Global.mainModule.getDb().Update(Current.getUser());
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -61,6 +62,6 @@ public class InitialiseUser extends Pass {
|
||||
}
|
||||
@Override
|
||||
protected void showFinish() throws Exception {
|
||||
((GlobalDatabase) Utils_.db).users.RefreshUI();
|
||||
Global.mainModule.getDb().users.RefreshUI();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.GlobalData.User.User;
|
||||
import _VisualDVM.GlobalData.User.UserState;
|
||||
@@ -47,6 +48,6 @@ public class LocalInitaliseUser extends ProcessPass<User> {
|
||||
}
|
||||
//-
|
||||
target.state = UserState.ready_to_work;
|
||||
Utils_.db.Update(target);
|
||||
Global.mainModule.getDb().Update(target);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Current_;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.VDirectoryChooser;
|
||||
import _VisualDVM.Utils;
|
||||
@@ -114,13 +115,13 @@ public class OpenCurrentProject extends Pass<db_project_info> {
|
||||
SettingName.FREE_FORM, target.style.equals(LanguageStyle.free) ? "1" : "0")
|
||||
;
|
||||
DBLastProject lastProject;
|
||||
if (((GlobalDatabase) Utils_.db).lastProjects.containsKey(target.Home.getAbsolutePath())) {
|
||||
lastProject = ((GlobalDatabase) Utils_.db).lastProjects.get(target.Home.getAbsolutePath());
|
||||
if ((Global.mainModule.getDb()).lastProjects.containsKey(target.Home.getAbsolutePath())) {
|
||||
lastProject = Global.mainModule.getDb().lastProjects.get(target.Home.getAbsolutePath());
|
||||
lastProject.RefreshOpenTime();
|
||||
Utils_.db.Update(lastProject);
|
||||
Global.mainModule.getDb().Update(lastProject);
|
||||
} else {
|
||||
lastProject = new DBLastProject(target);
|
||||
Utils_.db.Insert(lastProject);
|
||||
Global.mainModule.getDb().Insert(lastProject);
|
||||
}
|
||||
target.setInfo(lastProject);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import Common.Current_;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.Windows.Dialog.Dialog;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.GlobalData.Compiler.CompilerType;
|
||||
import _VisualDVM.GlobalData.CompilerEnvironment.CompilerEnvironment;
|
||||
@@ -82,13 +83,13 @@ public class PickCompilerEnvironments extends Pass<String> {
|
||||
confEnv.run_configuration_id = Current.getRunConfiguration().id;
|
||||
confEnv.name = compilerEnv.name;
|
||||
confEnv.value = compilerEnv.value;
|
||||
Utils_.db.Insert(confEnv);
|
||||
Global.mainModule.getDb().Insert(confEnv);
|
||||
} else {
|
||||
confEnv = ((GlobalDatabase) Utils_.db).environmentValues.getEnvByName(compilerEnv.name);
|
||||
confEnv = (Global.mainModule.getDb()).environmentValues.getEnvByName(compilerEnv.name);
|
||||
if (confEnv != null) {
|
||||
confEnv.name = compilerEnv.name;
|
||||
confEnv.value = compilerEnv.value;
|
||||
Utils_.db.Update(confEnv);
|
||||
Global.mainModule.getDb().Update(confEnv);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,6 +97,6 @@ public class PickCompilerEnvironments extends Pass<String> {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
((GlobalDatabase) Utils_.db).environmentValues.ShowUI();
|
||||
(Global.mainModule.getDb()).environmentValues.ShowUI();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public class Precompilation extends Pass<db_project_info> {
|
||||
target = Current.getProject();
|
||||
if (Utils_.isWindows()) {
|
||||
//--
|
||||
makepath = ((GlobalDatabase) Utils_.db).settings.get(SettingName.LocalMakePathWindows).toString();
|
||||
makepath = Global.mainModule.getDb().settings.get(SettingName.LocalMakePathWindows).toString();
|
||||
if (makepath.isEmpty()) {
|
||||
Log.Writeln_("Не задан путь к make.exe.\n " +
|
||||
"Укажите его в меню глобальных настроек." +
|
||||
@@ -188,10 +188,10 @@ public class Precompilation extends Pass<db_project_info> {
|
||||
protected void body() throws Exception {
|
||||
if (Utils_.isWindows()) {
|
||||
name_to_kill = "make.exe";
|
||||
StartProcess(Utils_.DQuotes(((GlobalDatabase) Utils_.db).settings.get(SettingName.LocalMakePathWindows).Value) + " -j " + ((GlobalDatabase) Utils_.db).settings.get(SettingName.Kernels).toString(),
|
||||
StartProcess(Utils_.DQuotes((Global.mainModule.getDb()).settings.get(SettingName.LocalMakePathWindows).Value) + " -j " + (Global.mainModule.getDb()).settings.get(SettingName.Kernels).toString(),
|
||||
target.compilation_maxtime);
|
||||
} else
|
||||
StartProcess("make -j " + ((GlobalDatabase) Utils_.db).settings.get(SettingName.Kernels).toString(), target.compilation_maxtime);
|
||||
StartProcess("make -j " + (Global.mainModule.getDb()).settings.get(SettingName.Kernels).toString(), target.compilation_maxtime);
|
||||
}
|
||||
protected void StartProcess(String command, int TA) throws Exception {
|
||||
killed = false;
|
||||
|
||||
@@ -4,6 +4,7 @@ import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import Visual_DVM_2021.Passes.CurrentProjectPass;
|
||||
import Visual_DVM_2021.Passes.PassCode;
|
||||
import _VisualDVM.Global;
|
||||
public class ResetCurrentProject extends CurrentProjectPass {
|
||||
@Override
|
||||
protected void performPreparation() throws Exception {
|
||||
@@ -15,7 +16,7 @@ public class ResetCurrentProject extends CurrentProjectPass {
|
||||
protected void body() throws Exception {
|
||||
target.CleanVersions();
|
||||
target.ResetDB();
|
||||
Utils_.db.Delete(target.getInfo());
|
||||
Global.mainModule.getDb().Delete(target.getInfo());
|
||||
}
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
|
||||
@@ -2,6 +2,7 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.Current_;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.GlobalData.GlobalDatabase;
|
||||
@@ -29,13 +30,13 @@ public class Run extends Pass<db_project_info> {
|
||||
protected void performPreparation() throws Exception {
|
||||
runTasks = Current.getRunConfiguration().generateRunTasks(target, Current.getCompilationTask());
|
||||
for (RunTask runTask : runTasks) {
|
||||
Utils_.db.Insert(runTask);
|
||||
Global.mainModule.getDb().Insert(runTask);
|
||||
Utils.forceDeleteWithCheck(runTask.getLocalWorkspace());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected void showPreparation() throws Exception {
|
||||
((GlobalDatabase) Utils_.db).runTasks.ShowUI();
|
||||
Global.mainModule.getDb().runTasks.ShowUI();
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) {
|
||||
@@ -84,8 +85,8 @@ public class Run extends Pass<db_project_info> {
|
||||
boolean task_completed = false;
|
||||
task.setProgress(i, runTasks.size());
|
||||
//-
|
||||
((GlobalDatabase) Utils_.db).runTasks.RefreshUI();
|
||||
((GlobalDatabase) Utils_.db).runTasks.SetCurrentObjectUI(task.id);
|
||||
Global.mainModule.getDb().runTasks.RefreshUI();
|
||||
Global.mainModule.getDb().runTasks.SetCurrentObjectUI(task.id);
|
||||
//-
|
||||
subpass.Do(task, target);
|
||||
//-
|
||||
@@ -105,7 +106,7 @@ public class Run extends Pass<db_project_info> {
|
||||
break;
|
||||
}
|
||||
//-
|
||||
((GlobalDatabase) Utils_.db).runTasks.RefreshUI();
|
||||
Global.mainModule.getDb().runTasks.RefreshUI();
|
||||
UI.getDebugWindow().ShowCurrentRunTask();
|
||||
//-
|
||||
if (!task_completed) break;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import _VisualDVM.GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.GlobalData.Settings.SettingName;
|
||||
@@ -30,7 +31,7 @@ public class SPF_GetArrayDistribution extends SPF_GetArrayDistributionOnlyAnalys
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (((GlobalDatabase) Utils_.db).settings.get(SettingName.MPI_PROGRAM).toBoolean()) {
|
||||
if (Global.mainModule.getDb().settings.get(SettingName.MPI_PROGRAM).toBoolean()) {
|
||||
UI_.Info("Включена настройка SAPFOR 'MPI программа'." +
|
||||
"\nПостроение распределения данных невозможно.");
|
||||
passes.get(PassCode.SPF_SharedMemoryParallelization).Do();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Visual.Controls.PassControl;
|
||||
import _VisualDVM.Visual.UI;
|
||||
import Common.Utils.Index;
|
||||
@@ -73,7 +74,7 @@ public class SPF_GetArrayDistributionOnlyAnalysis extends SapforAnalysis {
|
||||
}
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return ((GlobalDatabase) Utils_.db).settings.get(SettingName.MPI_PROGRAM).toBoolean()?
|
||||
return Global.mainModule.getDb().settings.get(SettingName.MPI_PROGRAM).toBoolean()?
|
||||
"Анализ кода (общая память)":"Анализ кода";
|
||||
}
|
||||
public void RefreshControls(){
|
||||
|
||||
@@ -45,7 +45,7 @@ public class SPF_ParseFilesWithOrder extends SapforAnalysis {
|
||||
precompilation_done = false;
|
||||
boolean res = (
|
||||
silent ||
|
||||
(!((GlobalDatabase) Utils_.db).settings.get(SettingName.Precompilation).toBoolean() ||
|
||||
(!Global.mainModule.getDb().settings.get(SettingName.Precompilation).toBoolean() ||
|
||||
(precompilation_done = passes.get(PassCode.Precompilation).Do())))
|
||||
&& super.canStart(args) && checkActiveFiles();
|
||||
return res;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Database.Database;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.GlobalData.SapforProfile.SapforProfile;
|
||||
import Common.Passes.AddObjectPass;
|
||||
@@ -16,12 +17,12 @@ public class SaveProfile extends AddObjectPass<SapforProfile> {
|
||||
}
|
||||
@Override
|
||||
protected Database getDb() {
|
||||
return Utils_.db;
|
||||
return Global.mainModule.getDb();
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
//1. проверить нет ли уже такой последовательности настроек.
|
||||
SapforProfile profile = ((GlobalDatabase) Utils_.db).checkProfileForCurrentSettings();
|
||||
SapforProfile profile = Global.mainModule.getDb().checkProfileForCurrentSettings();
|
||||
if (profile != null) {
|
||||
Log.Writeln_("Текущий набор настроек уже сохранён как профиль " + Utils_.Brackets(profile.description));
|
||||
return false;
|
||||
@@ -32,6 +33,6 @@ public class SaveProfile extends AddObjectPass<SapforProfile> {
|
||||
protected void body() throws Exception {
|
||||
target.creationDate = new Date().getTime();
|
||||
super.body();
|
||||
((GlobalDatabase) Utils_.db).insertProfileSettings(target);
|
||||
Global.mainModule.getDb().insertProfileSettings(target);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import Common.Current_;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Visual.Windows.Dialog.Text.ReadOnlyMultilineTextForm;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.GlobalData.GlobalDatabase;
|
||||
import _VisualDVM.GlobalData.Machine.MachineType;
|
||||
@@ -61,7 +62,7 @@ public class ShowCompilerVersion extends Pass<String> {
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
if (needsShow) {
|
||||
((GlobalDatabase) Utils_.db).compilers.RefreshUI();
|
||||
(Global.mainModule.getDb()).compilers.RefreshUI();
|
||||
ReadOnlyMultilineTextForm ff = new ReadOnlyMultilineTextForm();
|
||||
ff.ShowDialog("Версия", target);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ public class UpdateSetting extends Pass<DBSetting> {
|
||||
VFileChooser fileChooser = new VFileChooser("", "exe");
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = ((GlobalDatabase) Utils_.db).settings.get(args[0]);
|
||||
target = (Global.mainModule.getDb()).settings.get(args[0]);
|
||||
NewValue = target.Value;
|
||||
if (args.length == 1) {
|
||||
//интерфейсный режим. получение по клику на пункт меню.
|
||||
@@ -114,7 +114,7 @@ public class UpdateSetting extends Pass<DBSetting> {
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
target.Value = NewValue;
|
||||
Utils_.db.Update(target);
|
||||
Global.mainModule.getDb().Update(target);
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user