временное сохранение последнийх выбранных машины юзера и компилятора в пропертиес. концепция пропертиес будет дорабатываться потом.
This commit is contained in:
15
.idea/workspace.xml
generated
15
.idea/workspace.xml
generated
@@ -7,8 +7,17 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Global.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Global.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ShutdownComponentsServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ShutdownComponentsServer.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/Visual/DataSetControlForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Visual/DataSetControlForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/GlobalDatabase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/GlobalDatabase.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalProperties.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalProperties.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/CheckAccount.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/CheckAccount.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/MainUI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/MainUI.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/MainMenuBar/MainMenuBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/MainMenuBar/MainMenuBar.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/MainMenuBar/MainWindow.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/MainWindow.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/MainForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/MainForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/TestingForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/TestingForm.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -59,7 +68,7 @@
|
||||
<option name="stateVersion" value="1" />
|
||||
</component>
|
||||
<component name="ProblemsViewState">
|
||||
<option name="selectedTabId" value="ProjectErrors" />
|
||||
<option name="selectedTabId" value="CurrentFile" />
|
||||
</component>
|
||||
<component name="ProjectId" id="1UqWSAGBQQNofrCLxSPPtOZrGP7" />
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
|
||||
|
||||
13
properties
13
properties
@@ -2,9 +2,9 @@
|
||||
"Mode": "Normal",
|
||||
"ServerAddress": "alex-freenas.ddns.net",
|
||||
"ServerUserName": "testuser",
|
||||
"ServerUserSHHPort": 23,
|
||||
"ServerUserSHHPort": 2000,
|
||||
"ComponentsServerPort": 7995,
|
||||
"TestingServerPort": 7996,
|
||||
"TestingServerPort": 7998,
|
||||
"SocketTimeout": 5000,
|
||||
"OldServer": false,
|
||||
"SMTPHost": "smtp.mail.ru",
|
||||
@@ -33,8 +33,11 @@
|
||||
"InstructionPath": "",
|
||||
"PerformanceAnalyzerPath": "",
|
||||
"ComponentsBackUpsCount": 10,
|
||||
"AutoCheckTesting": true,
|
||||
"AutoCheckTesting": false,
|
||||
"CheckTestingIntervalSeconds": 10,
|
||||
"EmailOnTestingProgress": true,
|
||||
"eraseTestingWorkspaces": true
|
||||
"EmailOnTestingProgress": false,
|
||||
"eraseTestingWorkspaces": true,
|
||||
"lastMachineId": 13,
|
||||
"lastUserId": 24,
|
||||
"lastCompilerId": 52
|
||||
}
|
||||
@@ -566,4 +566,7 @@ public abstract class DataSetControlForm<D extends DBObject> extends ControlForm
|
||||
public PassCode_ getDeletePassCode() {
|
||||
return null;
|
||||
}
|
||||
public Object getCurrentPK(Object nanValue){
|
||||
return current==null? nanValue: current.getPK();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
package _VisualDVM.GlobalData;
|
||||
import Common.CommonConstants;
|
||||
import Common.Database.VisualiserDatabase;
|
||||
import Common.MainModule_;
|
||||
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.MakefilesDBTable;
|
||||
import _VisualDVM.GlobalData.Module.ModulesDBTable;
|
||||
@@ -24,6 +27,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;
|
||||
@@ -98,40 +102,20 @@ public class GlobalDatabase extends VisualiserDatabase {
|
||||
}
|
||||
//todo централизованное сохранение текущих объектов в базах
|
||||
public void SaveCredentials() {
|
||||
/*
|
||||
try {
|
||||
|
||||
|
||||
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();
|
||||
}
|
||||
*/
|
||||
Global.properties.updateField("lastMachineId", getTable(Machine.class).getUI().getCurrentPK(CommonConstants.Nan));
|
||||
Global.properties.updateField("lastUserId", getTable(User.class).getUI().getCurrentPK(CommonConstants.Nan));
|
||||
Global.properties.updateField("lastCompilerId", getTable(Compiler.class).getUI().getCurrentPK(CommonConstants.Nan));
|
||||
}
|
||||
public void UpdateCredentials() {
|
||||
/*
|
||||
public void RestoreCredentials() {
|
||||
if (Global.properties.lastMachineId != CommonConstants.Nan) {
|
||||
getTable(Machine.class).getUI().SetCurrentByPK(Global.properties.lastMachineId);
|
||||
//-
|
||||
if (Global.properties.lastUserId != CommonConstants.Nan)
|
||||
getTable(User.class).getUI().SetCurrentByPK(Global.properties.lastUserId);
|
||||
//--
|
||||
if (Global.properties.lastCompilerId != CommonConstants.Nan)
|
||||
getTable(Compiler.class).getUI().SetCurrentByPK(Global.properties.lastCompilerId);
|
||||
}
|
||||
try {
|
||||
Update(MainModule_.instance.getDb().getTable(Credentials.class).getUI().getCurrent());
|
||||
} catch (Exception ex) {
|
||||
Utils_.MainLog.PrintException(ex);
|
||||
}
|
||||
*/
|
||||
}
|
||||
//--
|
||||
public LinkedHashMap<SettingName, String> getSapforSettingsForProfile() {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package _VisualDVM;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Controls.StableMenuItem;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
@@ -85,6 +86,14 @@ public class GlobalProperties {
|
||||
public boolean EmailOnTestingProgress = false; //включено ли оповещение по email о результатах тестирования.
|
||||
@Expose
|
||||
public boolean eraseTestingWorkspaces = true; //удалять ли рабочее пространство пакетов тестирования после его завершения
|
||||
|
||||
@Expose
|
||||
public int lastMachineId = CommonConstants.Nan;
|
||||
@Expose
|
||||
public int lastUserId = CommonConstants.Nan;
|
||||
@Expose
|
||||
public int lastCompilerId = CommonConstants.Nan;
|
||||
|
||||
public GlobalProperties(GlobalProperties p) {
|
||||
super();
|
||||
Mode = p.Mode;
|
||||
@@ -125,6 +134,10 @@ public class GlobalProperties {
|
||||
CheckTestingIntervalSeconds = p.CheckTestingIntervalSeconds;
|
||||
EmailOnTestingProgress = p.EmailOnTestingProgress;
|
||||
eraseTestingWorkspaces = p.eraseTestingWorkspaces;
|
||||
//-
|
||||
lastMachineId = p.lastMachineId;
|
||||
lastUserId = p.lastUserId;
|
||||
lastCompilerId = p.lastCompilerId;
|
||||
}
|
||||
//--
|
||||
public GlobalProperties() {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package _VisualDVM.Passes.All;
|
||||
import Common.Passes.Pass;
|
||||
import Common.Visual.UI;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
public class CheckAccount extends Pass<Boolean> {
|
||||
@@ -54,7 +55,7 @@ public class CheckAccount extends Pass<Boolean> {
|
||||
}
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
if (Global.mainModule.getUI().getMainWindow() != null) {
|
||||
if (Global.mainModule.getUI().hasMainWindow()) {
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().ShowAccount();
|
||||
if (Global.componentsServer.db.bugReports.getUI().getCurrent() != null)
|
||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().ShowCurrentBugReport();
|
||||
|
||||
@@ -6,7 +6,7 @@ import _VisualDVM.TestingSystem.Common.TestingMenuBar;
|
||||
import _VisualDVM.Visual.Interface.DebugWindow;
|
||||
import _VisualDVM.Visual.Interface.VersionsWindow;
|
||||
import _VisualDVM.Visual.Menus.CredentialsBar.CredentialsMenuBar;
|
||||
import _VisualDVM.Visual.Menus.MainMenuBar.MainWindow;
|
||||
import _VisualDVM.Visual.Windows.MainWindow;
|
||||
import _VisualDVM.Visual.Menus.VersionsMenuBar.VersionsMenuBar;
|
||||
import _VisualDVM.Visual.Syntax.LightSPFEditorTheme;
|
||||
import _VisualDVM.Visual.Windows.*;
|
||||
|
||||
@@ -53,6 +53,7 @@ public class MainMenuBar extends VisualiserMenuBar {
|
||||
//-
|
||||
setPreferredSize(new Dimension(0, 30));
|
||||
//---
|
||||
/*
|
||||
add(new MenuBarButton() {
|
||||
{
|
||||
setIcon("/Common/icons/Apply.png");
|
||||
@@ -62,6 +63,7 @@ public class MainMenuBar extends VisualiserMenuBar {
|
||||
});
|
||||
}
|
||||
});
|
||||
*/
|
||||
ShowProject(false);
|
||||
}
|
||||
public void ShowUpdatesIcon() {
|
||||
|
||||
@@ -13,7 +13,6 @@ import _VisualDVM.Visual.Interface.ProjectWindow;
|
||||
import _VisualDVM.Visual.Interface.TestingWindow;
|
||||
import _VisualDVM.Visual.Interface.TestsWindow;
|
||||
import _VisualDVM.Visual.Menus.MainMenuBar.MainMenuBar;
|
||||
import _VisualDVM.Visual.Menus.MainMenuBar.MainWindow;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package _VisualDVM.Visual.Menus.MainMenuBar;
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import _VisualDVM.Visual.Interface.CallbackWindow;
|
||||
import _VisualDVM.Visual.Interface.ProjectWindow;
|
||||
import _VisualDVM.Visual.Interface.TestingWindow;
|
||||
@@ -1,4 +1,5 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.CommonConstants;
|
||||
import Common.MainModule_;
|
||||
import Common.Visual.FormWithSplitters;
|
||||
import Common.Visual.TextField.StyledTextField;
|
||||
@@ -157,7 +158,7 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
Global.testingServer.db.dvmSettings.ShowUI();
|
||||
Global.testingServer.db.sapforSettings.ShowUI();
|
||||
//---
|
||||
RestoreLastCredentials();
|
||||
Global.mainModule.getDb().RestoreCredentials();
|
||||
//---
|
||||
if (Global.properties.AutoCheckTesting)
|
||||
TestingServer.TimerOn();
|
||||
@@ -267,50 +268,7 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
||||
sapforPackageTreeMaster.DoComparePass();
|
||||
testingTabs.setSelectedIndex(3);
|
||||
}
|
||||
public void RestoreLastCredentials() {
|
||||
/*
|
||||
Credentials credentials = MainModule_.instance.getDb().getTable(Credentials.class).get;
|
||||
if (credentials.machine_id != CommonConstants.Nan) {
|
||||
if (Global.mainModule.getDb().machines.containsKey(credentials.machine_id)) {
|
||||
(Global.mainModule.getDb()).machines.ShowUI(credentials.machine_id);
|
||||
if ((Global.mainModule.getDb()).users.containsKey(credentials.user_id)) {
|
||||
(Global.mainModule.getDb()).users.ShowUI(credentials.user_id);
|
||||
} else {
|
||||
credentials.user_id = CommonConstants.Nan;
|
||||
(Global.mainModule.getDb()).UpdateCredentials();
|
||||
}
|
||||
if ((Global.mainModule.getDb()).compilers.containsKey(credentials.compiler_id)) {
|
||||
(Global.mainModule.getDb()).compilers.ShowUI(credentials.compiler_id);
|
||||
} else {
|
||||
credentials.compiler_id = CommonConstants.Nan;
|
||||
(Global.mainModule.getDb()).UpdateCredentials();
|
||||
}
|
||||
//-
|
||||
if ((Global.mainModule.getDb()).makefiles.containsKey(credentials.makefile_id)) {
|
||||
(Global.mainModule.getDb()).makefiles.ShowUI(credentials.makefile_id);
|
||||
} else {
|
||||
credentials.makefile_id = CommonConstants.Nan;
|
||||
(Global.mainModule.getDb()).UpdateCredentials();
|
||||
}
|
||||
//-
|
||||
if ((Global.mainModule.getDb()).runConfigurations.containsKey(credentials.runconfiguration_id)) {
|
||||
(Global.mainModule.getDb()).runConfigurations.ShowUI(credentials.runconfiguration_id);
|
||||
} else {
|
||||
credentials.runconfiguration_id = CommonConstants.Nan;
|
||||
(Global.mainModule.getDb()).UpdateCredentials();
|
||||
}
|
||||
} else {
|
||||
credentials.machine_id = CommonConstants.Nan;
|
||||
credentials.user_id = CommonConstants.Nan;
|
||||
credentials.compiler_id = CommonConstants.Nan;
|
||||
credentials.remotesapfor_id = CommonConstants.Nan;
|
||||
credentials.makefile_id = CommonConstants.Nan;
|
||||
credentials.runconfiguration_id = CommonConstants.Nan;
|
||||
(Global.mainModule.getDb()).UpdateCredentials();
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public void CollapseCredentials() {
|
||||
Global.mainModule.getDb().splitters.get("SC71").position = SC71.getDividerLocation();
|
||||
|
||||
Reference in New Issue
Block a user