постепенное выведение старой концепции текущих объектов, касаемо табличных лучше держать их в интерфейсе таблиц, чтобы не писать описание объекта дважды и не мучиться с типом. некоторые фиксы
This commit is contained in:
@@ -5,6 +5,7 @@ import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.GlobalData.Compiler.CompilerType;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.Validators.PathValidator;
|
||||
public class CompilerDialog extends DBObjectDialog<Compiler, CompilerFields> {
|
||||
@@ -75,7 +76,7 @@ public class CompilerDialog extends DBObjectDialog<Compiler, CompilerFields> {
|
||||
}
|
||||
@Override
|
||||
public void ProcessResult() {
|
||||
Result.machine_id = Global.mainModule.getMachine().id;
|
||||
Result.machine_id = Global.mainModule.getDb().getTable(Machine.class).getUI().getCurrent().id;
|
||||
Result.description = fields.tfDescription.getText();
|
||||
Result.call_command = fields.tfCallCommand.getText();
|
||||
Result.help_command = fields.tfHelpCommand.getText();
|
||||
|
||||
@@ -5,6 +5,7 @@ import Common.Visual.Windows.Dialog.DialogFields;
|
||||
import Common.Visual.Windows.Dialog.VDirectoryChooser;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.CompilerType;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.Machine.MachineType;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -30,7 +31,7 @@ public class CompilerFields implements DialogFields {
|
||||
CompilerType type = (CompilerType) cbCompilerType.getSelectedItem();
|
||||
if (type == CompilerType.dvm) {
|
||||
String dst = null;
|
||||
if (Global.mainModule.getMachine().type.equals(MachineType.Local)) {
|
||||
if (Global.mainModule.getDb().getTable(Machine.class).getUI().getCurrent().type.equals(MachineType.Local)) {
|
||||
File file = directoryChooser.ShowDialog();
|
||||
if (file != null)
|
||||
dst = file.getAbsolutePath();
|
||||
|
||||
@@ -7,6 +7,7 @@ import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -15,8 +16,8 @@ public class CompilersForm extends DataSetControlForm<Compiler> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.Compiler;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
@@ -68,7 +69,8 @@ public class CompilersForm extends DataSetControlForm<Compiler> {
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(Compiler object) {
|
||||
return super.isObjectVisible(object) && MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id);
|
||||
return super.isObjectVisible(object) &&
|
||||
Global.mainModule.getDb().getTable(Machine.class).getUI().matchCurrentID(object.machine_id);
|
||||
}
|
||||
@Override
|
||||
protected DBObjectDialog getDialog() {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package _VisualDVM.GlobalData.Credentials;
|
||||
import Common.Database.Tables.iDBTable;
|
||||
//todo реализовать стандартно для выбранных объектов (?)
|
||||
public class CredentialsDBTable extends iDBTable<Credentials> {
|
||||
public CredentialsDBTable() {
|
||||
super(Credentials.class);
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package _VisualDVM.GlobalData.DVMParameter.UI;
|
||||
import Common.MainModule_;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.DVMParameter.DVMParameter;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||||
import _VisualDVM.Utils;
|
||||
public class DVMParameterDialog extends DBObjectDialog<DVMParameter, DVMParameterFields> {
|
||||
public DVMParameterDialog() {
|
||||
@@ -45,8 +48,8 @@ public class DVMParameterDialog extends DBObjectDialog<DVMParameter, DVMParamete
|
||||
}
|
||||
@Override
|
||||
public void ProcessResult() {
|
||||
Result.machine_id = Global.mainModule.getMachine().id;
|
||||
Result.run_configuration_id = Global.mainModule.getRunConfiguration().id;
|
||||
Result.machine_id = MainModule_.instance.getDb().getTable(Machine.class).getUI().getCurrent().id;
|
||||
Result.run_configuration_id = MainModule_.instance.getDb().getTable(RunConfiguration.class).getUI().getCurrent().id;
|
||||
Result.name = (String) fields.cbName.getSelectedItem();
|
||||
Result.value = fields.tfValue.getText();
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ public class DVMParametersForm extends DataSetControlForm<DVMParameter> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.DVMParameterValue;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package _VisualDVM.GlobalData.EnvironmentValue.UI;
|
||||
import Common.MainModule_;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.EnvironmentValue.EnvironmentValue;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||||
import _VisualDVM.Utils;
|
||||
public class EnvironmentValueDialog extends DBObjectDialog<EnvironmentValue, EnvironmentValueFields> {
|
||||
public EnvironmentValueDialog() {
|
||||
@@ -40,8 +43,8 @@ public class EnvironmentValueDialog extends DBObjectDialog<EnvironmentValue, Env
|
||||
}
|
||||
@Override
|
||||
public void ProcessResult() {
|
||||
Result.machine_id = Global.mainModule.getMachine().id;
|
||||
Result.run_configuration_id = Global.mainModule.getRunConfiguration().id;
|
||||
Result.machine_id = MainModule_.instance.getDb().getTable(Machine.class).getUI().getCurrent().id;
|
||||
Result.run_configuration_id = MainModule_.instance.getDb().getTable(RunConfiguration.class).getUI().getCurrent().id;
|
||||
Result.name = (String) fields.cbName.getSelectedItem();
|
||||
Result.value = fields.tfValue.getText();
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.EnvironmentValue.EnvironmentValue;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -15,8 +16,8 @@ public class EnvironmentsValuesForm extends DataSetControlForm<EnvironmentValue>
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.EnvironmentValue;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
@@ -48,7 +49,8 @@ public class EnvironmentsValuesForm extends DataSetControlForm<EnvironmentValue>
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(EnvironmentValue object) {
|
||||
return super.isObjectVisible(object) && MainModule_.instance.matchCurrentID(Current.RunConfiguration, object.run_configuration_id);
|
||||
return super.isObjectVisible(object) &&
|
||||
MainModule_.instance.getDb().matchCurrentID(RunConfiguration.class,object.run_configuration_id );
|
||||
}
|
||||
@Override
|
||||
protected DBObjectDialog<EnvironmentValue, ? extends DialogFields> getDialog() {
|
||||
|
||||
@@ -6,15 +6,19 @@ import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Account.Account;
|
||||
import _VisualDVM.GlobalData.Account.AccountsDBTable;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.GlobalData.Compiler.CompilersDBTable;
|
||||
import _VisualDVM.GlobalData.Credentials.Credentials;
|
||||
import _VisualDVM.GlobalData.Credentials.CredentialsDBTable;
|
||||
import _VisualDVM.GlobalData.DBLastProject.LastProjectsDBTable;
|
||||
import _VisualDVM.GlobalData.DVMParameter.DVMParameterDBTable;
|
||||
import _VisualDVM.GlobalData.EnvironmentValue.EnvironmentValuesDBTable;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.Machine.MachinesDBTable;
|
||||
import _VisualDVM.GlobalData.Makefile.Makefile;
|
||||
import _VisualDVM.GlobalData.Makefile.MakefilesDBTable;
|
||||
import _VisualDVM.GlobalData.Module.ModulesDBTable;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfigurationsDBTable;
|
||||
import _VisualDVM.GlobalData.SapforProfile.SapforProfile;
|
||||
import _VisualDVM.GlobalData.SapforProfile.SapforProfilesDBTable;
|
||||
@@ -25,6 +29,7 @@ import _VisualDVM.GlobalData.Settings.SettingName;
|
||||
import _VisualDVM.GlobalData.Settings.SettingsDBTable;
|
||||
import _VisualDVM.GlobalData.Tasks.CompilationTask.CompilationTasksDBTable;
|
||||
import _VisualDVM.GlobalData.Tasks.RunTask.RunTasksDBTable;
|
||||
import _VisualDVM.GlobalData.User.User;
|
||||
import _VisualDVM.GlobalData.User.UsersDBTable;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.Repository.Component.ComponentType;
|
||||
@@ -97,30 +102,46 @@ public class GlobalDatabase extends VisualiserDatabase {
|
||||
public PassCode getSynchronizePassCode() {
|
||||
return null;
|
||||
}
|
||||
|
||||
//todo централизованное сохранение текущих объектов в базах
|
||||
|
||||
public void SaveCredentials() {
|
||||
/*
|
||||
try {
|
||||
Credentials credentials = Global.mainModule.getCredentials();
|
||||
if (Global.mainModule.HasMachine())
|
||||
credentials.machine_id = Global.mainModule.getMachine().id;
|
||||
if (Global.mainModule.HasUser())
|
||||
credentials.user_id = Global.mainModule.getUser().id;
|
||||
if (Global.mainModule.HasCompiler())
|
||||
credentials.compiler_id = Global.mainModule.getCompiler().id;
|
||||
if (Global.mainModule.HasMakefile())
|
||||
credentials.makefile_id = Global.mainModule.getMakefile().id;
|
||||
if (Global.mainModule.HasRunConfiguration())
|
||||
credentials.runconfiguration_id = Global.mainModule.getRunConfiguration().id;
|
||||
|
||||
|
||||
Credentials credentials = MainModule_.instance.getDb().getTable(Credentials.class).getUI().getCurrent();
|
||||
if (MainModule_.instance.getDb().getTable(Machine.class).getUI().getCurrent()!=null)
|
||||
credentials.machine_id = MainModule_.instance.getDb().getTable(Machine.class).getUI().getCurrent().id;
|
||||
|
||||
if (MainModule_.instance.getDb().getTable(User.class).getUI().getCurrent()!=null)
|
||||
credentials.user_id = MainModule_.instance.getDb().getTable(User.class).getUI().getCurrent().id;
|
||||
|
||||
if (MainModule_.instance.getDb().getTable(Compiler.class).getUI().getCurrent()!=null)
|
||||
credentials.compiler_id = MainModule_.instance.getDb().getTable(Compiler.class).getUI().getCurrent().id;
|
||||
|
||||
if (MainModule_.instance.getDb().getTable(Makefile.class).getUI().getCurrent()!=null)
|
||||
credentials.makefile_id =MainModule_.instance.getDb().getTable(Makefile.class).getUI().getCurrent().id;
|
||||
|
||||
if (MainModule_.instance.getDb().getTable(RunConfiguration.class).getUI().getCurrent()!=null)
|
||||
credentials.runconfiguration_id = MainModule_.instance.getDb().getTable(RunConfiguration.class).getUI().getCurrent().id;
|
||||
Update(credentials);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
public void UpdateCredentials() {
|
||||
/*
|
||||
}
|
||||
try {
|
||||
Update(Global.mainModule.getCredentials());
|
||||
Update(MainModule_.instance.getDb().getTable(Credentials.class).getUI().getCurrent());
|
||||
} catch (Exception ex) {
|
||||
Utils_.MainLog.PrintException(ex);
|
||||
}
|
||||
*/
|
||||
}
|
||||
//--
|
||||
public LinkedHashMap<SettingName, String> getSapforSettingsForProfile() {
|
||||
|
||||
@@ -18,8 +18,8 @@ public class MachinesForm extends DataSetControlForm<Machine> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.Machine;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
|
||||
@@ -5,6 +5,7 @@ import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.Makefile.Makefile;
|
||||
import _VisualDVM.GlobalData.Module.UI.ModuleAnchestorFields;
|
||||
import _VisualDVM.GlobalData.Module.UI.ModuleAnchestorForm;
|
||||
@@ -16,8 +17,8 @@ public class MakefilesForm extends DataSetControlForm<Makefile> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.Makefile;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
@@ -64,7 +65,7 @@ public class MakefilesForm extends DataSetControlForm<Makefile> {
|
||||
@Override
|
||||
public boolean isObjectVisible(Makefile object) {
|
||||
return super.isObjectVisible(object) &&
|
||||
MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id);
|
||||
MainModule_.instance.getDb().getTable(Machine.class).getUI().matchCurrentID(object.machine_id);
|
||||
}
|
||||
@Override
|
||||
protected DBObjectDialog<Makefile, ModuleAnchestorFields> getDialog() {
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package _VisualDVM.GlobalData.Module.UI;
|
||||
import Common.MainModule_;
|
||||
import Common.Passes.Pass;
|
||||
import Common.Visual.Controls.StyledTextComboBox;
|
||||
import Common.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.Makefile.Makefile;
|
||||
import _VisualDVM.GlobalData.Module.Module;
|
||||
import _VisualDVM.GlobalData.Module.ModuleAnchestor;
|
||||
@@ -27,7 +29,7 @@ public class ModuleAnchestorFields implements DialogFields {
|
||||
//считаем что машина есть.
|
||||
public ModuleAnchestorFields() {
|
||||
//-
|
||||
LinkedHashMap<Integer, Compiler> compilers = Global.mainModule.getMachine().getCompilers();
|
||||
LinkedHashMap<Integer, Compiler> compilers = MainModule_.instance.getDb().getTable(Machine.class).getUI().getCurrent().getCompilers();
|
||||
compilers.values().forEach(compiler -> cbCompilers.addItem(compiler));
|
||||
bHelp.addActionListener(e -> {
|
||||
if (cbCompilers.getSelectedItem() != null) {
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package _VisualDVM.GlobalData.Module.UI;
|
||||
import Common.CommonConstants;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.GlobalData.Compiler.CompilerType;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.Makefile.Makefile;
|
||||
import _VisualDVM.GlobalData.Module.Module;
|
||||
import _VisualDVM.GlobalData.Module.ModuleAnchestor;
|
||||
@@ -101,7 +103,7 @@ public class ModuleAnchestorForm<T extends ModuleAnchestor> extends DBObjectDial
|
||||
}
|
||||
@Override
|
||||
public void ProcessResult() {
|
||||
Result.machine_id = Global.mainModule.getMachine().id;
|
||||
Result.machine_id = MainModule_.instance.getDb().getTable(Machine.class).getUI().getCurrent().id;
|
||||
Compiler compiler = (Compiler) fields.cbCompilers.getSelectedItem();
|
||||
Result.compiler_id = (compiler != null) ? compiler.id : CommonConstants.Nan;
|
||||
Result.command = command;
|
||||
|
||||
@@ -6,6 +6,7 @@ import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import Common.Visual.Windows.Dialog.DialogFields;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.Makefile.Makefile;
|
||||
import _VisualDVM.GlobalData.Module.Module;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -15,8 +16,8 @@ public class ModulesForm extends DataSetControlForm<Module> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.Module;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
@@ -56,7 +57,8 @@ public class ModulesForm extends DataSetControlForm<Module> {
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(Module object) {
|
||||
return super.isObjectVisible(object) && MainModule_.instance.matchCurrentID(Current.Makefile, object.makefile_id);
|
||||
return super.isObjectVisible(object) &&
|
||||
MainModule_.instance.getDb().getTable(Makefile.class).getUI().matchCurrentID(object.makefile_id);
|
||||
}
|
||||
@Override
|
||||
protected DBObjectDialog<Module, ? extends DialogFields> getDialog() {
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package _VisualDVM.GlobalData.RunConfiguration.UI;
|
||||
import Common.CommonConstants;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.UI;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.GlobalData.Compiler.CompilerType;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -45,7 +47,7 @@ public class RunConfigurationDialog extends DBObjectDialog<RunConfiguration, Run
|
||||
}
|
||||
@Override
|
||||
public void ProcessResult() {
|
||||
Result.machine_id = Global.mainModule.getMachine().id;
|
||||
Result.machine_id = MainModule_.instance.getDb().getTable(Machine.class).getUI().getCurrent().id;
|
||||
Result.LauncherCall = fields.cbLauncherCall.getSelectedItem().toString();
|
||||
Result.LauncherOptions = (String) fields.cbLaunchOptions.getSelectedItem();
|
||||
if (fields.cbLauncherCall.getSelectedItem() instanceof Compiler) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -14,8 +15,8 @@ public class RunConfigurationsForm extends DataSetControlForm<RunConfiguration>
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.RunConfiguration;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
@@ -69,7 +70,8 @@ public class RunConfigurationsForm extends DataSetControlForm<RunConfiguration>
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(RunConfiguration object) {
|
||||
return super.isObjectVisible(object) && MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id);
|
||||
return super.isObjectVisible(object) &&
|
||||
MainModule_.instance.getDb().getTable(Machine.class).getUI().matchCurrentID(object.machine_id);
|
||||
}
|
||||
@Override
|
||||
protected DBObjectDialog getDialog() {
|
||||
|
||||
@@ -15,10 +15,6 @@ public class SapforProfilesForm extends DataSetControlForm<SapforProfile> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.SapforProfile;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.SapforProfile.SapforProfile;
|
||||
import _VisualDVM.GlobalData.SapforProfileSetting.SapforProfileSetting;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -11,8 +13,8 @@ public class SapforProfileSettingsForm extends DataSetControlForm<SapforProfileS
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.SapforProfileSetting;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public String[] getUIColumnNames() {
|
||||
@@ -42,6 +44,7 @@ public class SapforProfileSettingsForm extends DataSetControlForm<SapforProfileS
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(SapforProfileSetting object) {
|
||||
return super.isObjectVisible(object) && MainModule_.instance.matchCurrentID(Current.SapforProfile, object.sapforprofile_id);
|
||||
return super.isObjectVisible(object) &&
|
||||
MainModule_.instance.getDb().getTable(SapforProfile.class).getUI().matchCurrentID(object.sapforprofile_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,9 +5,10 @@ import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Tables.RendererDate;
|
||||
import Common.Visual.Tables.RendererStatusEnum;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.Tasks.CompilationTask.CompilationTask;
|
||||
import _VisualDVM.GlobalData.User.User;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -16,8 +17,8 @@ public class CompilationTasksForm extends DataSetControlForm<CompilationTask> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.CompilationTask;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
@@ -62,8 +63,8 @@ public class CompilationTasksForm extends DataSetControlForm<CompilationTask> {
|
||||
@Override
|
||||
public boolean isObjectVisible(CompilationTask object) {
|
||||
return super.isObjectVisible(object) &&
|
||||
MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id) &&
|
||||
MainModule_.instance.matchCurrentID(Current.User, object.user_id) &&
|
||||
MainModule_.instance.getDb().matchCurrentID(Machine.class, object.machine_id) &&
|
||||
MainModule_.instance.getDb().matchCurrentID(User.class, object.user_id) &&
|
||||
Global.mainModule.HasProject() &&
|
||||
object.belongsToProject(Global.mainModule.getProject());
|
||||
}
|
||||
|
||||
@@ -7,7 +7,11 @@ import Common.Visual.Tables.RendererDate;
|
||||
import Common.Visual.Tables.RendererStatusEnum;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||||
import _VisualDVM.GlobalData.Tasks.CompilationTask.CompilationTask;
|
||||
import _VisualDVM.GlobalData.Tasks.RunTask.RunTask;
|
||||
import _VisualDVM.GlobalData.User.User;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -16,8 +20,8 @@ public class RunTasksForm extends DataSetControlForm<RunTask> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.RunTask;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
@@ -74,11 +78,11 @@ public class RunTasksForm extends DataSetControlForm<RunTask> {
|
||||
@Override
|
||||
public boolean isObjectVisible(RunTask object) {
|
||||
return super.isObjectVisible(object) &&
|
||||
MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id) &&
|
||||
MainModule_.instance.matchCurrentID(Current.User, object.user_id) &&
|
||||
MainModule_.instance.matchCurrentID(Current.RunConfiguration, object.run_configuration_id) &&
|
||||
MainModule_.instance.getDb().getTable(Machine.class).getUI().matchCurrentID(object.machine_id) &&
|
||||
MainModule_.instance.getDb().getTable(User.class).getUI().matchCurrentID(object.user_id) &&
|
||||
MainModule_.instance.getDb().getTable(RunConfiguration.class).getUI().matchCurrentID(object.run_configuration_id) &&
|
||||
Global.mainModule.HasProject() &&
|
||||
object.belongsToProject(Global.mainModule.getProject()) &&
|
||||
MainModule_.instance.matchCurrentID(Current.CompilationTask, object.compilation_task_id);
|
||||
MainModule_.instance.getDb().getTable(CompilationTask.class).getUI().matchCurrentID(object.compilation_task_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package _VisualDVM.GlobalData.Tasks.Supervisor.Local.Linux;
|
||||
import Common.MainModule_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||||
import _VisualDVM.GlobalData.Tasks.RunTask.RunTask;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -16,7 +19,7 @@ public class LinuxLocalRunSupervisor extends LinuxLocalTaskSupervisor<RunTask> {
|
||||
}
|
||||
@Override
|
||||
protected Map<String, String> getEnvs() {
|
||||
return Global.mainModule.getRunConfiguration().getEnvMap();
|
||||
return MainModule_.instance.getDb().getTable(RunConfiguration.class).getUI().getCurrent().getEnvMap();
|
||||
}
|
||||
@Override
|
||||
protected String getScriptText() {
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package _VisualDVM.GlobalData.Tasks.Supervisor.Local.Windows;
|
||||
import Common.MainModule_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||||
import _VisualDVM.GlobalData.Tasks.RunTask.RunTask;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -25,7 +28,7 @@ public class WindowsLocalRunSupervisor extends WindowsLocalTaskSupervisor<RunTas
|
||||
}
|
||||
@Override
|
||||
protected Map<String, String> getEnvs() {
|
||||
return Global.mainModule.getRunConfiguration().getEnvMap();
|
||||
return MainModule_.instance.getDb().getTable(RunConfiguration.class).getUI().getCurrent().getEnvMap();
|
||||
}
|
||||
void kill_mpi() throws Exception {
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package _VisualDVM.GlobalData.Tasks.Supervisor.Remote;
|
||||
import Common.MainModule_;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.RemoteFile.RemoteFile;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||||
import _VisualDVM.GlobalData.Tasks.QueueSystem.MVS;
|
||||
import _VisualDVM.GlobalData.Tasks.TaskState;
|
||||
public class MVSRunSupervisor extends ServerRunSupervisor {
|
||||
@@ -29,7 +32,7 @@ public class MVSRunSupervisor extends ServerRunSupervisor {
|
||||
}
|
||||
@Override
|
||||
protected void StartTask() throws Exception {
|
||||
String env = String.join(" ", Global.mainModule.getRunConfiguration().getEnvList());
|
||||
String env = String.join(" ", MainModule_.instance.getDb().getTable(RunConfiguration.class).getUI().getCurrent().getEnvList());
|
||||
mvs_time = (task.maxtime / 60); //в минутах
|
||||
if (task.maxtime % 60 > 0) mvs_time += 1;
|
||||
String res = "maxtime=" + Utils_.DQuotes(mvs_time) + " ./run";
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package _VisualDVM.GlobalData.Tasks.Supervisor.Remote;
|
||||
import Common.MainModule_;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.RemoteFile.RemoteFile;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||||
import _VisualDVM.GlobalData.Tasks.RunTask.RunTask;
|
||||
import _VisualDVM.GlobalData.Tasks.TaskState;
|
||||
import _VisualDVM.Utils;
|
||||
@@ -14,7 +17,7 @@ public class ServerRunSupervisor extends RemoteTaskSupervisor<RunTask> {
|
||||
@Override
|
||||
protected void StartTask() throws Exception {
|
||||
String res = "./run";
|
||||
String env = String.join(" ", Global.mainModule.getRunConfiguration().getEnvList());
|
||||
String env = String.join(" ", MainModule_.instance.getDb().getTable(RunConfiguration.class).getUI().getCurrent().getEnvList());
|
||||
if (!env.isEmpty()) res = env + " " + res;
|
||||
//--
|
||||
task.PID = pass.user.connection.startShellProcess(getRemoteProject(), "PID",
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package _VisualDVM.GlobalData.User.UI;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.Machine.MachineType;
|
||||
import _VisualDVM.GlobalData.User.User;
|
||||
import _VisualDVM.GlobalData.User.UserAuthentication;
|
||||
@@ -14,7 +16,7 @@ public class UserDialog extends DBObjectDialog<User, UserFields> {
|
||||
}
|
||||
@Override
|
||||
public void fillFields() {
|
||||
if (Global.mainModule.getMachine().type.equals(MachineType.Local)) {
|
||||
if (MainModule_.instance.getDb().getTable(Machine.class).getUI().getCurrent().type.equals(MachineType.Local)) {
|
||||
Result.login = "этот пользователь";
|
||||
fields.tfLogin.setEditable(false);
|
||||
}
|
||||
@@ -29,7 +31,7 @@ public class UserDialog extends DBObjectDialog<User, UserFields> {
|
||||
}
|
||||
@Override
|
||||
public void ProcessResult() {
|
||||
Result.machine_id = Global.mainModule.getMachine().id;
|
||||
Result.machine_id = MainModule_.instance.getDb().getTable(Machine.class).getUI().getCurrent().id;
|
||||
Result.login = fields.tfLogin.getText();
|
||||
Result.authentication = UserAuthentication.password;
|
||||
Result.password = new String(fields.tfPassword.getPassword());
|
||||
|
||||
@@ -7,6 +7,7 @@ import Common.Visual.Tables.RendererStatusEnum;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
import _VisualDVM.GlobalData.User.User;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -16,8 +17,8 @@ public class UsersForm extends DataSetControlForm<User> {
|
||||
super(dataSource_in, mountPanel_in);
|
||||
}
|
||||
@Override
|
||||
protected Current CurrentName() {
|
||||
return Current.User;
|
||||
protected boolean needsCurrent() {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
protected boolean hasCheckBox() {
|
||||
@@ -65,7 +66,8 @@ public class UsersForm extends DataSetControlForm<User> {
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(User object) {
|
||||
return super.isObjectVisible(object) && super.isObjectVisible(object) && MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id);
|
||||
return super.isObjectVisible(object) &&
|
||||
MainModule_.instance.getDb().getTable(Machine.class).getUI().matchCurrentID(object.machine_id);
|
||||
}
|
||||
@Override
|
||||
protected DBObjectDialog getDialog() {
|
||||
|
||||
Reference in New Issue
Block a user