no message
This commit is contained in:
47
.idea/workspace.xml
generated
47
.idea/workspace.xml
generated
@@ -7,12 +7,53 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServerProperties.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/NormalProperties.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingServerProperties.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/VisualDVMProperties.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Current.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Current.java" afterDir="false" />
|
<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/GlobalData/Credentials/Credentials.java" beforeDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Credentials/CredentialsDBTable.java" beforeDir="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/GlobalData/GlobalDatabase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/GlobalDatabase.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Tasks/Supervisor/Local/Windows/WindowsLocalCompilationSupervisor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/GlobalData/Tasks/Supervisor/Local/Windows/WindowsLocalCompilationSupervisor.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/MainModule.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/MainModule.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ArchivesBackupPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ArchivesBackupPass.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DeleteDownloadedBugReports.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DeleteDownloadedBugReports.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/GetOldBugReports.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/GetOldBugReports.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/InstallComponentFromFolder.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/InstallComponentFromFolder.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/Precompilation.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/Precompilation.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/StartSelectedDVMConfigurations.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/StartSelectedDVMConfigurations.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/StartSelectedSAPFORConfigurations.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/StartSelectedSAPFORConfigurations.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/UpdateProperty.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/UpdateProperty.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/SSH/RepositoryServerSSHPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/SSH/RepositoryServerSSHPass.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Files/UI/Editor/SPFEditor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Files/UI/Editor/SPFEditor.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Project/db_project_info.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Project/db_project_info.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/UI/ProjectArraysForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/UI/ProjectArraysForm.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/BugReportsDatabase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/BugReportsDatabase.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/Component/Visualiser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/Component/Visualiser.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/RepositoryServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/RepositoryServer.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/Server/ComponentsServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/Server/ComponentsServer.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/MachineProcess/MachineProcess.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/MachineProcess/MachineProcess.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingMenuBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingMenuBar.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingPlanner.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingServer.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/RemoteDVMTestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/RemoteDVMTestingPlanner.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforTestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforTestingPlanner.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Utils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Utils.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/MainMenuBar/LastOpenedProjectsMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/MainMenuBar/LastOpenedProjectsMenu.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/MainMenuBar/SynchronizationSettingsMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/MainMenuBar/SynchronizationSettingsMenu.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/MainMenuBar/VersionsComparisonMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/MainMenuBar/VersionsComparisonMenu.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/MainMenuBar/VisualiserSettingsMenu/CompactnessSettingsMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/MainMenuBar/VisualiserSettingsMenu/CompactnessSettingsMenu.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/MainMenuBar/VisualiserSettingsMenu/VisualiserSettingsMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Menus/MainMenuBar/VisualiserSettingsMenu/VisualiserSettingsMenu.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/CallbackForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/CallbackForm.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/ComponentsWindow.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/ComponentsWindow.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/FileForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/FileForm.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/ProjectForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/ProjectForm.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/SapforVersionsComparisonForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/SapforVersionsComparisonForm.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/TasksComparisonForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/TasksComparisonForm.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" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/VersionsComparisonForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/VersionsComparisonForm.java" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
|||||||
62
properties
62
properties
@@ -1,49 +1,29 @@
|
|||||||
{
|
{
|
||||||
"Mode": "Normal",
|
|
||||||
"ServerAddress": "alex-freenas.ddns.net",
|
|
||||||
"ServerUserName": "testuser",
|
|
||||||
"ServerUserSHHPort": 2000,
|
|
||||||
"ComponentsServerPort": 7995,
|
|
||||||
"TestingServerPort": 7998,
|
|
||||||
"SocketTimeout": 5000,
|
|
||||||
"OldServer": false,
|
|
||||||
"SMTPHost": "smtp.mail.ru",
|
|
||||||
"SMTPPort": 465,
|
|
||||||
"MailSocketPort": 465,
|
|
||||||
"collapseCredentials": false,
|
|
||||||
"collapseFileGraphs": false,
|
|
||||||
"collapseFileMessages": false,
|
|
||||||
"collapseProjectTrees": false,
|
|
||||||
"BackupWorkspace": "_sapfor_x64_backups",
|
|
||||||
"Workspace": "E:\\Tests",
|
"Workspace": "E:\\Tests",
|
||||||
"ProjectsSearchDirectory": "E:\\BUG",
|
"ProjectsSearchDirectory": "E:\\Workspace\\BT_inserted\\v1",
|
||||||
"EditorFontSize": 17,
|
"VisualiserPath": "C:\\Users\\misha\\Downloads",
|
||||||
"BackupHour": 5,
|
"Sapfor_FPath": "E:\\_sapfor_x64\\Components\\Sapfor_F",
|
||||||
"BackupMinute": 0,
|
"Visualizer_2Path": "C:\\Users\\misha\\Documents",
|
||||||
"EmailAdminsOnStart": false,
|
"InstructionPath": "C:\\Users\\misha\\Documents",
|
||||||
|
"PerformanceAnalyzerPath": "C:\\Users\\misha\\Documents",
|
||||||
"AutoUpdateSearch": false,
|
"AutoUpdateSearch": false,
|
||||||
"AutoBugReportsLoad": true,
|
"AutoBugReportsLoad": true,
|
||||||
"AutoTestsLoad": true,
|
"AutoTestsLoad": true,
|
||||||
"ConfirmPassesStart": true,
|
"ConfirmPassesStart": true,
|
||||||
"ShowPassesDone": true,
|
"ShowPassesDone": true,
|
||||||
"FocusPassesResult": true,
|
"FocusPassesResult": true,
|
||||||
"ProjectDBName": "new_project_base.sqlite",
|
"collapseCredentials": false,
|
||||||
"BugReportsDBName": "bug_reports.sqlite",
|
"collapseFileGraphs": false,
|
||||||
"TestsDBName": "tests.sqlite",
|
"collapseFileMessages": false,
|
||||||
"ComponentsWindowWidth": 843,
|
"collapseProjectTrees": false,
|
||||||
"ComponentsWindowHeight": 250,
|
"EditorFontSize": 17,
|
||||||
"VisualiserPath": "C:\\Users\\misha\\Downloads",
|
"ComponentsWindowWidth": 929,
|
||||||
"Sapfor_FPath": "E:\\_sapfor_x64\\Components\\Sapfor_F",
|
"ComponentsWindowHeight": 300,
|
||||||
"Visualizer_2Path": "C:\\Users\\misha\\Documents",
|
|
||||||
"InstructionPath": "",
|
|
||||||
"PerformanceAnalyzerPath": "",
|
|
||||||
"LocalMakePathWindows": "C:\\MinGW\\msys\\1.0\\bin\\make.exe",
|
|
||||||
"Kernels": 8,
|
"Kernels": 8,
|
||||||
"ComponentsBackUpsCount": 10,
|
"LocalMakePathWindows": "C:\\MinGW\\msys\\1.0\\bin\\make.exe",
|
||||||
"AutoCheckTesting": true,
|
|
||||||
"CheckTestingIntervalSeconds": 10,
|
"CheckTestingIntervalSeconds": 10,
|
||||||
|
"AutoCheckTesting": true,
|
||||||
"EmailOnTestingProgress": false,
|
"EmailOnTestingProgress": false,
|
||||||
"eraseTestingWorkspaces": true,
|
|
||||||
"lastMachineId": 13,
|
"lastMachineId": 13,
|
||||||
"lastUserId": 34,
|
"lastUserId": 34,
|
||||||
"lastCompilerId": 52,
|
"lastCompilerId": 52,
|
||||||
@@ -58,5 +38,15 @@
|
|||||||
"SmallScreen": false,
|
"SmallScreen": false,
|
||||||
"BugReportsAgeLimit": 2,
|
"BugReportsAgeLimit": 2,
|
||||||
"FastAccessPassesCount": 10,
|
"FastAccessPassesCount": 10,
|
||||||
"LastOpenedProjectsCount": 10
|
"LastOpenedProjectsCount": 10,
|
||||||
|
"Mode": "Normal",
|
||||||
|
"ServerAddress": "alex-freenas.ddns.net",
|
||||||
|
"ServerUserName": "testuser",
|
||||||
|
"ServerUserSHHPort": 2000,
|
||||||
|
"ComponentsServerPort": 7995,
|
||||||
|
"TestingServerPort": 7998,
|
||||||
|
"SocketTimeout": 5000,
|
||||||
|
"SMTPHost": "smtp.mail.ru",
|
||||||
|
"SMTPPort": 465,
|
||||||
|
"MailSocketPort": 465
|
||||||
}
|
}
|
||||||
24
src/_VisualDVM/ComponentsServerProperties.java
Normal file
24
src/_VisualDVM/ComponentsServerProperties.java
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
package _VisualDVM;
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
public class ComponentsServerProperties extends VisualDVMProperties{
|
||||||
|
//---
|
||||||
|
@Expose
|
||||||
|
public boolean EmailAdminsOnStart = false;
|
||||||
|
@Expose
|
||||||
|
public String BackupWorkspace = "_sapfor_x64_backups";
|
||||||
|
@Expose
|
||||||
|
public int BackupHour = 5;
|
||||||
|
@Expose
|
||||||
|
public int BackupMinute = 0;
|
||||||
|
@Expose
|
||||||
|
public int ComponentsBackUpsCount = 10;
|
||||||
|
//---
|
||||||
|
public ComponentsServerProperties(){
|
||||||
|
Mode = _VisualDVM.Mode.Server;
|
||||||
|
}
|
||||||
|
public ComponentsServerProperties(File file_in){
|
||||||
|
super(_VisualDVM.Mode.Server, file_in);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package _VisualDVM;
|
package _VisualDVM;
|
||||||
|
import Common.Properties;
|
||||||
import Common.Utils.Loggable;
|
import Common.Utils.Loggable;
|
||||||
import Common.Utils.Utils_;
|
import Common.Utils.Utils_;
|
||||||
import Common.Visual.UI;
|
import Common.Visual.UI;
|
||||||
import _VisualDVM.Passes.PassCode;
|
import _VisualDVM.Passes.PassCode;
|
||||||
import _VisualDVM.ProjectData.ProjectView;
|
import _VisualDVM.ProjectData.ProjectView;
|
||||||
import _VisualDVM.Repository.Component.ComponentType;
|
|
||||||
import _VisualDVM.Repository.Component.ComponentsSet;
|
import _VisualDVM.Repository.Component.ComponentsSet;
|
||||||
import _VisualDVM.Repository.Component.PerformanceAnalyzer.PerformanceAnalyzer;
|
import _VisualDVM.Repository.Component.PerformanceAnalyzer.PerformanceAnalyzer;
|
||||||
import _VisualDVM.Repository.Component.Sapfor.MessagesServer;
|
import _VisualDVM.Repository.Component.Sapfor.MessagesServer;
|
||||||
@@ -18,14 +18,16 @@ import org.fife.ui.rsyntaxtextarea.TokenMakerFactory;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.Vector;
|
|
||||||
public class Global {
|
public class Global {
|
||||||
//todo свести большинство к содержимому mainModule, сделать различные типы properties, переместить туда глобальный журнал (?)
|
//todo свести большинство к содержимому mainModule, сделать различные типы properties, переместить туда глобальный журнал (?)
|
||||||
public static MainModule mainModule = null;
|
public static MainModule mainModule = null;
|
||||||
//Режим
|
//Режим
|
||||||
public static Mode mode = Mode.Undefined;
|
public static Mode mode = Mode.Undefined;
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
public static GlobalProperties properties = null;
|
public static VisualDVMProperties properties= null;
|
||||||
|
public static NormalProperties normalProperties = null;
|
||||||
|
public static ComponentsServerProperties componentsServerProperties = null;
|
||||||
|
public static TestingServerProperties testingServerProperties = null;
|
||||||
//---
|
//---
|
||||||
public static boolean files_multiselection = false;
|
public static boolean files_multiselection = false;
|
||||||
public static boolean versions_multiselection = false;
|
public static boolean versions_multiselection = false;
|
||||||
@@ -53,7 +55,6 @@ public class Global {
|
|||||||
public static ComponentsServer componentsServer = new ComponentsServer();
|
public static ComponentsServer componentsServer = new ComponentsServer();
|
||||||
public static TestingServer testingServer = new TestingServer();
|
public static TestingServer testingServer = new TestingServer();
|
||||||
public static PerformanceAnalyzer performanceAnalyzer = null;
|
public static PerformanceAnalyzer performanceAnalyzer = null;
|
||||||
|
|
||||||
public static void CheckVisualiserDirectories() {
|
public static void CheckVisualiserDirectories() {
|
||||||
Utils_.CheckDirectory(ComponentsDirectory = new File(Utils_.getHomeDirectory(), Constants.ComponentsDirectoryName));
|
Utils_.CheckDirectory(ComponentsDirectory = new File(Utils_.getHomeDirectory(), Constants.ComponentsDirectoryName));
|
||||||
Utils_.CheckAndCleanDirectory(TempDirectory = new File(Utils_.getHomeDirectory(), Constants.TempDirectoryName));
|
Utils_.CheckAndCleanDirectory(TempDirectory = new File(Utils_.getHomeDirectory(), Constants.TempDirectoryName));
|
||||||
@@ -144,21 +145,6 @@ public class Global {
|
|||||||
}
|
}
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
public static String packSapforSettings() {
|
|
||||||
Vector<String> res_ = new Vector<>();
|
|
||||||
Vector<SettingName> forbidden = new Vector<>();
|
|
||||||
forbidden.add(SettingName.GCOVLimit);
|
|
||||||
forbidden.add(SettingName.Precompilation);
|
|
||||||
forbidden.add(SettingName.DVMConvertationOptions);
|
|
||||||
forbidden.add(SettingName.SaveModifications);
|
|
||||||
for (DBSetting setting : mainModule.getDb().settings.getSettingsByOwner(ComponentType.SapforOptions)) {
|
|
||||||
if (!forbidden.contains(setting.Name))
|
|
||||||
res_.add(setting.Value);
|
|
||||||
}
|
|
||||||
return String.join("|", res_);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
//--
|
//--
|
||||||
public static void NormalMode(int port) throws Exception {
|
public static void NormalMode(int port) throws Exception {
|
||||||
//-------------------------------->>
|
//-------------------------------->>
|
||||||
@@ -183,7 +169,7 @@ public class Global {
|
|||||||
components = new ComponentsSet();
|
components = new ComponentsSet();
|
||||||
components.initialVersionsCheck();
|
components.initialVersionsCheck();
|
||||||
//-------->>
|
//-------->>
|
||||||
if (properties.AutoUpdateSearch)
|
if (normalProperties.AutoUpdateSearch)
|
||||||
Global.mainModule.getPass(PassCode.GetComponentsActualVersions).Do();
|
Global.mainModule.getPass(PassCode.GetComponentsActualVersions).Do();
|
||||||
components.validateStates();
|
components.validateStates();
|
||||||
if (components.needChanges()) {
|
if (components.needChanges()) {
|
||||||
@@ -223,9 +209,9 @@ public class Global {
|
|||||||
componentsServer.ActivateDB();
|
componentsServer.ActivateDB();
|
||||||
testingServer.ActivateDB();
|
testingServer.ActivateDB();
|
||||||
//-- чисто чтобы создать таблицы. соединения на стороне клиента не предвидится.
|
//-- чисто чтобы создать таблицы. соединения на стороне клиента не предвидится.
|
||||||
if (Global.properties.AutoBugReportsLoad)
|
if (normalProperties.AutoBugReportsLoad)
|
||||||
Global.mainModule.getPass(PassCode.SynchronizeBugReports).Do();
|
Global.mainModule.getPass(PassCode.SynchronizeBugReports).Do();
|
||||||
if (Global.properties.AutoTestsLoad)
|
if (normalProperties.AutoTestsLoad)
|
||||||
Global.mainModule.getPass(PassCode.SynchronizeTests).Do();
|
Global.mainModule.getPass(PassCode.SynchronizeTests).Do();
|
||||||
//--
|
//--
|
||||||
Global.mainModule.getSapfor().refreshPid(); //без сапфора сюда это все равно не дойдет.
|
Global.mainModule.getSapfor().refreshPid(); //без сапфора сюда это все равно не дойдет.
|
||||||
@@ -260,17 +246,41 @@ public class Global {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//---
|
//---
|
||||||
|
public static void SynchronizeProperties() throws Exception {
|
||||||
|
File propertiesFile = new File(System.getProperty("user.dir"), "properties");
|
||||||
|
if (!propertiesFile.exists()) {
|
||||||
|
mode = Mode.Normal;
|
||||||
|
properties=normalProperties = Utils_.SynschronizeProperties(propertiesFile, NormalProperties.class);
|
||||||
|
} else {
|
||||||
|
properties = Utils_.jsonFromFile(propertiesFile, VisualDVMProperties.class);
|
||||||
|
mode = properties.Mode;
|
||||||
|
//--->>
|
||||||
|
switch (mode){
|
||||||
|
case Normal:
|
||||||
|
normalProperties = Utils_.SynschronizeProperties(propertiesFile, NormalProperties.class);
|
||||||
|
break;
|
||||||
|
case Server:
|
||||||
|
componentsServerProperties = Utils_.SynschronizeProperties(propertiesFile, ComponentsServerProperties.class);
|
||||||
|
break;
|
||||||
|
case Testing:
|
||||||
|
testingServerProperties = Utils_.SynschronizeProperties(propertiesFile, TestingServerProperties.class);
|
||||||
|
break;
|
||||||
|
case MachineQueue:
|
||||||
|
case Package:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//---
|
||||||
public static void Init(String... args) {
|
public static void Init(String... args) {
|
||||||
System.out.println("VisualSapfor.jar started..");
|
System.out.println("VisualSapfor.jar started..");
|
||||||
System.out.println("home directory is" + Utils_.Brackets(Utils_.getHomePath()));
|
System.out.println("home directory is" + Utils_.Brackets(Utils_.getHomePath()));
|
||||||
//--->
|
//--->
|
||||||
properties=Utils_.SynschronizeProperties(
|
|
||||||
Paths.get(System.getProperty("user.dir"), "properties").toFile(),
|
|
||||||
GlobalProperties.class);
|
|
||||||
//--->
|
|
||||||
mode = properties.Mode;
|
|
||||||
System.out.println("mode is " + mode);
|
|
||||||
try {
|
try {
|
||||||
|
SynchronizeProperties();
|
||||||
|
System.out.println("mode is " + mode);
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case Normal:
|
case Normal:
|
||||||
NormalMode(Integer.parseInt(args[1]));
|
NormalMode(Integer.parseInt(args[1]));
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import _VisualDVM.Passes.PassCode;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Vector;
|
|
||||||
public class GlobalDatabase extends VisualiserDatabase {
|
public class GlobalDatabase extends VisualiserDatabase {
|
||||||
//---------СЕАНС----------------------------------------------
|
//---------СЕАНС----------------------------------------------
|
||||||
public MachinesDBTable machines;
|
public MachinesDBTable machines;
|
||||||
@@ -89,19 +88,19 @@ public class GlobalDatabase extends VisualiserDatabase {
|
|||||||
}
|
}
|
||||||
//todo централизованное сохранение текущих объектов в базах
|
//todo централизованное сохранение текущих объектов в базах
|
||||||
public void SaveCredentials() {
|
public void SaveCredentials() {
|
||||||
Global.properties.updateField("lastMachineId", getTable(Machine.class).getUI().getCurrentPK(CommonConstants.Nan));
|
Global.normalProperties.updateField("lastMachineId", getTable(Machine.class).getUI().getCurrentPK(CommonConstants.Nan));
|
||||||
Global.properties.updateField("lastUserId", getTable(User.class).getUI().getCurrentPK(CommonConstants.Nan));
|
Global.normalProperties.updateField("lastUserId", getTable(User.class).getUI().getCurrentPK(CommonConstants.Nan));
|
||||||
Global.properties.updateField("lastCompilerId", getTable(Compiler.class).getUI().getCurrentPK(CommonConstants.Nan));
|
Global.normalProperties.updateField("lastCompilerId", getTable(Compiler.class).getUI().getCurrentPK(CommonConstants.Nan));
|
||||||
}
|
}
|
||||||
public void RestoreCredentials() {
|
public void RestoreCredentials() {
|
||||||
if (Global.properties.lastMachineId != CommonConstants.Nan) {
|
if (Global.normalProperties.lastMachineId != CommonConstants.Nan) {
|
||||||
getTable(Machine.class).getUI().SetCurrentByPK(Global.properties.lastMachineId);
|
getTable(Machine.class).getUI().SetCurrentByPK(Global.normalProperties.lastMachineId);
|
||||||
//-
|
//-
|
||||||
if (Global.properties.lastUserId != CommonConstants.Nan)
|
if (Global.normalProperties.lastUserId != CommonConstants.Nan)
|
||||||
getTable(User.class).getUI().SetCurrentByPK(Global.properties.lastUserId);
|
getTable(User.class).getUI().SetCurrentByPK(Global.normalProperties.lastUserId);
|
||||||
//--
|
//--
|
||||||
if (Global.properties.lastCompilerId != CommonConstants.Nan)
|
if (Global.normalProperties.lastCompilerId != CommonConstants.Nan)
|
||||||
getTable(Compiler.class).getUI().SetCurrentByPK(Global.properties.lastCompilerId);
|
getTable(Compiler.class).getUI().SetCurrentByPK(Global.normalProperties.lastCompilerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//--
|
//--
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class WindowsLocalCompilationSupervisor extends WindowsLocalTaskSuperviso
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected String getScriptText() {
|
protected String getScriptText() {
|
||||||
return Utils_.DQuotes(Global.properties.LocalMakePathWindows) + " 1>out.txt 2>err.txt";
|
return Utils_.DQuotes(Global.normalProperties.LocalMakePathWindows) + " 1>out.txt 2>err.txt";
|
||||||
}
|
}
|
||||||
//скорее всего как то выделить подготовку к компиляции как метод предка.
|
//скорее всего как то выделить подготовку к компиляции как метод предка.
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -6,51 +6,38 @@ import com.google.gson.annotations.Expose;
|
|||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
public class GlobalProperties extends Properties {
|
public class GlobalProperties extends VisualDVMProperties {
|
||||||
@Expose
|
//---
|
||||||
public _VisualDVM.Mode Mode = _VisualDVM.Mode.Normal; //todo унаследовать от предка.
|
|
||||||
@Expose
|
|
||||||
public String ServerAddress = "alex-freenas.ddns.net";
|
|
||||||
@Expose
|
|
||||||
public String ServerUserName = "testuser";
|
|
||||||
@Expose
|
|
||||||
public int ServerUserSHHPort = 23;
|
|
||||||
@Expose
|
|
||||||
public int ComponentsServerPort = 7995;
|
|
||||||
@Expose
|
|
||||||
public int TestingServerPort = 7998;
|
|
||||||
@Expose
|
|
||||||
public int SocketTimeout = 5000;
|
|
||||||
@Expose
|
|
||||||
public boolean OldServer = false;
|
|
||||||
@Expose
|
|
||||||
public String SMTPHost = "smtp.mail.ru";
|
|
||||||
@Expose
|
|
||||||
public int SMTPPort = 465;
|
|
||||||
@Expose
|
|
||||||
public int MailSocketPort = 465;
|
|
||||||
@Expose
|
|
||||||
public boolean collapseCredentials = false;
|
|
||||||
@Expose
|
|
||||||
public boolean collapseFileGraphs = false;
|
|
||||||
@Expose
|
|
||||||
public boolean collapseFileMessages = false;
|
|
||||||
@Expose
|
|
||||||
public boolean collapseProjectTrees = false;
|
|
||||||
@Expose
|
|
||||||
public String BackupWorkspace = "_sapfor_x64_backups";
|
|
||||||
@Expose
|
@Expose
|
||||||
public String Workspace ="";
|
public String Workspace ="";
|
||||||
@Expose
|
@Expose
|
||||||
public String ProjectsSearchDirectory="";
|
public String ProjectsSearchDirectory="";
|
||||||
@Expose
|
@Expose
|
||||||
public int EditorFontSize=14;
|
public String VisualiserPath = "";
|
||||||
|
@Expose
|
||||||
|
public String Sapfor_FPath = "";
|
||||||
|
@Expose
|
||||||
|
public String Visualizer_2Path = "";
|
||||||
|
@Expose
|
||||||
|
public String InstructionPath = "";
|
||||||
|
@Expose
|
||||||
|
public String PerformanceAnalyzerPath = "";
|
||||||
|
//TESTING SERVER
|
||||||
|
@Expose
|
||||||
|
public boolean eraseTestingWorkspaces = true; //удалять ли рабочее пространство пакетов тестирования после его завершения
|
||||||
|
//COMPONENTS SERVER
|
||||||
|
@Expose
|
||||||
|
public boolean EmailAdminsOnStart = false;
|
||||||
|
@Expose
|
||||||
|
public String BackupWorkspace = "_sapfor_x64_backups";
|
||||||
@Expose
|
@Expose
|
||||||
public int BackupHour = 5;
|
public int BackupHour = 5;
|
||||||
@Expose
|
@Expose
|
||||||
public int BackupMinute = 0;
|
public int BackupMinute = 0;
|
||||||
@Expose
|
@Expose
|
||||||
public boolean EmailAdminsOnStart = false;
|
public int ComponentsBackUpsCount = 10;
|
||||||
|
//NORMAL MODE
|
||||||
|
//--
|
||||||
@Expose
|
@Expose
|
||||||
public boolean AutoUpdateSearch = true;
|
public boolean AutoUpdateSearch = true;
|
||||||
@Expose
|
@Expose
|
||||||
@@ -63,40 +50,35 @@ public class GlobalProperties extends Properties {
|
|||||||
public boolean ShowPassesDone = true;
|
public boolean ShowPassesDone = true;
|
||||||
@Expose
|
@Expose
|
||||||
public boolean FocusPassesResult = true;
|
public boolean FocusPassesResult = true;
|
||||||
|
//--
|
||||||
@Expose
|
@Expose
|
||||||
public String ProjectDBName = "new_project_base.sqlite";
|
public boolean collapseCredentials = false;
|
||||||
@Expose
|
@Expose
|
||||||
public String BugReportsDBName = "bug_reports.sqlite";
|
public boolean collapseFileGraphs = false;
|
||||||
@Expose
|
@Expose
|
||||||
public String TestsDBName = "tests.sqlite";
|
public boolean collapseFileMessages = false;
|
||||||
|
@Expose
|
||||||
|
public boolean collapseProjectTrees = false;
|
||||||
|
//--
|
||||||
|
@Expose
|
||||||
|
public int EditorFontSize=14;
|
||||||
@Expose
|
@Expose
|
||||||
public int ComponentsWindowWidth = 650;
|
public int ComponentsWindowWidth = 650;
|
||||||
@Expose
|
@Expose
|
||||||
public int ComponentsWindowHeight = 250;
|
public int ComponentsWindowHeight = 250;
|
||||||
@Expose
|
//--
|
||||||
public String VisualiserPath = "";
|
|
||||||
@Expose
|
|
||||||
public String Sapfor_FPath = "";
|
|
||||||
@Expose
|
|
||||||
public String Visualizer_2Path = "";
|
|
||||||
@Expose
|
|
||||||
public String InstructionPath = "";
|
|
||||||
@Expose
|
|
||||||
public String PerformanceAnalyzerPath = "";
|
|
||||||
@Expose
|
|
||||||
public String LocalMakePathWindows= "C:\\MinGW\\msys\\1.0\\bin\\make.exe";
|
|
||||||
@Expose
|
@Expose
|
||||||
public int Kernels= Utils.getHalfKernels();
|
public int Kernels= Utils.getHalfKernels();
|
||||||
@Expose
|
@Expose
|
||||||
public int ComponentsBackUpsCount = 10;
|
public String LocalMakePathWindows= "C:\\MinGW\\msys\\1.0\\bin\\make.exe";
|
||||||
@Expose
|
//--
|
||||||
public boolean AutoCheckTesting = false; // проверять ли задачи тестирования при включенном визуализаторе.
|
|
||||||
@Expose
|
@Expose
|
||||||
public int CheckTestingIntervalSeconds = 10; //интервал автопроверки тестирования
|
public int CheckTestingIntervalSeconds = 10; //интервал автопроверки тестирования
|
||||||
@Expose
|
@Expose
|
||||||
public boolean EmailOnTestingProgress = false; //включено ли оповещение по email о результатах тестирования.
|
public boolean AutoCheckTesting = false; // проверять ли задачи тестирования при включенном визуализаторе.
|
||||||
@Expose
|
@Expose
|
||||||
public boolean eraseTestingWorkspaces = true; //удалять ли рабочее пространство пакетов тестирования после его завершения
|
public boolean EmailOnTestingProgress = false; //включено ли оповещение по email о результатах тестирования.
|
||||||
|
//--
|
||||||
@Expose
|
@Expose
|
||||||
public int lastMachineId = CommonConstants.Nan;
|
public int lastMachineId = CommonConstants.Nan;
|
||||||
@Expose
|
@Expose
|
||||||
@@ -117,7 +99,7 @@ public class GlobalProperties extends Properties {
|
|||||||
@Expose
|
@Expose
|
||||||
public boolean ComparsionDiffMergeOn = false;
|
public boolean ComparsionDiffMergeOn = false;
|
||||||
//--
|
//--
|
||||||
//компактность
|
//компактность------
|
||||||
@Expose
|
@Expose
|
||||||
public boolean ShowFullArraysDeclarations =false;
|
public boolean ShowFullArraysDeclarations =false;
|
||||||
@Expose
|
@Expose
|
||||||
@@ -130,19 +112,9 @@ public class GlobalProperties extends Properties {
|
|||||||
public int FastAccessPassesCount=10;
|
public int FastAccessPassesCount=10;
|
||||||
@Expose
|
@Expose
|
||||||
public int LastOpenedProjectsCount=10;
|
public int LastOpenedProjectsCount=10;
|
||||||
|
///-----------
|
||||||
public GlobalProperties(GlobalProperties p) {
|
public GlobalProperties(GlobalProperties p) {
|
||||||
super();
|
super(p);
|
||||||
Mode = p.Mode;
|
|
||||||
ServerAddress = p.ServerAddress;
|
|
||||||
ServerUserName = p.ServerUserName;
|
|
||||||
ServerUserSHHPort = p.ServerUserSHHPort;
|
|
||||||
ComponentsServerPort = p.ComponentsServerPort;
|
|
||||||
TestingServerPort = p.TestingServerPort;
|
|
||||||
SocketTimeout = p.SocketTimeout;
|
|
||||||
OldServer = p.OldServer;
|
|
||||||
SMTPHost = p.SMTPHost;
|
|
||||||
SMTPPort = p.SMTPPort;
|
|
||||||
MailSocketPort = p.MailSocketPort;
|
|
||||||
collapseCredentials = p.collapseCredentials;
|
collapseCredentials = p.collapseCredentials;
|
||||||
collapseFileGraphs = p.collapseFileGraphs;
|
collapseFileGraphs = p.collapseFileGraphs;
|
||||||
collapseFileMessages = p.collapseFileMessages;
|
collapseFileMessages = p.collapseFileMessages;
|
||||||
@@ -155,9 +127,6 @@ public class GlobalProperties extends Properties {
|
|||||||
ConfirmPassesStart = p.ConfirmPassesStart;
|
ConfirmPassesStart = p.ConfirmPassesStart;
|
||||||
ShowPassesDone = p.ShowPassesDone;
|
ShowPassesDone = p.ShowPassesDone;
|
||||||
FocusPassesResult = p.FocusPassesResult;
|
FocusPassesResult = p.FocusPassesResult;
|
||||||
ProjectDBName = p.ProjectDBName;
|
|
||||||
BugReportsDBName = p.BugReportsDBName;
|
|
||||||
TestsDBName = p.TestsDBName;
|
|
||||||
ComponentsWindowWidth = p.ComponentsWindowWidth;
|
ComponentsWindowWidth = p.ComponentsWindowWidth;
|
||||||
ComponentsWindowHeight = p.ComponentsWindowHeight;
|
ComponentsWindowHeight = p.ComponentsWindowHeight;
|
||||||
VisualiserPath = p.VisualiserPath;
|
VisualiserPath = p.VisualiserPath;
|
||||||
@@ -194,10 +163,10 @@ public class GlobalProperties extends Properties {
|
|||||||
}
|
}
|
||||||
//--
|
//--
|
||||||
public GlobalProperties(File file_in) {
|
public GlobalProperties(File file_in) {
|
||||||
super(file_in);
|
super(_VisualDVM.Mode.Normal, file_in);
|
||||||
}
|
}
|
||||||
public GlobalProperties(){
|
public GlobalProperties(){
|
||||||
|
Mode= _VisualDVM.Mode.Normal;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public String getFieldDescription(String fieldName) {
|
public String getFieldDescription(String fieldName) {
|
||||||
|
|||||||
@@ -156,18 +156,18 @@ public class MainModule extends MainModule_<GlobalDatabase, MainUI> {
|
|||||||
//--
|
//--
|
||||||
@Override
|
@Override
|
||||||
public int getFirstAccessPassesCount() {
|
public int getFirstAccessPassesCount() {
|
||||||
return Global.properties.FastAccessPassesCount;
|
return Global.normalProperties.FastAccessPassesCount;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public boolean confirmPassesStart() {
|
public boolean confirmPassesStart() {
|
||||||
return Global.properties.ConfirmPassesStart;
|
return Global.normalProperties.ConfirmPassesStart;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public boolean confirmPassesDone() {
|
public boolean confirmPassesDone() {
|
||||||
return Global.properties.ShowPassesDone;
|
return Global.normalProperties.ShowPassesDone;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public boolean focusPassesResult() {
|
public boolean focusPassesResult() {
|
||||||
return Global.properties.FocusPassesResult;
|
return Global.normalProperties.FocusPassesResult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
103
src/_VisualDVM/NormalProperties.java
Normal file
103
src/_VisualDVM/NormalProperties.java
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
package _VisualDVM;
|
||||||
|
import Common.CommonConstants;
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
public class NormalProperties extends VisualDVMProperties{
|
||||||
|
//---
|
||||||
|
@Expose
|
||||||
|
public String Workspace ="";
|
||||||
|
@Expose
|
||||||
|
public String ProjectsSearchDirectory="";
|
||||||
|
@Expose
|
||||||
|
public String VisualiserPath = "";
|
||||||
|
@Expose
|
||||||
|
public String Sapfor_FPath = "";
|
||||||
|
@Expose
|
||||||
|
public String Visualizer_2Path = "";
|
||||||
|
@Expose
|
||||||
|
public String InstructionPath = "";
|
||||||
|
@Expose
|
||||||
|
public String PerformanceAnalyzerPath = "";
|
||||||
|
//---
|
||||||
|
@Expose
|
||||||
|
public boolean AutoUpdateSearch = true;
|
||||||
|
@Expose
|
||||||
|
public boolean AutoBugReportsLoad = true;
|
||||||
|
@Expose
|
||||||
|
public boolean AutoTestsLoad = true;
|
||||||
|
@Expose
|
||||||
|
public boolean ConfirmPassesStart = true;
|
||||||
|
@Expose
|
||||||
|
public boolean ShowPassesDone = true;
|
||||||
|
@Expose
|
||||||
|
public boolean FocusPassesResult = true;
|
||||||
|
//--
|
||||||
|
@Expose
|
||||||
|
public boolean collapseCredentials = false;
|
||||||
|
@Expose
|
||||||
|
public boolean collapseFileGraphs = false;
|
||||||
|
@Expose
|
||||||
|
public boolean collapseFileMessages = false;
|
||||||
|
@Expose
|
||||||
|
public boolean collapseProjectTrees = false;
|
||||||
|
//--
|
||||||
|
@Expose
|
||||||
|
public int EditorFontSize=14;
|
||||||
|
@Expose
|
||||||
|
public int ComponentsWindowWidth = 650;
|
||||||
|
@Expose
|
||||||
|
public int ComponentsWindowHeight = 250;
|
||||||
|
//--
|
||||||
|
@Expose
|
||||||
|
public int Kernels= Utils.getHalfKernels();
|
||||||
|
@Expose
|
||||||
|
public String LocalMakePathWindows= "C:\\MinGW\\msys\\1.0\\bin\\make.exe";
|
||||||
|
//--
|
||||||
|
@Expose
|
||||||
|
public int CheckTestingIntervalSeconds = 10; //интервал автопроверки тестирования
|
||||||
|
@Expose
|
||||||
|
public boolean AutoCheckTesting = false; // проверять ли задачи тестирования при включенном визуализаторе.
|
||||||
|
@Expose
|
||||||
|
public boolean EmailOnTestingProgress = false; //включено ли оповещение по email о результатах тестирования.
|
||||||
|
//--
|
||||||
|
@Expose
|
||||||
|
public int lastMachineId = CommonConstants.Nan;
|
||||||
|
@Expose
|
||||||
|
public int lastUserId = CommonConstants.Nan;
|
||||||
|
@Expose
|
||||||
|
public int lastCompilerId = CommonConstants.Nan;
|
||||||
|
//-- сравнение
|
||||||
|
@Expose
|
||||||
|
public boolean RegisterOn = false;
|
||||||
|
@Expose
|
||||||
|
public boolean SpacesOn = false;
|
||||||
|
@Expose
|
||||||
|
public boolean EmptyLinesOn = false;
|
||||||
|
@Expose
|
||||||
|
public boolean FortranWrapsOn = false;
|
||||||
|
@Expose
|
||||||
|
public boolean ExtensionsOn = false;
|
||||||
|
@Expose
|
||||||
|
public boolean ComparsionDiffMergeOn = false;
|
||||||
|
//компактность--
|
||||||
|
@Expose
|
||||||
|
public boolean ShowFullArraysDeclarations =false;
|
||||||
|
@Expose
|
||||||
|
public boolean ShowFullTabsNames=true;
|
||||||
|
@Expose
|
||||||
|
public boolean SmallScreen = false;
|
||||||
|
@Expose
|
||||||
|
public int BugReportsAgeLimit = 2;
|
||||||
|
@Expose
|
||||||
|
public int FastAccessPassesCount=10;
|
||||||
|
@Expose
|
||||||
|
public int LastOpenedProjectsCount=10;
|
||||||
|
//--
|
||||||
|
public NormalProperties(){
|
||||||
|
Mode = _VisualDVM.Mode.Normal;
|
||||||
|
}
|
||||||
|
public NormalProperties(File file_in){
|
||||||
|
super(_VisualDVM.Mode.Normal, file_in);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -26,7 +26,7 @@ public class ArchivesBackupPass extends ConnectionPass<File> {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void ServerAction() throws Exception {
|
protected void ServerAction() throws Exception {
|
||||||
String workspace_path = Utils_.toU(Paths.get(user.connection.sftpChannel.getHome(), Global.properties.BackupWorkspace).toString());
|
String workspace_path = Utils_.toU(Paths.get(user.connection.sftpChannel.getHome(), Global.componentsServerProperties.BackupWorkspace).toString());
|
||||||
RemoteFile workspace = new RemoteFile(workspace_path, true);
|
RemoteFile workspace = new RemoteFile(workspace_path, true);
|
||||||
user.connection.MKDIR(workspace);
|
user.connection.MKDIR(workspace);
|
||||||
RemoteFile dst = new RemoteFile(workspace.full_name, src.getName());
|
RemoteFile dst = new RemoteFile(workspace.full_name, src.getName());
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class DeleteDownloadedBugReports extends Pass<DirInfosDataSet> {
|
|||||||
target = (DirInfosDataSet) Global.mainModule.getPass(PassCode.GetOldBugReports).target;
|
target = (DirInfosDataSet) Global.mainModule.getPass(PassCode.GetOldBugReports).target;
|
||||||
if (target.Data.isEmpty()) {
|
if (target.Data.isEmpty()) {
|
||||||
Log.Writeln_("Не найдено отчетов, не использовавшихся " +
|
Log.Writeln_("Не найдено отчетов, не использовавшихся " +
|
||||||
Global.properties.BugReportsAgeLimit +
|
Global.normalProperties.BugReportsAgeLimit +
|
||||||
" месяцев и более!");
|
" месяцев и более!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -45,7 +45,7 @@ public class DeleteDownloadedBugReports extends Pass<DirInfosDataSet> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (dialog.ShowDialog("Найдено " + target.size() + " отчетов, не использовавшихся " +
|
if (dialog.ShowDialog("Найдено " + target.size() + " отчетов, не использовавшихся " +
|
||||||
Global.properties.BugReportsAgeLimit +
|
Global.normalProperties.BugReportsAgeLimit +
|
||||||
" месяцев и более. Удалить?")) {
|
" месяцев и более. Удалить?")) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class GetOldBugReports extends Pass<DirInfosDataSet> {
|
|||||||
//---
|
//---
|
||||||
Calendar c = new GregorianCalendar();
|
Calendar c = new GregorianCalendar();
|
||||||
c.setTimeInMillis(System.currentTimeMillis());
|
c.setTimeInMillis(System.currentTimeMillis());
|
||||||
c.add(Calendar.MONTH, -Global.properties.BugReportsAgeLimit);
|
c.add(Calendar.MONTH, -Global.normalProperties.BugReportsAgeLimit);
|
||||||
Date date = c.getTime();
|
Date date = c.getTime();
|
||||||
System.out.println(date);
|
System.out.println(date);
|
||||||
long border = date.getTime();
|
long border = date.getTime();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package _VisualDVM.Passes.All;
|
package _VisualDVM.Passes.All;
|
||||||
import Common.Visual.Windows.Dialog.VFileChooser;
|
import Common.Visual.Windows.Dialog.VFileChooser;
|
||||||
import _VisualDVM.Global;
|
import _VisualDVM.Global;
|
||||||
import _VisualDVM.GlobalProperties;
|
import _VisualDVM.NormalProperties;
|
||||||
import _VisualDVM.Passes.CurrentComponentPass;
|
import _VisualDVM.Passes.CurrentComponentPass;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -22,15 +22,15 @@ public class InstallComponentFromFolder extends CurrentComponentPass {
|
|||||||
if (super.canStart(args)) {
|
if (super.canStart(args)) {
|
||||||
VFileChooser fileChooser = target.getFileChooser();
|
VFileChooser fileChooser = target.getFileChooser();
|
||||||
String propertyName = target.getComponentType() + "Path";
|
String propertyName = target.getComponentType() + "Path";
|
||||||
String lastDirectory = (String) GlobalProperties.class.getField(propertyName).get(Global.properties);
|
String lastDirectory = (String) NormalProperties.class.getField(propertyName).get(Global.normalProperties);
|
||||||
if (!lastDirectory.isEmpty()) {
|
if (!lastDirectory.isEmpty()) {
|
||||||
//настройка выставлена не впервые, устанавливаем ее как папку
|
//настройка выставлена не впервые, устанавливаем ее как папку
|
||||||
fileChooser.SetCurrentDirectory(lastDirectory);
|
fileChooser.SetCurrentDirectory(lastDirectory);
|
||||||
}
|
}
|
||||||
boolean res = (file = fileChooser.ShowDialog()) != null;
|
boolean res = (file = fileChooser.ShowDialog()) != null;
|
||||||
File newDirectory = fileChooser.getCurrentDirectory();
|
File newDirectory = fileChooser.getCurrentDirectory();
|
||||||
GlobalProperties.class.getField(propertyName).set(Global.properties, newDirectory.getAbsolutePath());
|
NormalProperties.class.getField(propertyName).set(Global.normalProperties, newDirectory.getAbsolutePath());
|
||||||
Global.properties.Update();
|
Global.normalProperties.Update();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ public class Precompilation extends Pass<db_project_info> {
|
|||||||
target = Global.mainModule.getProject();
|
target = Global.mainModule.getProject();
|
||||||
if (Utils_.isWindows()) {
|
if (Utils_.isWindows()) {
|
||||||
//--
|
//--
|
||||||
makepath = Global.properties.LocalMakePathWindows;
|
makepath = Global.normalProperties.LocalMakePathWindows;
|
||||||
if (makepath.isEmpty()) {
|
if (makepath.isEmpty()) {
|
||||||
Log.Writeln_("Не задан путь к make.exe.\n " +
|
Log.Writeln_("Не задан путь к make.exe.\n " +
|
||||||
"Укажите его в меню глобальных настроек." +
|
"Укажите его в меню глобальных настроек." +
|
||||||
@@ -184,10 +184,10 @@ public class Precompilation extends Pass<db_project_info> {
|
|||||||
protected void body() throws Exception {
|
protected void body() throws Exception {
|
||||||
if (Utils_.isWindows()) {
|
if (Utils_.isWindows()) {
|
||||||
name_to_kill = "make.exe";
|
name_to_kill = "make.exe";
|
||||||
StartProcess(Utils_.DQuotes(Global.properties.LocalMakePathWindows) + " -j " + Global.properties.Kernels,
|
StartProcess(Utils_.DQuotes(Global.normalProperties.LocalMakePathWindows) + " -j " + Global.normalProperties.Kernels,
|
||||||
target.compilation_maxtime);
|
target.compilation_maxtime);
|
||||||
} else
|
} else
|
||||||
StartProcess("make -j " + Global.properties.Kernels, target.compilation_maxtime);
|
StartProcess("make -j " + Global.normalProperties.Kernels, target.compilation_maxtime);
|
||||||
}
|
}
|
||||||
protected void StartProcess(String command, int TA) throws Exception {
|
protected void StartProcess(String command, int TA) throws Exception {
|
||||||
killed = false;
|
killed = false;
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class StartSelectedDVMConfigurations extends PublishServerObject<TestingS
|
|||||||
user,
|
user,
|
||||||
compiler,
|
compiler,
|
||||||
configurations,
|
configurations,
|
||||||
Global.properties.EmailOnTestingProgress ? 1 : 0
|
Global.normalProperties.EmailOnTestingProgress ? 1 : 0
|
||||||
);
|
);
|
||||||
//----
|
//----
|
||||||
if (target.tasksCount == 0) {
|
if (target.tasksCount == 0) {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class StartSelectedSAPFORConfigurations extends PublishServerObject<Testi
|
|||||||
target = new SapforPackage(Global.mainModule.getAccount(),
|
target = new SapforPackage(Global.mainModule.getAccount(),
|
||||||
Global.testingServer.db.serverSapfors.getUI().getCurrent(),
|
Global.testingServer.db.serverSapfors.getUI().getCurrent(),
|
||||||
configurations,
|
configurations,
|
||||||
Global.properties.EmailOnTestingProgress ? 1 : 0,
|
Global.normalProperties.EmailOnTestingProgress ? 1 : 0,
|
||||||
Log);
|
Log);
|
||||||
if (target.tasksCount == 0) {
|
if (target.tasksCount == 0) {
|
||||||
Log.Writeln_("Не сформировано ни одной новой задачи.");
|
Log.Writeln_("Не сформировано ни одной новой задачи.");
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import Common.Visual.Windows.Dialog.SpinnerNumberForm;
|
|||||||
import Common.Visual.Windows.Dialog.VDirectoryChooser;
|
import Common.Visual.Windows.Dialog.VDirectoryChooser;
|
||||||
import Common.Visual.Windows.Dialog.VFileChooser;
|
import Common.Visual.Windows.Dialog.VFileChooser;
|
||||||
import _VisualDVM.Global;
|
import _VisualDVM.Global;
|
||||||
import _VisualDVM.GlobalProperties;
|
import _VisualDVM.NormalProperties;
|
||||||
import _VisualDVM.Utils;
|
import _VisualDVM.Utils;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
@@ -20,9 +20,9 @@ public class UpdateProperty extends Pass<Object> {
|
|||||||
@Override
|
@Override
|
||||||
protected boolean canStart(Object... args) throws Exception {
|
protected boolean canStart(Object... args) throws Exception {
|
||||||
name = (String) args[0];
|
name = (String) args[0];
|
||||||
String description = Global.properties.getFieldDescription(name);
|
String description = Global.normalProperties.getFieldDescription(name);
|
||||||
field = GlobalProperties.class.getField(name);
|
field = NormalProperties.class.getField(name);
|
||||||
oldValue = field.get(Global.properties);
|
oldValue = field.get(Global.normalProperties);
|
||||||
newValue = null;
|
newValue = null;
|
||||||
SliderNumberForm sliderNumberForm = new SliderNumberForm();
|
SliderNumberForm sliderNumberForm = new SliderNumberForm();
|
||||||
VDirectoryChooser directoryChooser = new VDirectoryChooser("");
|
VDirectoryChooser directoryChooser = new VDirectoryChooser("");
|
||||||
@@ -69,7 +69,8 @@ public class UpdateProperty extends Pass<Object> {
|
|||||||
case "Workspace":
|
case "Workspace":
|
||||||
directoryChooser.setTitle(description);
|
directoryChooser.setTitle(description);
|
||||||
directoryChooser.SetCurrentDirectory(
|
directoryChooser.SetCurrentDirectory(
|
||||||
Global.properties.Workspace.isEmpty() ? Global.ProjectsDirectory : new File(Global.properties.Workspace));
|
Global.normalProperties.Workspace.isEmpty() ? Global.ProjectsDirectory :
|
||||||
|
new File(Global.normalProperties.Workspace));
|
||||||
File dir = directoryChooser.ShowDialog();
|
File dir = directoryChooser.ShowDialog();
|
||||||
if (dir != null)
|
if (dir != null)
|
||||||
newValue = dir.getAbsolutePath();
|
newValue = dir.getAbsolutePath();
|
||||||
@@ -82,8 +83,8 @@ public class UpdateProperty extends Pass<Object> {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void body() throws Exception {
|
protected void body() throws Exception {
|
||||||
field.set(Global.properties, newValue);
|
field.set(Global.normalProperties, newValue);
|
||||||
Global.properties.Update();
|
Global.normalProperties.Update();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void showDone() throws Exception {
|
protected void showDone() throws Exception {
|
||||||
@@ -128,8 +129,8 @@ public class UpdateProperty extends Pass<Object> {
|
|||||||
case "SmallScreen":
|
case "SmallScreen":
|
||||||
if (Global.mainModule.HasProject())
|
if (Global.mainModule.HasProject())
|
||||||
Global.mainModule.getUI().getMainWindow().getProjectWindow().SwitchScreen(
|
Global.mainModule.getUI().getMainWindow().getProjectWindow().SwitchScreen(
|
||||||
Global.properties.SmallScreen);
|
Global.normalProperties.SmallScreen);
|
||||||
Global.mainModule.getUI().getMainWindow().getCallbackWindow().SwitchScreen( Global.properties.SmallScreen);
|
Global.mainModule.getUI().getMainWindow().getCallbackWindow().SwitchScreen( Global.normalProperties.SmallScreen);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ public abstract class RepositoryServerSSHPass extends ConnectionPass {
|
|||||||
userHome = null;
|
userHome = null;
|
||||||
serverHome = null;
|
serverHome = null;
|
||||||
//--
|
//--
|
||||||
machine = new Machine("alex", Global.properties.ServerAddress, Global.properties.ServerUserSHHPort, MachineType.Server);
|
machine = new Machine("alex", Global.normalProperties.ServerAddress, Global.normalProperties.ServerUserSHHPort, MachineType.Server);
|
||||||
user = new User(Global.properties.ServerUserName, "mprit_2011");
|
user = new User(Global.normalProperties.ServerUserName, "mprit_2011");
|
||||||
super.Connect();
|
super.Connect();
|
||||||
//--
|
//--
|
||||||
userHome = new RemoteFile(user.connection.sftpChannel.getHome(), true);
|
userHome = new RemoteFile(user.connection.sftpChannel.getHome(), true);
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class SPFEditor extends BaseEditor implements SPFEditorInterface {
|
|||||||
highlighter = (RSyntaxTextAreaHighlighter) getHighlighter();
|
highlighter = (RSyntaxTextAreaHighlighter) getHighlighter();
|
||||||
autoComplete = new SapforAutoComplete(this);
|
autoComplete = new SapforAutoComplete(this);
|
||||||
//-------------------------
|
//-------------------------
|
||||||
float font_size = (float) Global.properties.EditorFontSize;
|
float font_size = (float) Global.normalProperties.EditorFontSize;
|
||||||
setFont(getFont().deriveFont(font_size));
|
setFont(getFont().deriveFont(font_size));
|
||||||
//-------------------------
|
//-------------------------
|
||||||
setText(Utils.ReadAllText(file.file).replace("\r", " "));
|
setText(Utils.ReadAllText(file.file).replace("\r", " "));
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ public class db_project_info extends DBObject {
|
|||||||
//-
|
//-
|
||||||
public static File get_db_file(File project_home) {
|
public static File get_db_file(File project_home) {
|
||||||
return new File(Paths.get(project_home.toString(), Constants.data,
|
return new File(Paths.get(project_home.toString(), Constants.data,
|
||||||
Global.properties.ProjectDBName).toString());
|
"new_project_base.sqlite").toString());
|
||||||
}
|
}
|
||||||
public static String recommendAnalysis(PassCode code_in) {
|
public static String recommendAnalysis(PassCode code_in) {
|
||||||
return Constants.unknown_metric + " примените анализатор \"" + code_in.getDescription() + "\"";
|
return Constants.unknown_metric + " примените анализатор \"" + code_in.getDescription() + "\"";
|
||||||
|
|||||||
@@ -52,15 +52,15 @@ public class ProjectArraysForm extends DataSetControlForm<ProjectArray> {
|
|||||||
@Override
|
@Override
|
||||||
public Class getRendererClass() {
|
public Class getRendererClass() {
|
||||||
//todo все настройки переделать в проперти(?)
|
//todo все настройки переделать в проперти(?)
|
||||||
return Global.properties.ShowFullArraysDeclarations ? RendererHyperlinks.class : RendererHiddenList.class;
|
return Global.normalProperties.ShowFullArraysDeclarations ? RendererHyperlinks.class : RendererHiddenList.class;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Class getEditorClass() {
|
public Class getEditorClass() {
|
||||||
return Global.properties.ShowFullArraysDeclarations ? EditorFilesHyperlinks.class : null;
|
return Global.normalProperties.ShowFullArraysDeclarations ? EditorFilesHyperlinks.class : null;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getMaxWidth() {
|
public int getMaxWidth() {
|
||||||
return Global.properties.ShowFullArraysDeclarations ? CommonConstants.Nan : 200;
|
return Global.normalProperties.ShowFullArraysDeclarations ? CommonConstants.Nan : 200;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new ColumnInfo<ProjectArray>("Размерность") {
|
new ColumnInfo<ProjectArray>("Размерность") {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class BugReportsDatabase extends SQLiteDatabase {
|
|||||||
public SubsribersDBTable subscribers;
|
public SubsribersDBTable subscribers;
|
||||||
public SubscriberWorkspaceDBTable workspaces; //рабочие пространства для машин.
|
public SubscriberWorkspaceDBTable workspaces; //рабочие пространства для машин.
|
||||||
public BugReportsDatabase() {
|
public BugReportsDatabase() {
|
||||||
super(Paths.get(System.getProperty("user.dir"), "Data", Global.properties.BugReportsDBName).toFile());
|
super(Paths.get(System.getProperty("user.dir"), "Data", "bug_reports.sqlite").toFile());
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void initAllTables() throws Exception {
|
protected void initAllTables() throws Exception {
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public class Visualiser extends Component {
|
|||||||
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
|
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
|
||||||
@Override
|
@Override
|
||||||
public void GetVersionInfo() {
|
public void GetVersionInfo() {
|
||||||
version = 1136;
|
version = 1137;
|
||||||
String pattern = "MMM dd yyyy HH:mm:ss";
|
String pattern = "MMM dd yyyy HH:mm:ss";
|
||||||
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
|
||||||
date_text = df.format(getClassBuildTime());
|
date_text = df.format(getClassBuildTime());
|
||||||
@@ -72,8 +72,8 @@ public class Visualiser extends Component {
|
|||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
public File getWorkspace() {
|
public File getWorkspace() {
|
||||||
if (!Global.properties.Workspace.isEmpty()) {
|
if (!Global.normalProperties.Workspace.isEmpty()) {
|
||||||
File workspace = new File(Global.properties.Workspace);
|
File workspace = new File(Global.normalProperties.Workspace);
|
||||||
if (workspace.exists())
|
if (workspace.exists())
|
||||||
return workspace;
|
return workspace;
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public abstract class RepositoryServer<D extends Database> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//------------
|
//-DVMTestingChecker
|
||||||
public abstract int getPort();
|
public abstract int getPort();
|
||||||
protected abstract void Session() throws Exception;
|
protected abstract void Session() throws Exception;
|
||||||
protected void startAdditionalThreads() {
|
protected void startAdditionalThreads() {
|
||||||
@@ -87,14 +87,14 @@ public abstract class RepositoryServer<D extends Database> {
|
|||||||
Thread thread = new Thread(() -> {
|
Thread thread = new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
Properties props = new Properties();
|
Properties props = new Properties();
|
||||||
props.put("mail.smtp.host", Global.properties.SMTPHost);
|
props.put("mail.smtp.host", Global.normalProperties.SMTPHost);
|
||||||
props.put("mail.smtp.auth", "true");
|
props.put("mail.smtp.auth", "true");
|
||||||
props.put("mail.smtp.port", String.valueOf(Global.properties.SMTPPort));
|
props.put("mail.smtp.port", String.valueOf(Global.normalProperties.SMTPPort));
|
||||||
props.put("mail.smtp.socketFactory.port", String.valueOf(Global.properties.MailSocketPort));
|
props.put("mail.smtp.socketFactory.port", String.valueOf(Global.normalProperties.MailSocketPort));
|
||||||
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
|
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
|
||||||
props.put("mail.smtp.connectiontimeout", String.valueOf(Global.properties.SocketTimeout));
|
props.put("mail.smtp.connectiontimeout", String.valueOf(Global.normalProperties.SocketTimeout));
|
||||||
props.put("mail.smtp.timeout", String.valueOf(Global.properties.SocketTimeout));
|
props.put("mail.smtp.timeout", String.valueOf(Global.normalProperties.SocketTimeout));
|
||||||
props.put("mail.smtp.writetimeout", String.valueOf(Global.properties.SocketTimeout));
|
props.put("mail.smtp.writetimeout", String.valueOf(Global.normalProperties.SocketTimeout));
|
||||||
//------------------------------
|
//------------------------------
|
||||||
LinkedHashMap<String, File> innerFiles = new LinkedHashMap<>();
|
LinkedHashMap<String, File> innerFiles = new LinkedHashMap<>();
|
||||||
for (String aName : message_in.files.keySet()) {
|
for (String aName : message_in.files.keySet()) {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
package _VisualDVM.Repository.Server;
|
package _VisualDVM.Repository.Server;
|
||||||
|
import Common.CommonConstants;
|
||||||
import Common.Database.Objects.DBObject;
|
import Common.Database.Objects.DBObject;
|
||||||
import Common.Database.RepositoryRefuseException;
|
import Common.Database.RepositoryRefuseException;
|
||||||
import Common.Utils.Utils_;
|
import Common.Utils.Utils_;
|
||||||
@@ -58,7 +59,7 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
|||||||
int day = rightNow.get(Calendar.DAY_OF_MONTH);
|
int day = rightNow.get(Calendar.DAY_OF_MONTH);
|
||||||
int hour = rightNow.get(Calendar.HOUR_OF_DAY);
|
int hour = rightNow.get(Calendar.HOUR_OF_DAY);
|
||||||
int minute = rightNow.get(Calendar.MINUTE);
|
int minute = rightNow.get(Calendar.MINUTE);
|
||||||
if ((hour == Global.properties.BackupHour) && (minute == Global.properties.BackupMinute)) {
|
if ((hour == Global.componentsServerProperties.BackupHour) && (minute == Global.componentsServerProperties.BackupMinute)) {
|
||||||
//определить имя папки с багом.
|
//определить имя папки с багом.
|
||||||
String backUpName = year + "_" + (month + 1) + "_" + (day);
|
String backUpName = year + "_" + (month + 1) + "_" + (day);
|
||||||
File todayBackUp = Paths.get(Global.DataBackUpsDirectory.getAbsolutePath(), backUpName).toFile();
|
File todayBackUp = Paths.get(Global.DataBackUpsDirectory.getAbsolutePath(), backUpName).toFile();
|
||||||
@@ -120,12 +121,12 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void StartAction() throws Exception {
|
public void StartAction() throws Exception {
|
||||||
if (Global.properties.EmailAdminsOnStart) {
|
if (Global.componentsServerProperties.EmailAdminsOnStart) {
|
||||||
EmailMessage message = new EmailMessage(
|
EmailMessage message = new EmailMessage(
|
||||||
"Сервер Sapfor запущен",
|
"Сервер Sapfor запущен",
|
||||||
new Date().toString()
|
new Date().toString()
|
||||||
);
|
);
|
||||||
for (String address:Constants.admins_mails) {
|
for (String address : Constants.admins_mails) {
|
||||||
Email(message, address);
|
Email(message, address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -135,278 +136,275 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
|||||||
BugReport bugReport = null;
|
BugReport bugReport = null;
|
||||||
Subscriber subscriber = null;
|
Subscriber subscriber = null;
|
||||||
Account account = null;
|
Account account = null;
|
||||||
if (!Global.properties.OldServer) {
|
switch (code) {
|
||||||
switch (code) {
|
//<editor-fold desc="Регистрация">
|
||||||
//<editor-fold desc="Регистрация">
|
case CheckSubscriberRole:
|
||||||
case CheckSubscriberRole:
|
Print("Проверить роль пользователя");
|
||||||
Print("Проверить роль пользователя");
|
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||||
|
account = (Account) request.object;
|
||||||
|
if (db.subscribers.containsKey(account.email)) {
|
||||||
|
subscriber = db.subscribers.get(account.email);
|
||||||
|
} else {
|
||||||
|
subscriber = new Subscriber();
|
||||||
|
subscriber.name = account.name;
|
||||||
|
subscriber.address = account.email;
|
||||||
|
subscriber.mailOn = 1;
|
||||||
|
db.Insert(subscriber);
|
||||||
|
}
|
||||||
|
response.object = subscriber; //возвращаем информацию о подписчике.
|
||||||
|
break;
|
||||||
|
//</editor-fold>
|
||||||
|
//<editor-fold desc="БАГ РЕПОРТЫ">
|
||||||
|
case ReceiveAllArchives:
|
||||||
|
Print("Отправить клиенту архив всех архивов баг репортов");
|
||||||
|
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||||
|
ZipFolderPass zip = new ZipFolderPass();
|
||||||
|
File archives = new File(Utils_.getDateName("Bugs"));
|
||||||
|
if (zip.Do("Bugs", archives.getAbsolutePath())) {
|
||||||
|
response.object = Utils_.fileToBytes(archives);
|
||||||
|
Print("Архив успешно запакован");
|
||||||
|
} else throw new RepositoryRefuseException("Не удалось запаковать архивы");
|
||||||
|
break;
|
||||||
|
case UpdateBugReport:
|
||||||
|
//-
|
||||||
|
BugReport oldBugReport = (BugReport) request.object;
|
||||||
|
Print("Обновить баг репорт " + oldBugReport.id);
|
||||||
|
if (db.bugReports.containsKey(oldBugReport.id)) {
|
||||||
|
bugReport = db.bugReports.get(oldBugReport.id);
|
||||||
|
bugReport.SynchronizeFields(oldBugReport);
|
||||||
|
bugReport.change_date = oldBugReport.change_date;
|
||||||
|
db.Update(bugReport);
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||||
account = (Account) request.object;
|
} else
|
||||||
if (db.subscribers.containsKey(account.email)) {
|
throw new RepositoryRefuseException("Баг репорт с ключом " + oldBugReport.id + " не существует.");
|
||||||
subscriber = db.subscribers.get(account.email);
|
break;
|
||||||
} else {
|
case UpdateBugReportField: //нужно для дополнений полей
|
||||||
subscriber = new Subscriber();
|
//-
|
||||||
subscriber.name = account.name;
|
BugReport oldBugReport_ = (BugReport) request.object;
|
||||||
subscriber.address = account.email;
|
Print("Обновить поле " + request.arg + " баг репорта " + oldBugReport_.id);
|
||||||
subscriber.mailOn = 1;
|
if (db.bugReports.containsKey(oldBugReport_.id)) {
|
||||||
db.Insert(subscriber);
|
bugReport = db.bugReports.get(oldBugReport_.id);
|
||||||
}
|
Object newValue = BugReport.class.getField(request.arg).get(oldBugReport_);
|
||||||
response.object = subscriber; //возвращаем информацию о подписчике.
|
BugReport.class.getField(request.arg).set(bugReport, newValue);
|
||||||
break;
|
bugReport.change_date = oldBugReport_.change_date;
|
||||||
//</editor-fold>
|
db.Update(bugReport);
|
||||||
//<editor-fold desc="БАГ РЕПОРТЫ">
|
|
||||||
case ReceiveAllArchives:
|
|
||||||
Print("Отправить клиенту архив всех архивов баг репортов");
|
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||||
ZipFolderPass zip = new ZipFolderPass();
|
} else
|
||||||
File archives = new File(Utils_.getDateName("Bugs"));
|
throw new RepositoryRefuseException("Баг репорт с ключом " + oldBugReport_.id + " не существует.");
|
||||||
if (zip.Do("Bugs", archives.getAbsolutePath())) {
|
break;
|
||||||
response.object = Utils_.fileToBytes(archives);
|
case ReceiveBugReportsDatabase:
|
||||||
Print("Архив успешно запакован");
|
Print("Получить базу данных баг репортов");
|
||||||
} else throw new RepositoryRefuseException("Не удалось запаковать архивы");
|
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||||
break;
|
response.object = Utils_.fileToBytes(db.getFile());
|
||||||
case UpdateBugReport:
|
break;
|
||||||
//-
|
case ReceiveBugReport:
|
||||||
BugReport oldBugReport = (BugReport) request.object;
|
Print("Скачать баг репорт по ключу " + request.arg);
|
||||||
Print("Обновить баг репорт " + oldBugReport.id);
|
File bugArchive = Paths.get(Utils_.getHomePath(), "Bugs", request.arg).toFile();
|
||||||
if (db.bugReports.containsKey(oldBugReport.id)) {
|
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||||
bugReport = db.bugReports.get(oldBugReport.id);
|
response.object = Utils_.fileToBytes(bugArchive);
|
||||||
bugReport.SynchronizeFields(oldBugReport);
|
break;
|
||||||
bugReport.change_date = oldBugReport.change_date;
|
case SendBugReport:
|
||||||
db.Update(bugReport);
|
Print("Отправить баг репорт " + request.arg);
|
||||||
|
File bugArchive1 = Paths.get(Utils_.getHomePath(), "Bugs", request.arg).toFile();
|
||||||
|
Utils_.bytesToFile((byte[]) request.object, bugArchive1);
|
||||||
|
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||||
|
break;
|
||||||
|
//</editor-fold>
|
||||||
|
case GetComponentsBackups:
|
||||||
|
Print("Получить список сохраненных версий компонента " + request.arg);
|
||||||
|
File backupsDirectory = Paths.get(Utils_.getHomePath(), "Components", request.arg, "Backups").toFile();
|
||||||
|
//--
|
||||||
|
if (backupsDirectory.exists()) {
|
||||||
|
File[] files = backupsDirectory.listFiles(File::isFile);
|
||||||
|
if (files != null) {
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||||
|
Vector<RemoteFile> res = new Vector<>();
|
||||||
|
for (File file : files)
|
||||||
|
res.add(new RemoteFile(file.getAbsolutePath(), false)); //тут всегда линух.
|
||||||
|
response.object = res;
|
||||||
} else
|
} else
|
||||||
throw new RepositoryRefuseException("Баг репорт с ключом " + oldBugReport.id + " не существует.");
|
throw new RepositoryRefuseException("Не удалось получить список предыдущих версий");
|
||||||
break;
|
} else {
|
||||||
case UpdateBugReportField: //нужно для дополнений полей
|
//баги еще не создавались. штатная ситуация.
|
||||||
//-
|
|
||||||
BugReport oldBugReport_ = (BugReport) request.object;
|
|
||||||
Print("Обновить поле " + request.arg + " баг репорта " + oldBugReport_.id);
|
|
||||||
if (db.bugReports.containsKey(oldBugReport_.id)) {
|
|
||||||
bugReport = db.bugReports.get(oldBugReport_.id);
|
|
||||||
Object newValue = BugReport.class.getField(request.arg).get(oldBugReport_);
|
|
||||||
BugReport.class.getField(request.arg).set(bugReport, newValue);
|
|
||||||
bugReport.change_date = oldBugReport_.change_date;
|
|
||||||
db.Update(bugReport);
|
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
|
||||||
} else
|
|
||||||
throw new RepositoryRefuseException("Баг репорт с ключом " + oldBugReport_.id + " не существует.");
|
|
||||||
break;
|
|
||||||
case ReceiveBugReportsDatabase:
|
|
||||||
Print("Получить базу данных баг репортов");
|
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||||
response.object = Utils_.fileToBytes(db.getFile());
|
response.object = new Vector<>();
|
||||||
break;
|
}
|
||||||
case ReceiveBugReport:
|
break;
|
||||||
Print("Скачать баг репорт по ключу " + request.arg);
|
case PublishComponent:
|
||||||
File bugArchive = Paths.get(Utils_.getHomePath(), "Bugs", request.arg).toFile();
|
String[] packed = request.arg.split("\n");
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
String sComponentType = packed[0];
|
||||||
response.object = Utils_.fileToBytes(bugArchive);
|
String componentFileName = packed[1];
|
||||||
break;
|
String sComponentVersion = packed[2];
|
||||||
case SendBugReport:
|
String componentChangeRecord = request.arg.substring(
|
||||||
Print("Отправить баг репорт " + request.arg);
|
sComponentType.length() +
|
||||||
File bugArchive1 = Paths.get(Utils_.getHomePath(), "Bugs", request.arg).toFile();
|
componentFileName.length() +
|
||||||
Utils_.bytesToFile((byte[]) request.object, bugArchive1);
|
sComponentVersion.length() +
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
3
|
||||||
break;
|
);
|
||||||
//</editor-fold>
|
Print("Опубликовать компонент " + sComponentType);
|
||||||
case GetComponentsBackups:
|
File componentFile = Paths.get(Utils_.getHomePath(), "Components", sComponentType, componentFileName).toFile();
|
||||||
Print("Получить список сохраненных версий компонента " + request.arg);
|
File versionFile = Paths.get(Utils_.getHomePath(), "Components", sComponentType, "version.txt").toFile();
|
||||||
File backupsDirectory = Paths.get(Utils_.getHomePath(), "Components", request.arg, "Backups").toFile();
|
File backupsFolder = Paths.get(Utils_.getHomePath(), "Components", sComponentType, "Backups").toFile();
|
||||||
//--
|
//0 архивация старой версии, если она есть.
|
||||||
if (backupsDirectory.exists()) {
|
if (componentFile.exists()) {
|
||||||
File[] files = backupsDirectory.listFiles(File::isFile);
|
String versionText = "";
|
||||||
if (files != null) {
|
if (versionFile.exists())
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
versionText = Utils.ReadAllText(versionFile);
|
||||||
Vector<RemoteFile> res = new Vector<>();
|
//---->>
|
||||||
for (File file : files)
|
Utils_.CheckDirectory(backupsFolder);
|
||||||
res.add(new RemoteFile(file.getAbsolutePath(), false)); //тут всегда линух.
|
Utils.keepNewFiles(backupsFolder, Global.componentsServerProperties.ComponentsBackUpsCount);
|
||||||
response.object = res;
|
//-->>
|
||||||
} else
|
File backupFile = new File(backupsFolder, sComponentType + "_" + versionText);
|
||||||
throw new RepositoryRefuseException("Не удалось получить список предыдущих версий");
|
if (backupFile.exists())
|
||||||
} else {
|
Utils_.forceDeleteWithCheck(backupFile);
|
||||||
//баги еще не создавались. штатная ситуация.
|
FileUtils.moveFile(componentFile, backupFile);
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
}
|
||||||
response.object = new Vector<>();
|
//1 распаковка компонента
|
||||||
}
|
Utils_.bytesToFile((byte[]) request.object, componentFile);
|
||||||
break;
|
//2 запись версии компонента
|
||||||
case PublishComponent:
|
FileUtils.writeStringToFile(versionFile, sComponentVersion);
|
||||||
String[] packed = request.arg.split("\n");
|
//3 запись в журнал компонента
|
||||||
String sComponentType = packed[0];
|
File changesLog = Paths.get(Utils_.getHomePath(), "Components", sComponentType, "changes.txt").toFile();
|
||||||
String componentFileName = packed[1];
|
FileWriter writer = new FileWriter(changesLog.getAbsolutePath(), true);
|
||||||
String sComponentVersion = packed[2];
|
BufferedWriter bufferWriter = new BufferedWriter(writer);
|
||||||
String componentChangeRecord = request.arg.substring(
|
bufferWriter.write(componentChangeRecord);
|
||||||
sComponentType.length() +
|
bufferWriter.close();
|
||||||
componentFileName.length() +
|
//-
|
||||||
sComponentVersion.length() +
|
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||||
3
|
break;
|
||||||
|
case UpdateComponentMinimalVersion:
|
||||||
|
String[] packed_ = request.arg.split("\n");
|
||||||
|
String sComponentType_ = packed_[0];
|
||||||
|
String sComponentMinimalVersion = packed_[1];
|
||||||
|
Print("Поднять минимальную версию компонента " + sComponentType_);
|
||||||
|
File minimal_versionFile = Paths.get(Utils_.getHomePath(), "Components", sComponentType_, "minimal_version.txt").toFile();
|
||||||
|
FileUtils.writeStringToFile(minimal_versionFile, sComponentMinimalVersion);
|
||||||
|
//-
|
||||||
|
//3 запись в журнал компонента
|
||||||
|
File changesLog_ = Paths.get(Utils_.getHomePath(), "Components", sComponentType_, "changes.txt").toFile();
|
||||||
|
FileWriter writer_ = new FileWriter(changesLog_.getAbsolutePath(), true);
|
||||||
|
BufferedWriter bufferWriter_ = new BufferedWriter(writer_);
|
||||||
|
bufferWriter_.write("Минимальная версия поднята до " + sComponentMinimalVersion + "\n");
|
||||||
|
bufferWriter_.close();
|
||||||
|
//-
|
||||||
|
//-
|
||||||
|
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||||
|
break;
|
||||||
|
case ReceiveComponent:
|
||||||
|
String[] packed1 = request.arg.split("\n");
|
||||||
|
//тип/имя файла
|
||||||
|
File componentFile1 = Paths.get(Utils_.getHomePath(), "Components", packed1[0], packed1[1]).toFile();
|
||||||
|
Print("Получить компонент " + packed1[0]);
|
||||||
|
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||||
|
response.object = Utils_.fileToBytes(componentFile1);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new RepositoryRefuseException("Неподдерживаемый код: " + code);
|
||||||
|
case GetComponentsVersions:
|
||||||
|
Print("Получить актуальные версии компонентов (NEW)");
|
||||||
|
String[] types = request.arg.split("\n");
|
||||||
|
LinkedHashMap<ComponentType, String> response_actual_versions_ = new LinkedHashMap<>();
|
||||||
|
for (String sType : types) {
|
||||||
|
ComponentType componentType = ComponentType.valueOf(sType);
|
||||||
|
File vFile = Paths.get(Utils_.getHomePath(), "Components", sType, "version.txt").toFile();
|
||||||
|
String v_string = Utils_.removeCharacters(
|
||||||
|
Utils.ReadAllText(vFile),
|
||||||
|
"\n", "\r"
|
||||||
);
|
);
|
||||||
Print("Опубликовать компонент " + sComponentType);
|
response_actual_versions_.put(componentType, v_string);
|
||||||
File componentFile = Paths.get(Utils_.getHomePath(), "Components", sComponentType, componentFileName).toFile();
|
}
|
||||||
File versionFile = Paths.get(Utils_.getHomePath(), "Components", sComponentType, "version.txt").toFile();
|
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||||
File backupsFolder = Paths.get(Utils_.getHomePath(), "Components", sComponentType, "Backups").toFile();
|
response.object = response_actual_versions_;
|
||||||
//0 архивация старой версии, если она есть.
|
break;
|
||||||
if (componentFile.exists()) {
|
case GetComponentsMinimalVersions:
|
||||||
String versionText = "";
|
Print("Получить минимальные версии компонентов (NEW)");
|
||||||
if (versionFile.exists())
|
String[] types_ = request.arg.split("\n");
|
||||||
versionText = Utils.ReadAllText(versionFile);
|
LinkedHashMap<ComponentType, String> response_minimal_versions_ = new LinkedHashMap<>();
|
||||||
//---->>
|
for (String sType : types_) {
|
||||||
Utils_.CheckDirectory(backupsFolder);
|
ComponentType componentType = ComponentType.valueOf(sType);
|
||||||
Utils.keepNewFiles(backupsFolder, Global.properties.ComponentsBackUpsCount);
|
File vFile = Paths.get(Utils_.getHomePath(), "Components", sType, "minimal_version.txt").toFile();
|
||||||
//-->>
|
String mv_string = Utils_.removeCharacters(
|
||||||
File backupFile = new File(backupsFolder, sComponentType + "_" + versionText);
|
Utils.ReadAllText(vFile),
|
||||||
if (backupFile.exists())
|
"\n", "\r"
|
||||||
Utils_.forceDeleteWithCheck(backupFile);
|
);
|
||||||
FileUtils.moveFile(componentFile, backupFile);
|
response_minimal_versions_.put(componentType, mv_string);
|
||||||
}
|
}
|
||||||
//1 распаковка компонента
|
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||||
Utils_.bytesToFile((byte[]) request.object, componentFile);
|
response.object = response_minimal_versions_;
|
||||||
//2 запись версии компонента
|
break;
|
||||||
FileUtils.writeStringToFile(versionFile, sComponentVersion);
|
case GetComponentChangesLog:
|
||||||
//3 запись в журнал компонента
|
Print("Получить журнал изменений компонента " + request.arg);
|
||||||
File changesLog = Paths.get(Utils_.getHomePath(), "Components", sComponentType, "changes.txt").toFile();
|
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||||
FileWriter writer = new FileWriter(changesLog.getAbsolutePath(), true);
|
response.object = Utils_.fileToBytes(Paths.get(Utils_.getHomePath(), "Components", request.arg, "changes.txt").toFile());
|
||||||
BufferedWriter bufferWriter = new BufferedWriter(writer);
|
break;
|
||||||
bufferWriter.write(componentChangeRecord);
|
case CheckURLRegistered:
|
||||||
bufferWriter.close();
|
Print("Проверить учетную запись на машине");
|
||||||
//-
|
String[] data = request.arg.split("\n");
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
String email = data[0];
|
||||||
break;
|
String machineURL = data[1];
|
||||||
case UpdateComponentMinimalVersion:
|
String login = data[2];
|
||||||
String[] packed_ = request.arg.split("\n");
|
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||||
String sComponentType_ = packed_[0];
|
response.object = db.workspaces.findWorkspace(email, machineURL, login);
|
||||||
String sComponentMinimalVersion = packed_[1];
|
break;
|
||||||
Print("Поднять минимальную версию компонента " + sComponentType_);
|
case DVMConvertProject:
|
||||||
File minimal_versionFile = Paths.get(Utils_.getHomePath(), "Components", sComponentType_, "minimal_version.txt").toFile();
|
Print("Сконвертировать проект в DVM код");
|
||||||
FileUtils.writeStringToFile(minimal_versionFile, sComponentMinimalVersion);
|
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||||
//-
|
String[] args = request.arg.split("\n");
|
||||||
//3 запись в журнал компонента
|
//-
|
||||||
File changesLog_ = Paths.get(Utils_.getHomePath(), "Components", sComponentType_, "changes.txt").toFile();
|
String projectName = args[0];
|
||||||
FileWriter writer_ = new FileWriter(changesLog_.getAbsolutePath(), true);
|
LanguageName projectLanguage = LanguageName.valueOf(args[1]);
|
||||||
BufferedWriter bufferWriter_ = new BufferedWriter(writer_);
|
String options = args[2];
|
||||||
bufferWriter_.write("Минимальная версия поднята до " + sComponentMinimalVersion + "\n");
|
Vector<String> filesNames = new Vector<>(Arrays.asList(args).subList(3, args.length));
|
||||||
bufferWriter_.close();
|
//-
|
||||||
//-
|
File workspace = Utils.getTempFileName("convertation");
|
||||||
//-
|
FileUtils.forceMkdir(workspace);
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
File archive = new File(workspace, projectName + ".zip");
|
||||||
break;
|
request.Unpack(archive);
|
||||||
case ReceiveComponent:
|
File project = new File(workspace, projectName);
|
||||||
String[] packed1 = request.arg.split("\n");
|
Vector<String> badFiles = new Vector<>();
|
||||||
//тип/имя файла
|
if (unzip.Do(archive.getAbsolutePath(), workspace.getAbsolutePath()) && project.exists()) {
|
||||||
File componentFile1 = Paths.get(Utils_.getHomePath(), "Components", packed1[0], packed1[1]).toFile();
|
String output = "";
|
||||||
Print("Получить компонент " + packed1[0]);
|
for (String fileName : filesNames) {
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
File program = Paths.get(project.getAbsolutePath(), fileName).toFile();
|
||||||
response.object = Utils_.fileToBytes(componentFile1);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new RepositoryRefuseException("Неподдерживаемый код: " + code);
|
|
||||||
case GetComponentsVersions:
|
|
||||||
Print("Получить актуальные версии компонентов (NEW)");
|
|
||||||
String[] types = request.arg.split("\n");
|
|
||||||
LinkedHashMap<ComponentType, String> response_actual_versions_ = new LinkedHashMap<>();
|
|
||||||
for (String sType : types) {
|
|
||||||
ComponentType componentType = ComponentType.valueOf(sType);
|
|
||||||
File vFile = Paths.get(Utils_.getHomePath(), "Components", sType, "version.txt").toFile();
|
|
||||||
String v_string = Utils_.removeCharacters(
|
|
||||||
Utils.ReadAllText(vFile),
|
|
||||||
"\n", "\r"
|
|
||||||
);
|
|
||||||
response_actual_versions_.put(componentType, v_string);
|
|
||||||
}
|
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
|
||||||
response.object = response_actual_versions_;
|
|
||||||
break;
|
|
||||||
case GetComponentsMinimalVersions:
|
|
||||||
Print("Получить минимальные версии компонентов (NEW)");
|
|
||||||
String[] types_ = request.arg.split("\n");
|
|
||||||
LinkedHashMap<ComponentType, String> response_minimal_versions_ = new LinkedHashMap<>();
|
|
||||||
for (String sType : types_) {
|
|
||||||
ComponentType componentType = ComponentType.valueOf(sType);
|
|
||||||
File vFile = Paths.get(Utils_.getHomePath(), "Components", sType, "minimal_version.txt").toFile();
|
|
||||||
String mv_string = Utils_.removeCharacters(
|
|
||||||
Utils.ReadAllText(vFile),
|
|
||||||
"\n", "\r"
|
|
||||||
);
|
|
||||||
response_minimal_versions_.put(componentType, mv_string);
|
|
||||||
}
|
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
|
||||||
response.object = response_minimal_versions_;
|
|
||||||
break;
|
|
||||||
case GetComponentChangesLog:
|
|
||||||
Print("Получить журнал изменений компонента " + request.arg);
|
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
|
||||||
response.object = Utils_.fileToBytes(Paths.get(Utils_.getHomePath(), "Components", request.arg, "changes.txt").toFile());
|
|
||||||
break;
|
|
||||||
case CheckURLRegistered:
|
|
||||||
Print("Проверить учетную запись на машине");
|
|
||||||
String[] data = request.arg.split("\n");
|
|
||||||
String email = data[0];
|
|
||||||
String machineURL = data[1];
|
|
||||||
String login = data[2];
|
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
|
||||||
response.object = db.workspaces.findWorkspace(email, machineURL, login);
|
|
||||||
break;
|
|
||||||
case DVMConvertProject:
|
|
||||||
Print("Сконвертировать проект в DVM код");
|
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
|
||||||
String[] args = request.arg.split("\n");
|
|
||||||
//-
|
|
||||||
String projectName = args[0];
|
|
||||||
LanguageName projectLanguage = LanguageName.valueOf(args[1]);
|
|
||||||
String options = args[2];
|
|
||||||
Vector<String> filesNames = new Vector<>(Arrays.asList(args).subList(3, args.length));
|
|
||||||
//-
|
|
||||||
File workspace = Utils.getTempFileName("convertation");
|
|
||||||
FileUtils.forceMkdir(workspace);
|
|
||||||
File archive = new File(workspace, projectName + ".zip");
|
|
||||||
request.Unpack(archive);
|
|
||||||
File project = new File(workspace, projectName);
|
|
||||||
Vector<String> badFiles = new Vector<>();
|
|
||||||
if (unzip.Do(archive.getAbsolutePath(), workspace.getAbsolutePath()) && project.exists()) {
|
|
||||||
String output = "";
|
|
||||||
for (String fileName : filesNames) {
|
|
||||||
File program = Paths.get(project.getAbsolutePath(), fileName).toFile();
|
|
||||||
//--
|
|
||||||
File convertedProgram = Paths.get(program.getParent(),
|
|
||||||
Utils_.getFileNameWithoutExtension(program) + ".DVMH." +
|
|
||||||
(projectLanguage.equals(LanguageName.fortran) ? "f" : "c")
|
|
||||||
).toFile();
|
|
||||||
String command =
|
|
||||||
Utils_.DQuotes(server_dvm_drv) + " " +
|
|
||||||
projectLanguage.getDVMCompile() + "dv " +
|
|
||||||
options + " "
|
|
||||||
+ Utils_.DQuotes(program.getName());
|
|
||||||
//--
|
|
||||||
File fileWorkspace = program.getParentFile();
|
|
||||||
Process process = Utils.startScript(workspace, fileWorkspace, Utils_.getDateName("convert_script"), command);
|
|
||||||
process.waitFor();
|
|
||||||
String convertationOut = Utils.readAllOutput(process);
|
|
||||||
convertationOut = convertationOut.replace(program.getName(), fileName); //для учета пути.
|
|
||||||
if (!convertationOut.isEmpty())
|
|
||||||
output += convertationOut + "\n";
|
|
||||||
try {
|
|
||||||
if (convertedProgram.exists()) {
|
|
||||||
FileUtils.forceDelete(program);
|
|
||||||
convertedProgram.renameTo(program);
|
|
||||||
} else badFiles.add(program.getName());
|
|
||||||
} catch (Exception ex) {
|
|
||||||
ex.printStackTrace();
|
|
||||||
}
|
|
||||||
//--
|
|
||||||
}
|
|
||||||
response.arg = String.join("\n", badFiles) + "|" + output;
|
|
||||||
File resultArchive = new File(workspace, projectName + "_result.zip");
|
|
||||||
if (ComponentsServer.zip.Do(project.getAbsolutePath(), resultArchive.getAbsolutePath())) {
|
|
||||||
response.object = Utils_.fileToBytes(resultArchive);
|
|
||||||
} else
|
|
||||||
throw new RepositoryRefuseException("Внутренняя ошибка. Не удалось запаковать версию");
|
|
||||||
//--
|
//--
|
||||||
|
File convertedProgram = Paths.get(program.getParent(),
|
||||||
|
Utils_.getFileNameWithoutExtension(program) + ".DVMH." +
|
||||||
|
(projectLanguage.equals(LanguageName.fortran) ? "f" : "c")
|
||||||
|
).toFile();
|
||||||
|
String command =
|
||||||
|
Utils_.DQuotes(server_dvm_drv) + " " +
|
||||||
|
projectLanguage.getDVMCompile() + "dv " +
|
||||||
|
options + " "
|
||||||
|
+ Utils_.DQuotes(program.getName());
|
||||||
|
//--
|
||||||
|
File fileWorkspace = program.getParentFile();
|
||||||
|
Process process = Utils.startScript(workspace, fileWorkspace, Utils_.getDateName("convert_script"), command);
|
||||||
|
process.waitFor();
|
||||||
|
String convertationOut = Utils.readAllOutput(process);
|
||||||
|
convertationOut = convertationOut.replace(program.getName(), fileName); //для учета пути.
|
||||||
|
if (!convertationOut.isEmpty())
|
||||||
|
output += convertationOut + "\n";
|
||||||
|
try {
|
||||||
|
if (convertedProgram.exists()) {
|
||||||
|
FileUtils.forceDelete(program);
|
||||||
|
convertedProgram.renameTo(program);
|
||||||
|
} else badFiles.add(program.getName());
|
||||||
|
} catch (Exception ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
//--
|
||||||
|
}
|
||||||
|
response.arg = String.join("\n", badFiles) + "|" + output;
|
||||||
|
File resultArchive = new File(workspace, projectName + "_result.zip");
|
||||||
|
if (ComponentsServer.zip.Do(project.getAbsolutePath(), resultArchive.getAbsolutePath())) {
|
||||||
|
response.object = Utils_.fileToBytes(resultArchive);
|
||||||
} else
|
} else
|
||||||
throw new RepositoryRefuseException("Внутренняя ошибка. Не удалось распаковать проект");
|
throw new RepositoryRefuseException("Внутренняя ошибка. Не удалось запаковать версию");
|
||||||
break;
|
//--
|
||||||
}
|
} else
|
||||||
} else
|
throw new RepositoryRefuseException("Внутренняя ошибка. Не удалось распаковать проект");
|
||||||
response = new ServerExchangeUnit_2021(ServerCode.OLD);
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected void startAdditionalThreads() {
|
protected void startAdditionalThreads() {
|
||||||
|
|||||||
12
src/_VisualDVM/TestingServerProperties.java
Normal file
12
src/_VisualDVM/TestingServerProperties.java
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
package _VisualDVM;
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
public class TestingServerProperties extends VisualDVMProperties{
|
||||||
|
public TestingServerProperties(){
|
||||||
|
Mode = _VisualDVM.Mode.Testing;
|
||||||
|
}
|
||||||
|
public TestingServerProperties(File file_in){
|
||||||
|
super(_VisualDVM.Mode.Testing, file_in);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,11 +2,8 @@ package _VisualDVM.TestingSystem.Common.MachineProcess;
|
|||||||
import Common.CommonConstants;
|
import Common.CommonConstants;
|
||||||
import Common.Database.Objects.DBObject;
|
import Common.Database.Objects.DBObject;
|
||||||
import Common.Utils.Utils_;
|
import Common.Utils.Utils_;
|
||||||
import _VisualDVM.Global;
|
import _VisualDVM.*;
|
||||||
import _VisualDVM.GlobalProperties;
|
|
||||||
import _VisualDVM.Mode;
|
|
||||||
import _VisualDVM.TestingSystem.DVM.DVMPackage.DVMPackage;
|
import _VisualDVM.TestingSystem.DVM.DVMPackage.DVMPackage;
|
||||||
import _VisualDVM.Utils;
|
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -82,7 +79,7 @@ public class MachineProcess extends DBObject {
|
|||||||
boolean local = false;
|
boolean local = false;
|
||||||
try {
|
try {
|
||||||
InetAddress address = InetAddress.getByName(machineAddress);
|
InetAddress address = InetAddress.getByName(machineAddress);
|
||||||
InetAddress localAddress = InetAddress.getByName(Global.properties.ServerAddress);
|
InetAddress localAddress = InetAddress.getByName(Global.normalProperties.ServerAddress);
|
||||||
local = localAddress.getHostAddress().equals(address.getHostAddress());
|
local = localAddress.getHostAddress().equals(address.getHostAddress());
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Utils_.MainLog.PrintException(ex);
|
Utils_.MainLog.PrintException(ex);
|
||||||
@@ -99,7 +96,7 @@ public class MachineProcess extends DBObject {
|
|||||||
File supervisor = new File(workspace, "VisualSapfor.jar");
|
File supervisor = new File(workspace, "VisualSapfor.jar");
|
||||||
FileUtils.copyFile(src, supervisor);
|
FileUtils.copyFile(src, supervisor);
|
||||||
//создание настроек
|
//создание настроек
|
||||||
GlobalProperties properties = new GlobalProperties(Global.properties);
|
VisualDVMProperties properties = new VisualDVMProperties();
|
||||||
properties.Mode = Mode.MachineQueue;
|
properties.Mode = Mode.MachineQueue;
|
||||||
Utils_.jsonToFile(properties, new File(workspace, "properties"));
|
Utils_.jsonToFile(properties, new File(workspace, "properties"));
|
||||||
Vector<String> args = new Vector<>();
|
Vector<String> args = new Vector<>();
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class TestingMenuBar extends VisualiserMenuBar {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
public void Mark() {
|
public void Mark() {
|
||||||
setIcon(Utils_.getIcon(Global.properties.EmailOnTestingProgress ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
|
setIcon(Utils_.getIcon(Global.normalProperties.EmailOnTestingProgress ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//--
|
//--
|
||||||
@@ -57,7 +57,7 @@ public class TestingMenuBar extends VisualiserMenuBar {
|
|||||||
Mark();
|
Mark();
|
||||||
addActionListener(e -> {
|
addActionListener(e -> {
|
||||||
Global.mainModule.getPass(PassCode.UpdateProperty).Do("AutoCheckTesting");
|
Global.mainModule.getPass(PassCode.UpdateProperty).Do("AutoCheckTesting");
|
||||||
if (Global.properties.AutoCheckTesting)
|
if (Global.normalProperties.AutoCheckTesting)
|
||||||
TestingServer.TimerOn();
|
TestingServer.TimerOn();
|
||||||
else
|
else
|
||||||
TestingServer.TimerOff();
|
TestingServer.TimerOff();
|
||||||
@@ -66,18 +66,18 @@ public class TestingMenuBar extends VisualiserMenuBar {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
public void Mark() {
|
public void Mark() {
|
||||||
setIcon(Utils_.getIcon(Global.properties.AutoCheckTesting ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
|
setIcon(Utils_.getIcon(Global.normalProperties.AutoCheckTesting ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//--
|
//--
|
||||||
add(sCheckTime = new JSpinner());
|
add(sCheckTime = new JSpinner());
|
||||||
sCheckTime.setPreferredSize(new Dimension(60, 26));
|
sCheckTime.setPreferredSize(new Dimension(60, 26));
|
||||||
sCheckTime.setMaximumSize(new Dimension(60, 26));
|
sCheckTime.setMaximumSize(new Dimension(60, 26));
|
||||||
sCheckTime.setModel(new SpinnerNumberModel(Global.properties.CheckTestingIntervalSeconds, 10, 3600, 1));
|
sCheckTime.setModel(new SpinnerNumberModel(Global.normalProperties.CheckTestingIntervalSeconds, 10, 3600, 1));
|
||||||
sCheckTime.setValue(Global.properties.CheckTestingIntervalSeconds);
|
sCheckTime.setValue(Global.normalProperties.CheckTestingIntervalSeconds);
|
||||||
UI.MakeSpinnerRapid(sCheckTime, e -> {
|
UI.MakeSpinnerRapid(sCheckTime, e -> {
|
||||||
Global.properties.updateField("CheckTestingIntervalSeconds", sCheckTime.getValue());
|
Global.normalProperties.updateField("CheckTestingIntervalSeconds", sCheckTime.getValue());
|
||||||
if (Global.properties.AutoCheckTesting) TestingServer.ResetTimer();
|
if (Global.normalProperties.AutoCheckTesting) TestingServer.ResetTimer();
|
||||||
});
|
});
|
||||||
add(new JLabel(" сек ") {
|
add(new JLabel(" сек ") {
|
||||||
{
|
{
|
||||||
@@ -89,7 +89,7 @@ public class TestingMenuBar extends VisualiserMenuBar {
|
|||||||
addPasses(PassCode.StartTestingServer, PassCode.ShutdownTestingServer, PassCode.PublishTestingServer);
|
addPasses(PassCode.StartTestingServer, PassCode.ShutdownTestingServer, PassCode.PublishTestingServer);
|
||||||
}
|
}
|
||||||
public void ShowAutoCheckTesting() {
|
public void ShowAutoCheckTesting() {
|
||||||
autorefreshButton.setIcon(Utils_.getIcon(Global.properties.AutoCheckTesting ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
|
autorefreshButton.setIcon(Utils_.getIcon(Global.normalProperties.AutoCheckTesting ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
|
||||||
}
|
}
|
||||||
public void showServerAdminLabel(boolean flag) {
|
public void showServerAdminLabel(boolean flag) {
|
||||||
serverAdminLabel.setVisible(flag);
|
serverAdminLabel.setVisible(flag);
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
|
|||||||
return String.join("/", user.workspace, "modules", "planner");
|
return String.join("/", user.workspace, "modules", "planner");
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
void CheckLocal() {
|
void CheckLocal() { загрузка результатов
|
||||||
local = false;
|
local = false;
|
||||||
try {
|
try {
|
||||||
InetAddress address = InetAddress.getByName(machine.address);
|
InetAddress address = InetAddress.getByName(machine.address);
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
|||||||
System.out.println("ServerName=" + Utils_.Brackets(name));
|
System.out.println("ServerName=" + Utils_.Brackets(name));
|
||||||
}
|
}
|
||||||
public static void TimerOn() {
|
public static void TimerOn() {
|
||||||
checkTimer = new Timer(Global.properties.CheckTestingIntervalSeconds * 1000, e -> {
|
checkTimer = new Timer(Global.normalProperties.CheckTestingIntervalSeconds * 1000, e -> {
|
||||||
Global.mainModule.getPass(PassCode.ActualizePackages).Do();
|
Global.mainModule.getPass(PassCode.ActualizePackages).Do();
|
||||||
});
|
});
|
||||||
checkTimer.start();
|
checkTimer.start();
|
||||||
@@ -242,9 +242,8 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
|||||||
//основа
|
//основа
|
||||||
@Override
|
@Override
|
||||||
public int getPort() {
|
public int getPort() {
|
||||||
return Global.properties.TestingServerPort;
|
return Global.properties.TestingServerPort;
|
||||||
}
|
}
|
||||||
//---
|
|
||||||
@Override
|
@Override
|
||||||
protected void startAdditionalThreads() {
|
protected void startAdditionalThreads() {
|
||||||
testingThread.start();
|
testingThread.start();
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ public class RemoteDVMTestingPlanner extends DVMTestingPlanner {
|
|||||||
unzipFolderPass.Do(results_archive.getAbsolutePath(), packageLocalWorkspace.getAbsolutePath(), false);
|
unzipFolderPass.Do(results_archive.getAbsolutePath(), packageLocalWorkspace.getAbsolutePath(), false);
|
||||||
}
|
}
|
||||||
//---
|
//---
|
||||||
if (Global.properties.eraseTestingWorkspaces && user.connection.Exists(packageRemoteWorkspace))
|
if (user.connection.Exists(packageRemoteWorkspace))
|
||||||
user.connection.RMDIR(packageRemoteWorkspace.full_name);
|
user.connection.RMDIR(packageRemoteWorkspace.full_name);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
|||||||
File visualiser = new File(workspace, "VisualSapfor.jar");
|
File visualiser = new File(workspace, "VisualSapfor.jar");
|
||||||
FileUtils.copyFile(new File(Utils_.getHomeDirectory(), "TestingSystem.jar"), visualiser);
|
FileUtils.copyFile(new File(Utils_.getHomeDirectory(), "TestingSystem.jar"), visualiser);
|
||||||
//создание настроек
|
//создание настроек
|
||||||
GlobalProperties properties = new GlobalProperties(Global.properties);
|
VisualDVMProperties properties = new VisualDVMProperties();
|
||||||
properties.Mode = Mode.Package;
|
properties.Mode = Mode.Package;
|
||||||
Utils_.jsonToFile(properties, new File(workspace, "properties"));
|
Utils_.jsonToFile(properties, new File(workspace, "properties"));
|
||||||
//подготовка пакетного режима. Запустит его уже очередь.
|
//подготовка пакетного режима. Запустит его уже очередь.
|
||||||
|
|||||||
@@ -598,7 +598,7 @@ public class Utils {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
public static void RestoreSelectedDirectory(VFileChooser_ directoryChooser) {
|
public static void RestoreSelectedDirectory(VFileChooser_ directoryChooser) {
|
||||||
String last_dir_home = Global.properties.ProjectsSearchDirectory;
|
String last_dir_home = Global.normalProperties.ProjectsSearchDirectory;
|
||||||
if (!last_dir_home.isEmpty())
|
if (!last_dir_home.isEmpty())
|
||||||
directoryChooser.SetCurrentDirectory(last_dir_home);
|
directoryChooser.SetCurrentDirectory(last_dir_home);
|
||||||
}
|
}
|
||||||
@@ -646,11 +646,11 @@ public class Utils {
|
|||||||
break;
|
break;
|
||||||
case ' ':
|
case ' ':
|
||||||
case '\t':
|
case '\t':
|
||||||
if (Global.properties.SpacesOn) line.append(c);
|
if (Global.normalProperties.SpacesOn) line.append(c);
|
||||||
v_line.append(c);
|
v_line.append(c);
|
||||||
break;
|
break;
|
||||||
case '\n': //конец строки
|
case '\n': //конец строки
|
||||||
if (Global.properties.FortranWrapsOn) {
|
if (Global.normalProperties.FortranWrapsOn) {
|
||||||
//оракул. лезем в начало следующей строки
|
//оракул. лезем в начало следующей строки
|
||||||
//и анализируем первые 5 символов
|
//и анализируем первые 5 символов
|
||||||
boolean hasWrap = false;
|
boolean hasWrap = false;
|
||||||
@@ -676,7 +676,7 @@ public class Utils {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//добавление строки в результат.
|
//добавление строки в результат.
|
||||||
if ((line.length() > 0) || Global.properties.EmptyLinesOn
|
if ((line.length() > 0) || Global.normalProperties.EmptyLinesOn
|
||||||
// Global.db.settings.get(SettingName.SpacesOn).toBoolean()
|
// Global.db.settings.get(SettingName.SpacesOn).toBoolean()
|
||||||
) {
|
) {
|
||||||
lines.add(line.toString());
|
lines.add(line.toString());
|
||||||
@@ -695,7 +695,7 @@ public class Utils {
|
|||||||
if ((i > 0) && (c != '\n')) {
|
if ((i > 0) && (c != '\n')) {
|
||||||
//строка оборвалась на EOF
|
//строка оборвалась на EOF
|
||||||
//добавление строки в результат.
|
//добавление строки в результат.
|
||||||
if ((line.length() > 0) || Global.properties.EmptyLinesOn
|
if ((line.length() > 0) || Global.normalProperties.EmptyLinesOn
|
||||||
// && Global.db.settings.get(SettingName.SpacesOn).toBoolean()
|
// && Global.db.settings.get(SettingName.SpacesOn).toBoolean()
|
||||||
) {
|
) {
|
||||||
lines.add(line.toString());
|
lines.add(line.toString());
|
||||||
@@ -707,11 +707,11 @@ public class Utils {
|
|||||||
public static boolean CompareLines(String line1_raw, String line2_raw) {
|
public static boolean CompareLines(String line1_raw, String line2_raw) {
|
||||||
String line1 = line1_raw;
|
String line1 = line1_raw;
|
||||||
String line2 = line2_raw;
|
String line2 = line2_raw;
|
||||||
if (!Global.properties.RegisterOn) {
|
if (!Global.normalProperties.RegisterOn) {
|
||||||
line1 = line1.toUpperCase();
|
line1 = line1.toUpperCase();
|
||||||
line2 = line2.toUpperCase();
|
line2 = line2.toUpperCase();
|
||||||
}
|
}
|
||||||
if (!Global.properties.SpacesOn) {
|
if (!Global.normalProperties.SpacesOn) {
|
||||||
line1 = Utils_.removeCharacters(line1, " ", "\t");
|
line1 = Utils_.removeCharacters(line1, " ", "\t");
|
||||||
line2 = Utils_.removeCharacters(line2, " ", "\t");
|
line2 = Utils_.removeCharacters(line2, " ", "\t");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class LastOpenedProjectsMenu extends VisualiserMenu {
|
|||||||
});
|
});
|
||||||
add(i);
|
add(i);
|
||||||
++k;
|
++k;
|
||||||
if (k > Global.properties.LastOpenedProjectsCount)
|
if (k > Global.normalProperties.LastOpenedProjectsCount)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _VisualDVM.Visual.Menus.PropertiesSubmenu;
|
|||||||
public class SynchronizationSettingsMenu extends PropertiesSubmenu {
|
public class SynchronizationSettingsMenu extends PropertiesSubmenu {
|
||||||
public SynchronizationSettingsMenu() {
|
public SynchronizationSettingsMenu() {
|
||||||
super("Синхронизация", null,
|
super("Синхронизация", null,
|
||||||
Global.properties,
|
Global.normalProperties,
|
||||||
"AutoBugReportsLoad",
|
"AutoBugReportsLoad",
|
||||||
"AutoTestsLoad",
|
"AutoTestsLoad",
|
||||||
"AutoUpdateSearch");
|
"AutoUpdateSearch");
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _VisualDVM.Visual.Menus.PropertiesSubmenu;
|
|||||||
public class VersionsComparisonMenu extends PropertiesSubmenu {
|
public class VersionsComparisonMenu extends PropertiesSubmenu {
|
||||||
public VersionsComparisonMenu() {
|
public VersionsComparisonMenu() {
|
||||||
super("Сравнение версий", null,
|
super("Сравнение версий", null,
|
||||||
Global.properties,
|
Global.normalProperties,
|
||||||
"RegisterOn",
|
"RegisterOn",
|
||||||
"SpacesOn",
|
"SpacesOn",
|
||||||
"EmptyLinesOn",
|
"EmptyLinesOn",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import _VisualDVM.Visual.Menus.PropertiesSubmenu;
|
|||||||
public class CompactnessSettingsMenu extends PropertiesSubmenu {
|
public class CompactnessSettingsMenu extends PropertiesSubmenu {
|
||||||
public CompactnessSettingsMenu() {
|
public CompactnessSettingsMenu() {
|
||||||
super("Компактность отображения", null,
|
super("Компактность отображения", null,
|
||||||
Global.properties,
|
Global.normalProperties,
|
||||||
"SmallScreen",
|
"SmallScreen",
|
||||||
"ShowFullArraysDeclarations",
|
"ShowFullArraysDeclarations",
|
||||||
"ShowFullTabsNames",
|
"ShowFullTabsNames",
|
||||||
@@ -12,7 +12,7 @@ public class CompactnessSettingsMenu extends PropertiesSubmenu {
|
|||||||
"FastAccessPassesCount");
|
"FastAccessPassesCount");
|
||||||
addSeparator();
|
addSeparator();
|
||||||
addProperties(
|
addProperties(
|
||||||
Global.properties,
|
Global.normalProperties,
|
||||||
"collapseProjectTrees",
|
"collapseProjectTrees",
|
||||||
"collapseFileGraphs",
|
"collapseFileGraphs",
|
||||||
"collapseFileMessages");
|
"collapseFileMessages");
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ public class VisualiserSettingsMenu extends VisualiserMenu {
|
|||||||
super("Настройки визуализатора", "/Common/icons/Settings.png");
|
super("Настройки визуализатора", "/Common/icons/Settings.png");
|
||||||
//-
|
//-
|
||||||
add(new PropertiesSubmenu("Подтверждения и уведомления", null,
|
add(new PropertiesSubmenu("Подтверждения и уведомления", null,
|
||||||
Global.properties,
|
Global.normalProperties,
|
||||||
"ShowPassesDone",
|
"ShowPassesDone",
|
||||||
"ConfirmPassesStart",
|
"ConfirmPassesStart",
|
||||||
"FocusPassesResult"
|
"FocusPassesResult"
|
||||||
@@ -18,21 +18,21 @@ public class VisualiserSettingsMenu extends VisualiserMenu {
|
|||||||
add(new CompactnessSettingsMenu());
|
add(new CompactnessSettingsMenu());
|
||||||
if (Utils_.isWindows()) {
|
if (Utils_.isWindows()) {
|
||||||
add(new PropertiesSubmenu("Компиляция на локальной машине", null,
|
add(new PropertiesSubmenu("Компиляция на локальной машине", null,
|
||||||
Global.properties,
|
Global.normalProperties,
|
||||||
|
|
||||||
"LocalMakePathWindows",
|
"LocalMakePathWindows",
|
||||||
"Kernels"
|
"Kernels"
|
||||||
));
|
));
|
||||||
}else {
|
}else {
|
||||||
add(new PropertiesSubmenu("Компиляция на локальной машине", null,
|
add(new PropertiesSubmenu("Компиляция на локальной машине", null,
|
||||||
Global.properties,
|
Global.normalProperties,
|
||||||
"Kernels"
|
"Kernels"
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
add(new SynchronizationSettingsMenu());
|
add(new SynchronizationSettingsMenu());
|
||||||
add(new VersionsComparisonMenu());
|
add(new VersionsComparisonMenu());
|
||||||
add(Global.properties.getMenuItem("Workspace"));
|
add(Global.normalProperties.getMenuItem("Workspace"));
|
||||||
add(Global.properties.getMenuItem("BugReportsAgeLimit"));
|
add(Global.normalProperties.getMenuItem("BugReportsAgeLimit"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
|||||||
BugReportCommentAddition.setWrapStyleWord(true);
|
BugReportCommentAddition.setWrapStyleWord(true);
|
||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
//тут развилка на то вкладки или поля.
|
//тут развилка на то вкладки или поля.
|
||||||
SwitchScreen(Global.properties.SmallScreen);
|
SwitchScreen(Global.normalProperties.SmallScreen);
|
||||||
//-
|
//-
|
||||||
Global.componentsServer.db.bugReports.mountUI(bugReportsPanel);
|
Global.componentsServer.db.bugReports.mountUI(bugReportsPanel);
|
||||||
Global.componentsServer.db.subscribers.mountUI(subscribersPanel);
|
Global.componentsServer.db.subscribers.mountUI(subscribersPanel);
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ public class ComponentsWindow extends Dialog<Object, ComponentsFields> {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getDefaultWidth() {
|
public int getDefaultWidth() {
|
||||||
return Global.properties.ComponentsWindowWidth;
|
return Global.normalProperties.ComponentsWindowWidth;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getDefaultHeight() {
|
public int getDefaultHeight() {
|
||||||
return Global.properties.ComponentsWindowHeight;
|
return Global.normalProperties.ComponentsWindowHeight;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void CreateButtons() {
|
public void CreateButtons() {
|
||||||
@@ -37,8 +37,8 @@ public class ComponentsWindow extends Dialog<Object, ComponentsFields> {
|
|||||||
@Override
|
@Override
|
||||||
public void onClose() {
|
public void onClose() {
|
||||||
super.onClose();
|
super.onClose();
|
||||||
Global.properties.ComponentsWindowWidth = getWidth();
|
Global.normalProperties.ComponentsWindowWidth = getWidth();
|
||||||
Global.properties.ComponentsWindowHeight = getHeight();
|
Global.normalProperties.ComponentsWindowHeight = getHeight();
|
||||||
Global.properties.Update();
|
Global.normalProperties.Update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,10 +96,10 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
|||||||
ShowProperties();
|
ShowProperties();
|
||||||
Global.mainModule.getPass(PassCode.Save).setControlsEnabled(false);
|
Global.mainModule.getPass(PassCode.Save).setControlsEnabled(false);
|
||||||
//-
|
//-
|
||||||
if (Global.properties.collapseFileGraphs)
|
if (Global.normalProperties.collapseFileGraphs)
|
||||||
CollapseGraphs();
|
CollapseGraphs();
|
||||||
//-
|
//-
|
||||||
if (Global.properties.collapseFileMessages)
|
if (Global.normalProperties.collapseFileMessages)
|
||||||
CollapseMessages();
|
CollapseMessages();
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
@@ -168,33 +168,33 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
|||||||
//----
|
//----
|
||||||
@Override
|
@Override
|
||||||
public void ShowWarningsCount() {
|
public void ShowWarningsCount() {
|
||||||
messagesTabs.setTitleAt(1, (Global.properties.ShowFullTabsNames ? "Предупреждения: " : "") + file.father.db.warnings.getUI().getRowCount());
|
messagesTabs.setTitleAt(1, (Global.normalProperties.ShowFullTabsNames ? "Предупреждения: " : "") + file.father.db.warnings.getUI().getRowCount());
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void ShowErrorsCount() {
|
public void ShowErrorsCount() {
|
||||||
messagesTabs.setTitleAt(2, (Global.properties.ShowFullTabsNames ? "Ошибки: " : "") + file.father.db.errors.getUI().getRowCount());
|
messagesTabs.setTitleAt(2, (Global.normalProperties.ShowFullTabsNames ? "Ошибки: " : "") + file.father.db.errors.getUI().getRowCount());
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void ShowNotesCount() {
|
public void ShowNotesCount() {
|
||||||
messagesTabs.setTitleAt(0, (Global.properties.ShowFullTabsNames ? "Примечания: " : "") + file.father.db.notes.getUI().getRowCount());
|
messagesTabs.setTitleAt(0, (Global.normalProperties.ShowFullTabsNames ? "Примечания: " : "") + file.father.db.notes.getUI().getRowCount());
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void ShowRecommendationsCount() {
|
public void ShowRecommendationsCount() {
|
||||||
messagesTabs.setTitleAt(3, (Global.properties.ShowFullTabsNames ? "Рекомендации: " : "") + file.father.db.recommendations.getUI().getRowCount());
|
messagesTabs.setTitleAt(3, (Global.normalProperties.ShowFullTabsNames ? "Рекомендации: " : "") + file.father.db.recommendations.getUI().getRowCount());
|
||||||
}
|
}
|
||||||
//---
|
//---
|
||||||
@Override
|
@Override
|
||||||
public void RefreshTabsNames() {
|
public void RefreshTabsNames() {
|
||||||
UI.ShowTabsNames(graphsTabs, Global.properties.ShowFullTabsNames );
|
UI.ShowTabsNames(graphsTabs, Global.normalProperties.ShowFullTabsNames );
|
||||||
//--
|
//--
|
||||||
ShowNotesCount();
|
ShowNotesCount();
|
||||||
ShowWarningsCount();
|
ShowWarningsCount();
|
||||||
ShowErrorsCount();
|
ShowErrorsCount();
|
||||||
ShowRecommendationsCount();
|
ShowRecommendationsCount();
|
||||||
//--
|
//--
|
||||||
messagesTabs.setTitleAt(4, (Global.properties.ShowFullTabsNames ? "Компиляция" : ""));
|
messagesTabs.setTitleAt(4, (Global.normalProperties.ShowFullTabsNames ? "Компиляция" : ""));
|
||||||
messagesTabs.setTitleAt(5, (Global.properties.ShowFullTabsNames ? "Запуск" : ""));
|
messagesTabs.setTitleAt(5, (Global.normalProperties.ShowFullTabsNames ? "Запуск" : ""));
|
||||||
messagesTabs.setTitleAt(6, (Global.properties.ShowFullTabsNames ? "Журнал GCOV" : ""));
|
messagesTabs.setTitleAt(6, (Global.normalProperties.ShowFullTabsNames ? "Журнал GCOV" : ""));
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void FocusCompilationOut() {
|
public void FocusCompilationOut() {
|
||||||
@@ -229,10 +229,10 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
|||||||
file.father.db.warnings.ClearUI();
|
file.father.db.warnings.ClearUI();
|
||||||
file.father.db.errors.ClearUI();
|
file.father.db.errors.ClearUI();
|
||||||
file.father.db.recommendations.ClearUI();
|
file.father.db.recommendations.ClearUI();
|
||||||
messagesTabs.setTitleAt(0, (Global.properties.ShowFullTabsNames ? "Примечания: " : "") + "-");
|
messagesTabs.setTitleAt(0, (Global.normalProperties.ShowFullTabsNames ? "Примечания: " : "") + "-");
|
||||||
messagesTabs.setTitleAt(1, (Global.properties.ShowFullTabsNames ? "Предупреждения: " : "") + "-");
|
messagesTabs.setTitleAt(1, (Global.normalProperties.ShowFullTabsNames ? "Предупреждения: " : "") + "-");
|
||||||
messagesTabs.setTitleAt(2, (Global.properties.ShowFullTabsNames ? "Ошибки: " : "") + "-");
|
messagesTabs.setTitleAt(2, (Global.normalProperties.ShowFullTabsNames ? "Ошибки: " : "") + "-");
|
||||||
messagesTabs.setTitleAt(3, (Global.properties.ShowFullTabsNames ? "Рекомендации: " : "") + "-");
|
messagesTabs.setTitleAt(3, (Global.normalProperties.ShowFullTabsNames ? "Рекомендации: " : "") + "-");
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void ShowLoops() {
|
public void ShowLoops() {
|
||||||
|
|||||||
@@ -72,10 +72,10 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
|||||||
Global.mainModule.getUI().getDebugWindow().ShowAll();
|
Global.mainModule.getUI().getDebugWindow().ShowAll();
|
||||||
ShowAllAnalyses();
|
ShowAllAnalyses();
|
||||||
ShowProjectView();
|
ShowProjectView();
|
||||||
SwitchScreen(Global.properties.SmallScreen);
|
SwitchScreen(Global.normalProperties.SmallScreen);
|
||||||
RefreshTabsNames();
|
RefreshTabsNames();
|
||||||
//--
|
//--
|
||||||
if (Global.properties.collapseProjectTrees)
|
if (Global.normalProperties.collapseProjectTrees)
|
||||||
CollapseProjectTrees();
|
CollapseProjectTrees();
|
||||||
//--
|
//--
|
||||||
}
|
}
|
||||||
@@ -225,7 +225,7 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void RefreshTabsNames() {
|
public void RefreshTabsNames() {
|
||||||
UI.ShowTabsNames(projectTabs, 1, Global.properties.ShowFullTabsNames);
|
UI.ShowTabsNames(projectTabs, 1, Global.normalProperties.ShowFullTabsNames);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void RefreshProjectTreeAndMessages() {
|
public void RefreshProjectTreeAndMessages() {
|
||||||
|
|||||||
@@ -80,10 +80,10 @@ public class SapforVersionsComparisonForm extends ComparisonForm<SapforVersion_j
|
|||||||
} else {
|
} else {
|
||||||
if (isReady()) {
|
if (isReady()) {
|
||||||
if (getMaster().isReady()) {
|
if (getMaster().isReady()) {
|
||||||
boolean ExtensionsOn = (Global.properties.ExtensionsOn);
|
boolean ExtensionsOn = (Global.normalProperties.ExtensionsOn);
|
||||||
String name1 = ExtensionsOn ? getMaster().file.file.getName() : Utils_.getFileNameWithoutExtension(getMaster().file.file);
|
String name1 = ExtensionsOn ? getMaster().file.file.getName() : Utils_.getFileNameWithoutExtension(getMaster().file.file);
|
||||||
String name2 = ExtensionsOn ? file.file.getName() : Utils_.getFileNameWithoutExtension(file.file);
|
String name2 = ExtensionsOn ? file.file.getName() : Utils_.getFileNameWithoutExtension(file.file);
|
||||||
if (Global.properties.ComparsionDiffMergeOn) {
|
if (Global.normalProperties.ComparsionDiffMergeOn) {
|
||||||
if (name1.equalsIgnoreCase(name2))
|
if (name1.equalsIgnoreCase(name2))
|
||||||
master.DoComparePass(true);
|
master.DoComparePass(true);
|
||||||
} else
|
} else
|
||||||
@@ -153,7 +153,7 @@ public class SapforVersionsComparisonForm extends ComparisonForm<SapforVersion_j
|
|||||||
cbFile.setSelectedIndex(-1);
|
cbFile.setSelectedIndex(-1);
|
||||||
for (int i = 0; i < cbFile.getItemCount(); ++i) {
|
for (int i = 0; i < cbFile.getItemCount(); ++i) {
|
||||||
ProjectFile projectFile = cbFile.getItemAt(i);
|
ProjectFile projectFile = cbFile.getItemAt(i);
|
||||||
if (Global.properties.ExtensionsOn) {
|
if (Global.normalProperties.ExtensionsOn) {
|
||||||
//если учитываем расширения, ищем полное совпадение
|
//если учитываем расширения, ищем полное совпадение
|
||||||
if (projectFile.file.getName().equals(file_name)) {
|
if (projectFile.file.getName().equals(file_name)) {
|
||||||
cbFile.setSelectedIndex(i);
|
cbFile.setSelectedIndex(i);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public abstract class TasksComparisonForm<T extends DBObject> extends Comparison
|
|||||||
//в отличие от комбо боксов, тут события нажатия на кнопку, нет.
|
//в отличие от комбо боксов, тут события нажатия на кнопку, нет.
|
||||||
if (isReady()) {
|
if (isReady()) {
|
||||||
if (slave.isReady()) {
|
if (slave.isReady()) {
|
||||||
if (Global.properties.ComparsionDiffMergeOn) {
|
if (Global.normalProperties.ComparsionDiffMergeOn) {
|
||||||
DoComparePass(true);
|
DoComparePass(true);
|
||||||
} else
|
} else
|
||||||
DoShowPass(true);
|
DoShowPass(true);
|
||||||
@@ -40,7 +40,7 @@ public abstract class TasksComparisonForm<T extends DBObject> extends Comparison
|
|||||||
} else {
|
} else {
|
||||||
if (isReady()) {
|
if (isReady()) {
|
||||||
if (master.isReady()) {
|
if (master.isReady()) {
|
||||||
if (Global.properties.ComparsionDiffMergeOn) {
|
if (Global.normalProperties.ComparsionDiffMergeOn) {
|
||||||
master.DoComparePass(true);
|
master.DoComparePass(true);
|
||||||
} else
|
} else
|
||||||
master.DoShowPass(true);
|
master.DoShowPass(true);
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
|
|||||||
//---
|
//---
|
||||||
Global.mainModule.getDb().RestoreCredentials();
|
Global.mainModule.getDb().RestoreCredentials();
|
||||||
//---
|
//---
|
||||||
if (Global.properties.AutoCheckTesting)
|
if (Global.normalProperties.AutoCheckTesting)
|
||||||
TestingServer.TimerOn();
|
TestingServer.TimerOn();
|
||||||
}
|
}
|
||||||
//-
|
//-
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ public class VersionsComparisonForm extends ComparisonForm<db_project_info> {
|
|||||||
} else {
|
} else {
|
||||||
if (isReady()) {
|
if (isReady()) {
|
||||||
if (getMaster().isReady()) {
|
if (getMaster().isReady()) {
|
||||||
boolean ExtensionsOn = (Global.properties.ExtensionsOn);
|
boolean ExtensionsOn = (Global.normalProperties.ExtensionsOn);
|
||||||
String name1 = ExtensionsOn ? getMaster().file.file.getName() : Utils_.getFileNameWithoutExtension(getMaster().file.file);
|
String name1 = ExtensionsOn ? getMaster().file.file.getName() : Utils_.getFileNameWithoutExtension(getMaster().file.file);
|
||||||
String name2 = ExtensionsOn ? file.file.getName() : Utils_.getFileNameWithoutExtension(file.file);
|
String name2 = ExtensionsOn ? file.file.getName() : Utils_.getFileNameWithoutExtension(file.file);
|
||||||
if (Global.properties.ComparsionDiffMergeOn) {
|
if (Global.normalProperties.ComparsionDiffMergeOn) {
|
||||||
if (name1.equalsIgnoreCase(name2))
|
if (name1.equalsIgnoreCase(name2))
|
||||||
master.DoComparePass(true);
|
master.DoComparePass(true);
|
||||||
} else
|
} else
|
||||||
@@ -81,7 +81,7 @@ public class VersionsComparisonForm extends ComparisonForm<db_project_info> {
|
|||||||
cbFile.setSelectedIndex(-1);
|
cbFile.setSelectedIndex(-1);
|
||||||
for (int i = 0; i < cbFile.getItemCount(); ++i) {
|
for (int i = 0; i < cbFile.getItemCount(); ++i) {
|
||||||
ProjectFile projectFile = cbFile.getItemAt(i);
|
ProjectFile projectFile = cbFile.getItemAt(i);
|
||||||
if (Global.properties.ExtensionsOn) {
|
if (Global.normalProperties.ExtensionsOn) {
|
||||||
//если учитываем расширения, ищем полное совпадение
|
//если учитываем расширения, ищем полное совпадение
|
||||||
if (projectFile.file.getName().equals(file_in.file.getName())) {
|
if (projectFile.file.getName().equals(file_in.file.getName())) {
|
||||||
cbFile.setSelectedIndex(i);
|
cbFile.setSelectedIndex(i);
|
||||||
@@ -104,6 +104,6 @@ public class VersionsComparisonForm extends ComparisonForm<db_project_info> {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
protected boolean fortranWrapsOn() {
|
protected boolean fortranWrapsOn() {
|
||||||
return Global.properties.FortranWrapsOn;
|
return Global.normalProperties.FortranWrapsOn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
49
src/_VisualDVM/VisualDVMProperties.java
Normal file
49
src/_VisualDVM/VisualDVMProperties.java
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
package _VisualDVM;
|
||||||
|
import Common.Properties;
|
||||||
|
import com.google.gson.annotations.Expose;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
public class VisualDVMProperties extends Properties {
|
||||||
|
@Expose
|
||||||
|
public _VisualDVM.Mode Mode = _VisualDVM.Mode.Normal;
|
||||||
|
//---
|
||||||
|
@Expose
|
||||||
|
public String ServerAddress = "alex-freenas.ddns.net";
|
||||||
|
@Expose
|
||||||
|
public String ServerUserName = "testuser";
|
||||||
|
@Expose
|
||||||
|
public int ServerUserSHHPort = 23;
|
||||||
|
@Expose
|
||||||
|
public int ComponentsServerPort = 7995;
|
||||||
|
@Expose
|
||||||
|
public int TestingServerPort = 7998;
|
||||||
|
@Expose
|
||||||
|
public int SocketTimeout = 5000;
|
||||||
|
//--email
|
||||||
|
@Expose
|
||||||
|
public String SMTPHost = "smtp.mail.ru";
|
||||||
|
@Expose
|
||||||
|
public int SMTPPort = 465;
|
||||||
|
@Expose
|
||||||
|
public int MailSocketPort = 465;
|
||||||
|
//---
|
||||||
|
public VisualDVMProperties() {
|
||||||
|
}
|
||||||
|
public VisualDVMProperties(_VisualDVM.Mode mode_in, File file_in) {
|
||||||
|
super(file_in);
|
||||||
|
Mode = mode_in;
|
||||||
|
}
|
||||||
|
//---
|
||||||
|
public VisualDVMProperties(VisualDVMProperties src) {
|
||||||
|
Mode = src.Mode;
|
||||||
|
ServerAddress = src.ServerAddress;
|
||||||
|
ServerUserName = src.ServerUserName;
|
||||||
|
ServerUserSHHPort = src.ServerUserSHHPort;
|
||||||
|
ComponentsServerPort = src.ComponentsServerPort;
|
||||||
|
TestingServerPort = src.TestingServerPort;
|
||||||
|
SocketTimeout = src.SocketTimeout;
|
||||||
|
SMTPHost = src.SMTPHost;
|
||||||
|
SMTPPort = src.SMTPPort;
|
||||||
|
MailSocketPort = src.MailSocketPort;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user