no message
This commit is contained in:
@@ -85,11 +85,6 @@ public class Compiler extends iDBObject {
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.matchCurrentID(Current.Machine, machine_id);
|
||||
}
|
||||
//todo понять как извлекать версию чтобы выдавать нормальную инфу.
|
||||
@Override
|
||||
public String toString() {
|
||||
return call_command;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package _VisualDVM.GlobalData.Compiler.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Compiler.Compiler;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
@@ -45,4 +47,8 @@ public class CompilersForm extends DataSetControlForm<Compiler> {
|
||||
PassCode.ShowCompilerVersion,
|
||||
PassCode.ShowCompilerHelp);
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(Compiler object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,10 @@ public class DVMParameterDBTable extends iDBTable<DVMParameter> {
|
||||
}
|
||||
*/
|
||||
for (DVMParameter par : (Global.mainModule.getDb()).dvmParameters.Data.values()) {
|
||||
if (par.isVisible() && (Result.id != par.id) && (par.name.equals(name))) {
|
||||
if (
|
||||
Global.mainModule.getDb().dvmParameters.getUI().isObjectVisible(par)
|
||||
|
||||
&& (Result.id != par.id) && (par.name.equals(name))) {
|
||||
Log.Writeln("В конфигурации запуска уже задан параметр DVM системы с именем " + Utils_.Brackets(name));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -10,10 +10,6 @@ public class EnvironmentValue extends iDBObject {
|
||||
public int machine_id = CommonConstants.Nan; //для удаления машин
|
||||
public int run_configuration_id = CommonConstants.Nan;
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.matchCurrentID(Current.RunConfiguration, run_configuration_id);
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return name + "=" + Utils_.DQuotes(value);
|
||||
}
|
||||
|
||||
@@ -48,8 +48,10 @@ public class EnvironmentValuesDBTable extends iDBTable<EnvironmentValue> {
|
||||
if (value.contains("\"")) {
|
||||
Log.Writeln("Значение переменной окружения не может содержать двойные кавычки");
|
||||
}
|
||||
for (EnvironmentValue env : (Global.mainModule.getDb()).environmentValues.Data.values()) {
|
||||
if (env.isVisible() && (Result.id != env.id) && (env.name.equals(name))) {
|
||||
for (EnvironmentValue env : Global.mainModule.getDb().environmentValues.Data.values()) {
|
||||
if (
|
||||
Global.mainModule.getDb().environmentValues.getUI().isObjectVisible(env)
|
||||
&& (Result.id != env.id) && (env.name.equals(name))) {
|
||||
Log.Writeln("В конфигурации запуска уже задана переменная окружения с именем " + Utils_.Brackets(name));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package _VisualDVM.GlobalData.EnvironmentValue.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.EnvironmentValue.EnvironmentValue;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -28,4 +31,8 @@ public class EnvironmentsValuesForm extends DataSetControlForm<EnvironmentValue>
|
||||
PassCode.DeleteEnvironmentValue,
|
||||
PassCode.PickCompilerEnvironments);
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(EnvironmentValue object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.RunConfiguration, object.run_configuration_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,10 +21,6 @@ import java.util.stream.Collectors;
|
||||
public class Makefile extends ModuleAnchestor {
|
||||
public Makefile() {
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.matchCurrentID(Current.Machine, machine_id);
|
||||
}
|
||||
public LinkedHashMap<LanguageName, Module> getActiveModules() {
|
||||
return Global.mainModule.getDb().getByFKAndGroupBy(this, Module.class, "language", LanguageName.class).values().stream().filter(Module::isSelected).collect(Collectors.toMap(module -> module.language, module -> module, (a, b) -> b, LinkedHashMap::new));
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package _VisualDVM.GlobalData.Makefile.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Makefile.Makefile;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -39,4 +42,8 @@ public class MakefilesForm extends DataSetControlForm<Makefile> {
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(Makefile object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,10 +19,6 @@ public class Module extends ModuleAnchestor {
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.matchCurrentID(Current.Makefile, makefile_id);
|
||||
}
|
||||
@Override
|
||||
public boolean isSelected() {
|
||||
return on > 0;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package _VisualDVM.GlobalData.Module.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Module.Module;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -31,4 +34,9 @@ public class ModulesForm extends DataSetControlForm<Module> {
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.EditModule);
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(Module object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.Makefile, object.makefile_id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -182,10 +182,6 @@ public class RunConfiguration extends iDBObject {
|
||||
return res;
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.matchCurrentID(Current.Machine, machine_id);
|
||||
}
|
||||
@Override
|
||||
public String getFKName() {
|
||||
return "run_configuration_id";
|
||||
}
|
||||
|
||||
@@ -43,7 +43,8 @@ public class RunConfigurationsDBTable extends iDBTable<RunConfiguration> {
|
||||
@Override
|
||||
public void fillFields() {
|
||||
for (Compiler compiler : (Global.mainModule.getDb()).compilers.Data.values()) {
|
||||
if (compiler.isVisible() && compiler.type.equals(CompilerType.dvm))
|
||||
if (Global.mainModule.getDb().compilers.getUI().isObjectVisible(compiler)
|
||||
&& compiler.type.equals(CompilerType.dvm))
|
||||
fields.cbLauncherCall.addItem(compiler);
|
||||
}
|
||||
UI.TrySelect_s(fields.cbLauncherCall, Result.LauncherCall);
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package _VisualDVM.GlobalData.RunConfiguration.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.RunConfiguration.RunConfiguration;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
@@ -39,4 +42,8 @@ public class RunConfigurationsForm extends DataSetControlForm<RunConfiguration>
|
||||
}
|
||||
};
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(RunConfiguration object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,10 +13,6 @@ public class SapforProfileSetting extends iDBObject {
|
||||
@Description("DEFAULT -1")
|
||||
public int sapforprofile_id = CommonConstants.Nan;
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.matchCurrentID(Current.SapforProfile, sapforprofile_id);
|
||||
}
|
||||
@Override
|
||||
public Object getFieldAt(int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 1:
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package _VisualDVM.GlobalData.SapforProfileSetting.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.SapforProfileSetting.SapforProfileSetting;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -23,4 +26,8 @@ public class SapforProfileSettingsForm extends DataSetControlForm<SapforProfileS
|
||||
public boolean hasMenuBar() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(SapforProfileSetting object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.SapforProfile, object.sapforprofile_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,14 +69,6 @@ public class CompilationTask extends Task {
|
||||
public File getHome() {
|
||||
return Global.CompilationTasksDirectory;
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return
|
||||
Global.mainModule.matchCurrentID(Current.Machine, machine_id) &&
|
||||
Global.mainModule.matchCurrentID(Current.User, user_id) &&
|
||||
Global.mainModule.HasProject() &&
|
||||
belongsToProject(Global.mainModule.getProject());
|
||||
}
|
||||
public Makefile getMakefile() {
|
||||
return Global.mainModule.getDb().getById(Makefile.class, makefile_id);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package _VisualDVM.GlobalData.Tasks.CompilationTask.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
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.Tasks.CompilationTask.CompilationTask;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
@@ -53,4 +55,11 @@ public class CompilationTasksForm extends DataSetControlForm<CompilationTask> {
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.DeleteCompilationTasks);
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(CompilationTask object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id) &&
|
||||
MainModule_.instance.matchCurrentID(Current.User, object.user_id) &&
|
||||
Global.mainModule.HasProject() &&
|
||||
object.belongsToProject(Global.mainModule.getProject());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,17 +48,6 @@ public class RunTask extends Task {
|
||||
return getRunConfiguration().getLaunchScriptText(getCompilationTask().binary_name, matrix);
|
||||
}
|
||||
//---------------------------------------
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return
|
||||
Global.mainModule.matchCurrentID(Current.Machine, machine_id) &&
|
||||
Global.mainModule.matchCurrentID(Current.User, user_id) &&
|
||||
Global.mainModule.matchCurrentID(Current.RunConfiguration, run_configuration_id) &&
|
||||
Global.mainModule.HasProject() &&
|
||||
belongsToProject(Global.mainModule.getProject()) &&
|
||||
Global.mainModule.HasCompilationTask() &&
|
||||
compilation_task_id == Global.mainModule.getCompilationTask().id;
|
||||
}
|
||||
public RunConfiguration getRunConfiguration() {
|
||||
return (Global.mainModule.getDb()).runConfigurations.Data.get(run_configuration_id);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package _VisualDVM.GlobalData.Tasks.RunTask.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
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.Tasks.RunTask.RunTask;
|
||||
import _VisualDVM.MainModule;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -46,4 +49,15 @@ public class RunTasksForm extends DataSetControlForm<RunTask> {
|
||||
public DataMenuBar createMenuBar() {
|
||||
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.DeleteRunTasks);
|
||||
}
|
||||
@Override
|
||||
public boolean isObjectVisible(RunTask object) {
|
||||
return
|
||||
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) &&
|
||||
Global.mainModule.HasProject() &&
|
||||
object.belongsToProject(Global.mainModule.getProject()) &&
|
||||
Global.mainModule.HasCompilationTask() &&
|
||||
object.compilation_task_id == Global.mainModule.getCompilationTask().id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package _VisualDVM.GlobalData.User.UI;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.DataSetControlForm;
|
||||
import Common.Visual.Menus.DataMenuBar;
|
||||
import Common.Visual.Tables.RendererStatusEnum;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.User.User;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
@@ -45,4 +47,9 @@ public class UsersForm extends DataSetControlForm<User> {
|
||||
PassCode.InitialiseUser,
|
||||
PassCode.DeleteUser);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isObjectVisible(User object) {
|
||||
return MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.GlobalData.User;
|
||||
import Common.CommonConstants;
|
||||
import Common.Database.Objects.iDBObject;
|
||||
import Common.MainModule_;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.GlobalData.Machine.Machine;
|
||||
@@ -19,10 +20,6 @@ public class User extends iDBObject {
|
||||
//-
|
||||
@Description("IGNORE")
|
||||
public UserConnection connection = null;
|
||||
/*
|
||||
@Description("DEFAULT '?'")
|
||||
public String email = "?";
|
||||
*/
|
||||
//--
|
||||
public User(Machine machine_in, String login_in, String password_in) {
|
||||
machine_id = machine_in.id;
|
||||
@@ -41,10 +38,6 @@ public class User extends iDBObject {
|
||||
public User() {
|
||||
}
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return Global.mainModule.matchCurrentID(Current.Machine, machine_id);
|
||||
}
|
||||
@Override
|
||||
public String getDialogName() {
|
||||
return login;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user