no message
This commit is contained in:
130
.idea/workspace.xml
generated
130
.idea/workspace.xml
generated
@@ -8,46 +8,108 @@
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/CommonConstants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/CommonConstants.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/Database/Database.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Database/Database.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/Utils/CommonUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Utils/CommonUtils.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/Visual/DBObjectFilter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Visual/DBObjectFilter.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/Visual/Selectable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Visual/Selectable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/Properties.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/Properties.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus/PassesSubMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus/PassesSubMenu.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common/Utils/TextLog.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Utils/TextLog.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/Constants.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/ControlForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/ControlForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/DataSetControlForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/DataSetControlForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/DragDrop/FileDrop.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/DragDrop/FileDrop.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Editor/BaseEditor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Editor/BaseEditor.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Editor/CaretInfo.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Editor/CaretInfo.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus/AttachementsMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus/AttachementsMenu.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus/MainEditorMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus/MainEditorMenu.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus/ProjectFilesMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus/ProjectFilesMenu.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus/PropertiesSubmenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus/PropertiesSubmenu.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus/VersionsMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus/VersionsMenu.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus/VisualiserMenuItem.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus/VisualiserMenuItem.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/LanguagesSubmenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/LanguagesSubmenu.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/MenuBarButton.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/MenuBarButton.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/PassMenuItem.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/PassMenuItem.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/ProjectMenuBar/ProjectViewMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/ProjectMenuBar/ProjectViewMenu.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/SettingsSubmenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/SettingsSubmenu.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/StableMenuItem.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/StableMenuItem.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/StablePassMenuItem.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/StablePassMenuItem.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/VisualiserMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/VisualiserMenu.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/VisualiserMenuBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/VisualiserMenuBar.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Tables/ColumnFilter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Tables/ColumnFilter.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Trees/GraphTreeCellRenderer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Trees/GraphTreeCellRenderer.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus/TableMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus/TableMenu.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus/TextComboBoxMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus/TextComboBoxMenu.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus/TextEditorMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus/TextEditorMenu.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/MainMenuBar/VisualiserSettingsMenu/VisualiserSettingsMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Menus_2023/MainMenuBar/VisualiserSettingsMenu/VisualiserSettingsMenu.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Tables/DateRenderer_.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Tables/DateRenderer_.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Trees/DataTree.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Trees/DataTree.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/UI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/UI.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Windows/Dialog/Dialog.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Windows/Dialog/Dialog.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/UI/Windows/Form.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/UI/Windows/Form.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/Utils/Utils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/Utils/Utils.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/GlobalData/Settings/DBSetting.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Settings/DBSetting.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/GlobalData/Tasks/Supervisor/Remote/RemoteCompilationSupervisor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Tasks/Supervisor/Remote/RemoteCompilationSupervisor.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/GlobalData/User/UI/UserFields.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/User/UI/UserFields.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/ProjectData/SapforData/Arrays/ProjectArray.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/SapforData/Arrays/ProjectArray.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/ProjectData/SapforData/Functions/FuncInfo.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/SapforData/Functions/FuncInfo.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/ProjectData/SapforData/Includes/FileInfo.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/SapforData/Includes/FileInfo.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/Configuration/Configuration.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Configuration/Configuration.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/Group/GroupsMenuBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Group/GroupsMenuBar.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/TestingBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/TestingBar.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackagesBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMPackage/DVMPackagesBar.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/Utils/Validators/PathValidator.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/Utils/Validators/PathValidator.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Common_old/Utils/Validators/ShellParser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common_old/Utils/Validators/ShellParser.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/GlobalData/Compiler/CompilersDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Compiler/CompilersDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/GlobalData/GlobalDatabase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/GlobalDatabase.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/GlobalData/Module/Module.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Module/Module.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/GlobalData/RemoteFile/UI/RemoteFileChooser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/RemoteFile/UI/RemoteFileChooser.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/GlobalData/RunConfiguration/RunConfiguration.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/RunConfiguration/RunConfiguration.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/GlobalData/Settings/SettingsDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Settings/SettingsDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/GlobalData/Splitter/SplittersDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Splitter/SplittersDBTable.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/GlobalData/Tasks/Passes/TaskLocalPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Tasks/Passes/TaskLocalPass.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/GlobalData/Tasks/RunTask/RunTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Tasks/RunTask/RunTask.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/GlobalData/Tasks/Supervisor/Local/LocalTaskSupervisor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Tasks/Supervisor/Local/LocalTaskSupervisor.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/GlobalData/Tasks/Supervisor/Local/Windows/WindowsLocalTaskSupervisor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Tasks/Supervisor/Local/Windows/WindowsLocalTaskSupervisor.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/GlobalData/Tasks/Supervisor/TaskSupervisor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Tasks/Supervisor/TaskSupervisor.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/GlobalData/Tasks/Task.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Tasks/Task.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/ProjectData/Files/DBProjectFile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/Files/DBProjectFile.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/ProjectData/Files/UI/Editor/SPFEditor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/Files/UI/Editor/SPFEditor.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/ProjectData/Messages/Message.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/Messages/Message.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/ProjectData/Project/db_project_info.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/Project/db_project_info.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Repository/Component/Instruction.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Component/Instruction.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Repository/Component/OSDComponent.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Component/OSDComponent.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Repository/Component/Sapfor/MessagesServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Component/Sapfor/MessagesServer.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Repository/Component/Sapfor/Sapfor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Component/Sapfor/Sapfor.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Repository/Component/Visualizer_2.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Component/Visualizer_2.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Repository/EmailMessage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/EmailMessage.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Repository/RepositoryServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/RepositoryServer.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Repository/Server/ComponentsServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Server/ComponentsServer.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Repository/Server/ServerExchangeUnit_2021.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Server/ServerExchangeUnit_2021.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Repository/Subscribes/UI/SubscriberForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Subscribes/UI/SubscriberForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/MachineProcess/MachineProcess.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/MachineProcess/MachineProcess.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/Test/Test.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Test/Test.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/TestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/TestingPlanner.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/TestingServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/TestingServer.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/ThreadsPlanner/ThreadsPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/ThreadsPlanner/ThreadsPlanner.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMTestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/DVMTestingPlanner.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/DVM/UserConnection.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/DVM/UserConnection.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/SapforPackagesBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/SapforPackagesBar.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CloseCurrentFile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CloseCurrentFile.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/Json/SapforVersion_json.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/Json/SapforVersion_json.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/PackageModeSupervisor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/PackageModeSupervisor.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/PerformSapforTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/PerformSapforTask.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/SapforPackageTreeNode.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTasksPackage/UI/SapforPackageTreeNode.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforTestingPlanner.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/AddBugReport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/AddBugReport.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/AddFile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/AddFile.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/AppendBugReportField.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/AppendBugReportField.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CloseCurrentProject.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CloseCurrentProject.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CloseProject.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CloseProject.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CombineFiles.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CombineFiles.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/Compile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/Compile.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CreateGroupFromDirectory.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CreateGroupFromDirectory.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CreateGroupFromFiles.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CreateGroupFromFiles.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CreateTestFromDirectory.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CreateTestFromDirectory.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CreateTestFromFile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/CreateTestFromFile.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DVMConvertProject.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DVMConvertProject.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DownloadBugReport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DownloadBugReport.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DownloadComponent.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DownloadComponent.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DownloadDVMPackages.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DownloadDVMPackages.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DownloadSapforPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DownloadSapforPackage.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/EditAccount.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/EditAccount.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/EraseBadSymbols.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/EraseBadSymbols.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/GCOV.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/GCOV.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/LocalInitaliseUser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/LocalInitaliseUser.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/OpenBugReportTestProject.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/OpenBugReportTestProject.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/OpenCurrentProject.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/OpenCurrentProject.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/Precompilation.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/Precompilation.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/PublishComponent.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/PublishComponent.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/ReplaceTestsFromFiles.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/ReplaceTestsFromFiles.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/Run.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/Run.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SendBugReport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SendBugReport.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/ShowComponentChangesLog.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/ShowComponentChangesLog.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/UpdateComponent.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/UpdateComponent.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/Pass_2021.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/Pass_2021.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/MainForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/MainForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/ProjectForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/ProjectForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/VariantsForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/VariantsForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/ProcessPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/ProcessPass.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SSH/TaskConnectionPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SSH/TaskConnectionPass.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SapforAnalysis.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SapforAnalysis.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/Server/RepositoryPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/Server/RepositoryPass.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/UI/PassForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/UI/PassForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/ComparisonForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/ComparisonForm.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/Syntax/VisualiserTheme.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Syntax/VisualiserTheme.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -147,8 +209,8 @@
|
||||
</key>
|
||||
<key name="MoveMembersDialog.RECENTS_KEY">
|
||||
<recent name="Common.Utils.CommonUtils" />
|
||||
<recent name="Common.Visual.CommonUI" />
|
||||
<recent name="Common.CommonConstants" />
|
||||
<recent name="Common.Visual.CommonUI" />
|
||||
<recent name="Common_old.Constants" />
|
||||
<recent name="Common.Constants" />
|
||||
</key>
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
package Common;
|
||||
import Common.Utils.Vector_;
|
||||
|
||||
import java.util.Vector;
|
||||
import java.util.regex.Pattern;
|
||||
public class CommonConstants {
|
||||
public static final int Nan = -1;
|
||||
public static final Pattern VALID_EMAIL_ADDRESS_REGEX =
|
||||
Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE);
|
||||
public static char[] regular_metasymbols = new char[]{
|
||||
'<', '>', '(', ')', '[', ']', '{', '}', '^', '-', '=', '$', '!', '|', '?', '*', '+', '.'
|
||||
};
|
||||
public static char toStrike = (char) 822;
|
||||
public static char boop = (char) 7;
|
||||
public static Vector<Character> forbidden_file_name_characters = new Vector_<>(
|
||||
'#', '%', '&', '{', '}',
|
||||
'<', '>', '*', '?', '!',
|
||||
'$', '\'', '\"', '@', '+',
|
||||
'`', '|', '=', '#', ':', '/', '\\',
|
||||
'~', '^'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package Common.Database;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Database.Tables.DBTable;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Database.Objects.iDBObject;
|
||||
@@ -179,7 +178,7 @@ public abstract class Database {
|
||||
if (fk_class.getField(owner.getFKName()).get(o).equals(owner.getPK())) res.add((DBObject) o);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -208,7 +207,7 @@ public abstract class Database {
|
||||
if (fk_class.getField(owner.getFKName()).get(f).equals(owner.getPK())) res.put((K) f.getPK(), f);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -223,7 +222,7 @@ public abstract class Database {
|
||||
if (fk_class.getField(owner.getFKName()).get(o).equals(owner.getPK())) res.add(o.toString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -244,7 +243,7 @@ public abstract class Database {
|
||||
res.put((G) (fk_class.getField(group_field).get(f)), f);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -1,19 +1,32 @@
|
||||
package Common.Utils;
|
||||
import Common.CommonConstants;
|
||||
import Common_old.Utils.Utils;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.datatransfer.DataFlavor;
|
||||
import java.awt.datatransfer.StringSelection;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Files;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.Vector;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.stream.Collectors;
|
||||
public class CommonUtils {
|
||||
//Текущая оперционная система
|
||||
public static boolean isWindows=true;
|
||||
//Домашняя папка.
|
||||
public static String Home;
|
||||
//ГЛОБАЛЬНЫЙ ЖУРНАЛ
|
||||
public static Loggable MainLog;
|
||||
//------------------------------------------------------------------------
|
||||
//JSON
|
||||
//--
|
||||
// public static String jsonToPrettyFormat(String packed) {
|
||||
@@ -24,13 +37,62 @@ public class CommonUtils {
|
||||
// }
|
||||
//--
|
||||
public static Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().setPrettyPrinting().create();
|
||||
//------------------------------------------------------------------
|
||||
//-
|
||||
public static <T> T jsonFromFile(File file, Class<T> json_class) throws Exception {
|
||||
return gson.fromJson(FileUtils.readFileToString(file, Charset.defaultCharset()), json_class);
|
||||
}
|
||||
public static void jsonToFile(Object json_object, File file) throws Exception {
|
||||
FileUtils.writeStringToFile(file, gson.toJson(json_object));
|
||||
}
|
||||
//Синтаксис и регулярные выражения
|
||||
//БУФЕР ОБМЕНА
|
||||
public static void CopyToClipboard(String text) {
|
||||
Toolkit.getDefaultToolkit()
|
||||
.getSystemClipboard()
|
||||
.setContents(
|
||||
new StringSelection(text),
|
||||
null
|
||||
);
|
||||
}
|
||||
public static String getFromClipboard() {
|
||||
String res = "";
|
||||
try {
|
||||
res = (String) Toolkit.getDefaultToolkit().getSystemClipboard().getData(DataFlavor.stringFlavor);
|
||||
} catch (Exception ex) {
|
||||
MainLog.PrintException(ex);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
public static String strikeThrough(String s) {
|
||||
StringBuilder res = new StringBuilder();
|
||||
for (char c : s.toCharArray()) {
|
||||
res.append(c);
|
||||
if (c != CommonConstants.toStrike)
|
||||
res.append(CommonConstants.toStrike);
|
||||
}
|
||||
return res.toString();
|
||||
}
|
||||
public static String noStrikeThrough(String s) {
|
||||
StringBuilder res = new StringBuilder();
|
||||
for (char c : s.toCharArray()) {
|
||||
if (c != (CommonConstants.toStrike))
|
||||
res.append(c);
|
||||
}
|
||||
return res.toString();
|
||||
}
|
||||
public static boolean validateEmail(String address, TextLog log) {
|
||||
Matcher matcher = CommonConstants.VALID_EMAIL_ADDRESS_REGEX.matcher(address);
|
||||
if (!matcher.find()) {
|
||||
log.Writeln_("введённый адрес электронной почты некорректен.");
|
||||
return false;
|
||||
}
|
||||
String match = address.substring(matcher.start(), matcher.end());
|
||||
if (!match.equals(address)) {
|
||||
log.Writeln_("введённый адрес электронной почты некорректен.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public static String hideRegularMetasymbols(String word) {
|
||||
String res = word.replace("\\", "\\\\");
|
||||
for (char c : CommonConstants.regular_metasymbols)
|
||||
@@ -52,6 +114,28 @@ public class CommonUtils {
|
||||
public static String TBrackets(Object o) {
|
||||
return "<" + o.toString() + ">";
|
||||
}//FortranSPFTokenMaker
|
||||
public static boolean ContainsForbiddenName(String string) {
|
||||
char[] chars = string.toCharArray();
|
||||
for (char c : chars)
|
||||
if (isForbiddenCharacter(c)) return true;
|
||||
return false;
|
||||
}
|
||||
public static boolean isForbiddenCharacter(char c) {
|
||||
return CommonConstants.forbidden_file_name_characters.contains(c);
|
||||
}
|
||||
public static String ReplaceForbiddenCharacters(String name) {
|
||||
StringBuilder res = new StringBuilder();
|
||||
for (char c : name.toCharArray())
|
||||
res.append(isForbiddenCharacter(c) ? '_' : c);
|
||||
return res.toString();
|
||||
}
|
||||
//Синтаксис и регулярные выражения
|
||||
public static String printAllForbiddenCharacters(){
|
||||
Vector<String> res = new Vector<>();
|
||||
for (char c: CommonConstants.forbidden_file_name_characters)
|
||||
res.add(String.valueOf(c));
|
||||
return String.join(" ", res);
|
||||
}
|
||||
public static boolean ContainsCyrillic(String string) {
|
||||
return string.chars()
|
||||
.mapToObj(Character.UnicodeBlock::of)
|
||||
@@ -285,6 +369,15 @@ public class CommonUtils {
|
||||
public static double getFileSizeMegaBytes(File file) {
|
||||
return ((double)file.length()) / (1024 * 1024);
|
||||
}
|
||||
public static byte[] fileToBytes(File src) throws Exception {
|
||||
byte[] dst = Files.readAllBytes(src.toPath());
|
||||
return dst;
|
||||
}
|
||||
public static void bytesToFile(byte[] bytes, File dst) throws Exception {
|
||||
FileOutputStream os = new FileOutputStream(dst);
|
||||
os.write(bytes);
|
||||
os.close();
|
||||
}
|
||||
//Иконки
|
||||
public static ImageIcon getIcon(String path) {
|
||||
URL imageUrl = CommonUtils.class.getResource(path);
|
||||
@@ -304,8 +397,11 @@ public class CommonUtils {
|
||||
18,
|
||||
Image.SCALE_DEFAULT));
|
||||
}
|
||||
//Даты
|
||||
public static String print_date(Date date) {
|
||||
return new SimpleDateFormat("dd.MM.yyyy HH:mm:ss").format(date);
|
||||
}
|
||||
//-
|
||||
//ГЕНЕРАЦИЯ ИМЕН Старт задачи
|
||||
|
||||
//ГЕНЕРАЦИЯ ИМЕН
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
package Common.Utils;
|
||||
import _VisualDVM.Global;
|
||||
public class TextLog {
|
||||
public String text = "";
|
||||
public void Writeln(String line) {
|
||||
@@ -7,7 +6,7 @@ public class TextLog {
|
||||
}
|
||||
public void Writeln_(String line) {
|
||||
text += line + "\n";
|
||||
Global.Log.Print(line);
|
||||
CommonUtils.MainLog.Print(line);
|
||||
}
|
||||
public void Clear() {
|
||||
text = "";
|
||||
|
||||
@@ -3,7 +3,6 @@ import Common.Utils.Vector_;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
|
||||
import java.util.Vector;
|
||||
import java.util.regex.Pattern;
|
||||
public class Constants {
|
||||
public static final int planner_version = 3;
|
||||
//--
|
||||
@@ -465,19 +464,6 @@ public class Constants {
|
||||
"zypper"
|
||||
//</editor-fold>
|
||||
};
|
||||
public static char toStrike = (char) 822;
|
||||
public static char boop = (char) 7;
|
||||
public static final Pattern VALID_EMAIL_ADDRESS_REGEX =
|
||||
Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE);
|
||||
public static char[] forbidden_file_name_characters = new char[]{
|
||||
'#', '%', '&', '{', '}',
|
||||
'<', '>', '*', '?', '!',
|
||||
'$', '\'', '\"', '@', '+',
|
||||
'`', '|', '=', '#', ':', '/', '\\',
|
||||
'~', '^'
|
||||
};
|
||||
//все запретные символы через пробел.
|
||||
public static String all_forbidden_characters_string = "";
|
||||
public static Vector<String> admins_mails = new Vector_<>(
|
||||
|
||||
"vmk-post@yandex.ru"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Common_old.UI;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.CommonUtils;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -34,7 +34,7 @@ public class ControlForm<C extends Component> {
|
||||
try {
|
||||
control = control_class.newInstance();
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public boolean isShown() {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package Common_old.UI;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import Common.Database.Objects.DBObject;
|
||||
@@ -220,7 +221,7 @@ public class DataSetControlForm extends ControlWithCurrentForm<DataTable> {
|
||||
try {
|
||||
ShowCurrentObject();
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -231,7 +232,7 @@ public class DataSetControlForm extends ControlWithCurrentForm<DataTable> {
|
||||
try {
|
||||
ShowNoCurrentObject();
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -244,7 +245,7 @@ public class DataSetControlForm extends ControlWithCurrentForm<DataTable> {
|
||||
try {
|
||||
MouseAction2();
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -255,7 +256,7 @@ public class DataSetControlForm extends ControlWithCurrentForm<DataTable> {
|
||||
try {
|
||||
ShowNoCurrentObject();
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
//---
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Common_old.UI.DragDrop;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.CommonUtils;
|
||||
|
||||
import java.awt.datatransfer.DataFlavor;
|
||||
import java.io.*;
|
||||
@@ -314,12 +314,12 @@ public class FileDrop {
|
||||
} // end try
|
||||
catch (IOException io) {
|
||||
log(out, "FileDrop: IOException - abort:");
|
||||
Global.Log.PrintException(io);
|
||||
CommonUtils.MainLog.PrintException(io);
|
||||
evt.rejectDrop();
|
||||
} // end catch IOException
|
||||
catch (java.awt.datatransfer.UnsupportedFlavorException ufe) {
|
||||
log(out, "FileDrop: UnsupportedFlavorException - abort:");
|
||||
Global.Log.PrintException(ufe);
|
||||
CommonUtils.MainLog.PrintException(ufe);
|
||||
evt.rejectDrop();
|
||||
} // end catch: UnsupportedFlavorException
|
||||
finally {
|
||||
@@ -446,7 +446,7 @@ public class FileDrop {
|
||||
dt.addDropTargetListener(dropListener);
|
||||
} // end try
|
||||
catch (java.util.TooManyListenersException e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
log(out, "FileDrop: Drop will not work due to previous error. Do you have another listener attached?");
|
||||
} // end catch
|
||||
// Listen for hierarchy changes and remove the drop target when the parent gets cleared out.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Common_old.UI.Editor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Menus.StyledPopupMenu;
|
||||
import Common_old.UI.Menus.TextEditorMenu;
|
||||
import _VisualDVM.Syntax.ThemeElement;
|
||||
@@ -115,8 +115,8 @@ public class BaseEditor extends RSyntaxTextArea implements ThemeElement, DialogF
|
||||
setSelectionEnd(getLineStartOffset(LineNum));
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Global.Log.Print("Не удалось перейти на строку " + LineNum);
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.Print("Не удалось перейти на строку " + LineNum);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
//------------------------------------------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Common_old.UI.Editor;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.CommonUtils;
|
||||
import ProjectData.Files.UI.Editor.SPFEditor;
|
||||
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
|
||||
public class CaretInfo {
|
||||
@@ -22,7 +22,7 @@ public class CaretInfo {
|
||||
prefix_word = SPFEditor.getLastWord(before, ' ', ',', ':', '.', '(', ')');
|
||||
suffix_word = SPFEditor.getFirstWord(after, ' ', ',', ':', '.', '(', ')');
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
public CaretInfo() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Common_old.UI.Menus;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
@@ -21,7 +21,7 @@ public class AttachementsMenu extends StyledPopupMenu {
|
||||
try {
|
||||
Desktop.getDesktop().open(Current.getProject().getAttachmentsDirectory());
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package Common_old.UI.Menus;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Editor.CaretInfo;
|
||||
import Common_old.Utils.Utils;
|
||||
import ProjectData.Files.DBProjectFile;
|
||||
@@ -85,7 +84,7 @@ public class MainEditorMenu extends TextEditorMenu {
|
||||
1
|
||||
);
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -102,7 +101,7 @@ public class MainEditorMenu extends TextEditorMenu {
|
||||
0
|
||||
);
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -190,7 +189,7 @@ public class MainEditorMenu extends TextEditorMenu {
|
||||
try {
|
||||
Current.getSapfor().UpdateProjectFiles(false);
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -35,7 +35,7 @@ public class ProjectFilesMenu extends GraphMenu {
|
||||
try {
|
||||
Desktop.getDesktop().open(Current.getProject().Home);
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Common_old.UI.Menus;
|
||||
import Common.CommonConstants;
|
||||
import Common_old.Utils.Utils;
|
||||
import Common.Utils.CommonUtils;
|
||||
|
||||
import javax.swing.*;
|
||||
public class TableMenu extends StyledPopupMenu {
|
||||
@@ -14,7 +14,7 @@ public class TableMenu extends StyledPopupMenu {
|
||||
owner = owner_in;
|
||||
mcopy = new VisualiserMenuItem("Копировать текст текущей ячейки", "/icons/Editor/Copy.png");
|
||||
//если удалось нажать значит все условия выполнены
|
||||
mcopy.addActionListener(e -> Utils.CopyToClipboard(target.toString()));
|
||||
mcopy.addActionListener(e -> CommonUtils.CopyToClipboard(target.toString()));
|
||||
add(mcopy);
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Common_old.UI.Menus;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Utils.Utils;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
@@ -18,7 +18,7 @@ public class TextComboBoxMenu extends StyledPopupMenu {
|
||||
new AbstractAction() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Utils.CopyToClipboard(box.getSelectedItem().toString());
|
||||
CommonUtils.CopyToClipboard(box.getSelectedItem().toString());
|
||||
}
|
||||
});
|
||||
add(m_copy);
|
||||
@@ -27,7 +27,7 @@ public class TextComboBoxMenu extends StyledPopupMenu {
|
||||
new AbstractAction() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
CommonUI.TrySelect(box, Utils.getFromClipboard());
|
||||
CommonUI.TrySelect(box, CommonUtils.getFromClipboard());
|
||||
}
|
||||
});
|
||||
add(m_paste);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Common_old.UI.Menus;
|
||||
import Common_old.Utils.Utils;
|
||||
import Common.Utils.CommonUtils;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.text.JTextComponent;
|
||||
@@ -52,7 +52,7 @@ public class TextEditorMenu extends StyledPopupMenu {
|
||||
String[] data = selectedText.split("\n");
|
||||
Vector<String> new_data = new Vector<>();
|
||||
for (String line: data){
|
||||
new_data.add(Utils.strikeThrough(line));
|
||||
new_data.add(CommonUtils.strikeThrough(line));
|
||||
}
|
||||
editor.replaceSelection(String.join("\n", new_data));
|
||||
}
|
||||
@@ -66,7 +66,7 @@ public class TextEditorMenu extends StyledPopupMenu {
|
||||
String[] data = selectedText.split("\n");
|
||||
Vector<String> new_data = new Vector<>();
|
||||
for (String line: data){
|
||||
new_data.add(Utils.noStrikeThrough(line));
|
||||
new_data.add(CommonUtils.noStrikeThrough(line));
|
||||
}
|
||||
editor.replaceSelection(String.join("\n", new_data));
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Common_old.UI.Menus_2023.MainMenuBar.VisualiserSettingsMenu;
|
||||
import Common.Utils.CommonUtils;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Menus.PropertiesSubmenu;
|
||||
import Common_old.UI.Menus_2023.SettingsSubmenu;
|
||||
@@ -14,7 +15,7 @@ public class VisualiserSettingsMenu extends VisualiserMenu {
|
||||
"FocusPassesResult"
|
||||
));
|
||||
add(new CompactnessSettingsMenu());
|
||||
if (Global.isWindows) {
|
||||
if (CommonUtils.isWindows) {
|
||||
add(new SettingsSubmenu("Компиляция на локальной машине", null,
|
||||
SettingName.LocalMakePathWindows,
|
||||
SettingName.Kernels
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Common_old.UI.Tables;
|
||||
import Common_old.Utils.Utils;
|
||||
import Common.Utils.CommonUtils;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.Date;
|
||||
@@ -13,6 +13,6 @@ public class DateRenderer_ extends RendererCell<Date> {
|
||||
@Override
|
||||
public void Display() {
|
||||
if (value != null)
|
||||
setText(value.equals(zero) ? "нет" : Utils.print_date(value));
|
||||
setText(value.equals(zero) ? "нет" : CommonUtils.print_date(value));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Common_old.UI.Trees;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.DataControl_OLD;
|
||||
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
@@ -25,7 +25,7 @@ public class DataTree extends StyledTree implements DataControl_OLD {
|
||||
try {
|
||||
ShowCurrentObject();
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
public void SelectNodeByCriteria(Object criteria) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Common_old.UI;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.Menus_2023.CredentialsBar.CredentialsBar;
|
||||
import Common.Visual.DataMenuBar;
|
||||
@@ -13,7 +14,6 @@ import Common_old.UI.Trees.GraphTreeCellRenderer;
|
||||
import Common_old.UI.Trees.SelectionTreeCellRenderer;
|
||||
import Common_old.UI.Windows.FormType;
|
||||
import Common_old.UI.Windows.SearchReplaceForm;
|
||||
import Common_old.Utils.Utils;
|
||||
import Common.Database.Tables.DataSet;
|
||||
import Common.Visual.CommonUI;
|
||||
import GlobalData.Compiler.CompilersDBTable;
|
||||
@@ -329,12 +329,12 @@ public class UI {
|
||||
return Question(getFrontWindow(), text);
|
||||
}
|
||||
public static void Info(String message) {
|
||||
Utils.CopyToClipboard(message);
|
||||
CommonUtils.CopyToClipboard(message);
|
||||
if (Current.hasUI())
|
||||
JOptionPane.showMessageDialog(getFrontWindow(), message, "", 1);
|
||||
}
|
||||
public static void Error(String message) {
|
||||
Utils.CopyToClipboard(message);
|
||||
CommonUtils.CopyToClipboard(message);
|
||||
if (Current.hasUI())
|
||||
JOptionPane.showMessageDialog(getFrontWindow(), message, "", 0);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package Common_old.UI.Windows.Dialog;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Syntax.ThemeElement;
|
||||
import _VisualDVM.Syntax.VisualiserFonts;
|
||||
import Common_old.UI.UI;
|
||||
@@ -68,7 +67,7 @@ public class Dialog<T, F extends DialogFields> extends JDialog implements ThemeE
|
||||
content = (fields = f.newInstance()).getContent();
|
||||
//--?
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public void onClose() {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Common_old.UI.Windows;
|
||||
import Common.Utils.CommonUtils;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.Syntax.ThemeElement;
|
||||
import GlobalData.FormsParams.DBForm;
|
||||
@@ -13,7 +14,7 @@ public abstract class Form extends JFrame implements ThemeElement {
|
||||
public Form() {
|
||||
if (getIconName().length() > 0) setIconImage(new ImageIcon(Form.class.getResource(getIconName())).getImage());
|
||||
SetListener();
|
||||
this.setTitle(Global.isWindows ? getWTitleText() : getUTitleText());
|
||||
this.setTitle(CommonUtils.isWindows ? getWTitleText() : getUTitleText());
|
||||
pack();
|
||||
setMinimumSize(new Dimension(getDefaultWidth(), getDefaultHeight()));
|
||||
}
|
||||
@@ -55,7 +56,7 @@ public abstract class Form extends JFrame implements ThemeElement {
|
||||
try {
|
||||
LoadWindowParameters();
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
setContentPane(getMainPanel());
|
||||
setVisible(true);
|
||||
@@ -64,7 +65,7 @@ public abstract class Form extends JFrame implements ThemeElement {
|
||||
try {
|
||||
SaveWindowParameters();
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
setVisible(false);
|
||||
dispose();
|
||||
|
||||
@@ -17,9 +17,6 @@ import javafx.util.Pair;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import java.awt.*;
|
||||
import java.awt.datatransfer.DataFlavor;
|
||||
import java.awt.datatransfer.StringSelection;
|
||||
import java.io.*;
|
||||
import java.math.BigInteger;
|
||||
import java.net.InetAddress;
|
||||
@@ -29,8 +26,6 @@ import java.net.URL;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.*;
|
||||
import java.security.MessageDigest;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.Semaphore;
|
||||
@@ -44,27 +39,6 @@ public class Utils {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static boolean ContainsForbiddenName(String string) {
|
||||
char[] chars = string.toCharArray();
|
||||
for (char c : chars)
|
||||
if (isForbidden(c)) return true;
|
||||
return false;
|
||||
}
|
||||
public static boolean isForbidden(char c) {
|
||||
for (char f : Constants.forbidden_file_name_characters)
|
||||
if (c == f) return true;
|
||||
return false;
|
||||
}
|
||||
public static String ReplaceForbiddenSymbols(String name) {
|
||||
StringBuilder res = new StringBuilder();
|
||||
for (char c : name.toCharArray())
|
||||
res.append(isForbidden(c) ? '_' : c);
|
||||
return res.toString();
|
||||
}
|
||||
public static void init() {
|
||||
for (char f : Constants.forbidden_file_name_characters)
|
||||
Constants.all_forbidden_characters_string += f + " ";
|
||||
}
|
||||
public static String MFVar(Object o) {
|
||||
return "$(" + o.toString() + ")";
|
||||
}
|
||||
@@ -73,7 +47,7 @@ public class Utils {
|
||||
try {
|
||||
FileUtils.forceMkdir(dir);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,14 +59,14 @@ public class Utils {
|
||||
try {
|
||||
forceDeleteWithCheck(f);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
FileUtils.forceMkdir(dir);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,7 +77,7 @@ public class Utils {
|
||||
try {
|
||||
return new String(Files.readAllBytes(file.toPath()));
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
@@ -115,7 +89,7 @@ public class Utils {
|
||||
try {
|
||||
forceDeleteWithCheck(f);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -168,11 +142,6 @@ public class Utils {
|
||||
getFilesCountR(dir, res);
|
||||
return res.getValue();
|
||||
}
|
||||
public static String print_date(Date date) {
|
||||
String pattern = "dd.MM.yyyy HH:mm:ss";
|
||||
DateFormat df = new SimpleDateFormat(pattern);
|
||||
return df.format(date);
|
||||
}
|
||||
public static File CreateTempResourceFile(String res_name) throws Exception {
|
||||
URL u = (Utils.class.getResource("/files/" + res_name));
|
||||
InputStream i = u.openStream();
|
||||
@@ -203,7 +172,7 @@ public class Utils {
|
||||
return getTempFileName(name, "");
|
||||
}
|
||||
public static boolean isAnchestor(File child, File anchestor) {
|
||||
return child.getAbsolutePath().startsWith(anchestor.getAbsolutePath() + (Global.isWindows ? "\\" : "/"));
|
||||
return child.getAbsolutePath().startsWith(anchestor.getAbsolutePath() + (CommonUtils.isWindows ? "\\" : "/"));
|
||||
}
|
||||
//при условии что это точно его предок
|
||||
public static String getRelativeAddress(File file, File anchestor) {
|
||||
@@ -220,8 +189,8 @@ public class Utils {
|
||||
Log.Writeln_("Имя файла не может содержать кириллицу");
|
||||
res = false;
|
||||
}
|
||||
if (ContainsForbiddenName(name)) {
|
||||
Log.Writeln_("Имя файла не может содержать запрещённых символов\n" + Constants.all_forbidden_characters_string);
|
||||
if (CommonUtils.ContainsForbiddenName(name)) {
|
||||
Log.Writeln_("Имя файла не может содержать запрещённых символов\n" + CommonUtils.printAllForbiddenCharacters());
|
||||
res = false;
|
||||
}
|
||||
return res;
|
||||
@@ -230,7 +199,7 @@ public class Utils {
|
||||
//идет по всем уровням файлов
|
||||
public static boolean validateProjectFile(File file, TextLog Log) {
|
||||
String name = file.getName();
|
||||
if (CommonUtils.ContainsCyrillic(name) || ContainsForbiddenName(name)) {
|
||||
if (CommonUtils.ContainsCyrillic(name) || CommonUtils.ContainsForbiddenName(name)) {
|
||||
Log.Writeln_(file.getAbsolutePath());
|
||||
return false;
|
||||
}
|
||||
@@ -253,29 +222,11 @@ public class Utils {
|
||||
validateProjectFolder_r(dir, files_list);
|
||||
if (!files_list.isEmpty())
|
||||
Log.Writeln_("Имена " + filesLines.length + " файлов/подпапок содержат запрещённые символы " +
|
||||
Constants.all_forbidden_characters_string +
|
||||
CommonUtils.printAllForbiddenCharacters() +
|
||||
"или кириллицу");
|
||||
//нужно проверить корень на наличие хоть одной программы.
|
||||
return Log.isEmpty();
|
||||
}
|
||||
public static void CopyToClipboard(String text) {
|
||||
Toolkit.getDefaultToolkit()
|
||||
.getSystemClipboard()
|
||||
.setContents(
|
||||
new StringSelection(text),
|
||||
null
|
||||
);
|
||||
}
|
||||
public static String getFromClipboard() {
|
||||
String res = "";
|
||||
try {
|
||||
res = (String) Toolkit.getDefaultToolkit()
|
||||
.getSystemClipboard().getData(DataFlavor.stringFlavor);
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
public static void delete_with_check(File file) throws Exception {
|
||||
int attempts = 0;
|
||||
while (attempts < 10) {
|
||||
@@ -315,7 +266,7 @@ public class Utils {
|
||||
} catch (Exception e) {
|
||||
// тут можно обработать ошибку
|
||||
// возникает она если в передаваемый алгоритм в getInstance(,,,) не существует
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
BigInteger bigInt = new BigInteger(1, digest);
|
||||
String md5Hex = bigInt.toString(16);
|
||||
@@ -346,21 +297,12 @@ public class Utils {
|
||||
} else return;
|
||||
if (file.exists()) {
|
||||
attempts++;
|
||||
Global.Log.Print("неудачная попытка удаления: файл " + CommonUtils.Brackets(file.getAbsolutePath()) + " занят");
|
||||
CommonUtils.MainLog.Print("неудачная попытка удаления: файл " + CommonUtils.Brackets(file.getAbsolutePath()) + " занят");
|
||||
Thread.sleep(2000);
|
||||
} else return;
|
||||
}
|
||||
throw new PassException("Не удалось удалить файл " + CommonUtils.Brackets(file.getAbsolutePath()) + " за " + attempts + " попыток");
|
||||
}
|
||||
public static byte[] packFile(File src) throws Exception {
|
||||
byte[] dst = Files.readAllBytes(src.toPath());
|
||||
return dst;
|
||||
}
|
||||
public static void unpackFile(byte[] bytes, File dst) throws Exception {
|
||||
FileOutputStream os = new FileOutputStream(dst);
|
||||
os.write(bytes);
|
||||
os.close();
|
||||
}
|
||||
public static Socket createClientSocket(InetAddress address, int port, int timeout) throws Exception {
|
||||
Socket socket = new Socket();
|
||||
socket.setSoTimeout(timeout);
|
||||
@@ -372,19 +314,6 @@ public class Utils {
|
||||
InputStream i = u.openStream();
|
||||
Files.copy(i, dst.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
public static boolean validateEmail(String address, TextLog log) {
|
||||
Matcher matcher = Constants.VALID_EMAIL_ADDRESS_REGEX.matcher(address);
|
||||
if (!matcher.find()) {
|
||||
log.Writeln_("введённый адрес электронной почты некорректен.");
|
||||
return false;
|
||||
}
|
||||
String match = address.substring(matcher.start(), matcher.end());
|
||||
if (!match.equals(address)) {
|
||||
log.Writeln_("введённый адрес электронной почты некорректен.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public static void getFilesByExtensions_r(File dir, Vector<File> res, String... extensions) {
|
||||
File[] files = dir.listFiles();
|
||||
if (files != null) {
|
||||
@@ -430,7 +359,7 @@ public class Utils {
|
||||
}
|
||||
public static File createScript(File scriptDirectory, File targetDirectory, String name, String scriptText) throws Exception {
|
||||
//->
|
||||
File scriptFile = Paths.get(scriptDirectory.getAbsolutePath(), name + (Global.isWindows ? ".bat" : "")).toFile();
|
||||
File scriptFile = Paths.get(scriptDirectory.getAbsolutePath(), name + (CommonUtils.isWindows ? ".bat" : "")).toFile();
|
||||
FileUtils.write(scriptFile, "cd " + CommonUtils.DQuotes(targetDirectory.getAbsolutePath()) + "\n" + scriptText);
|
||||
if (!scriptFile.setExecutable(true)) throw new PassException("Не удалось создать исполняемый файл для скрипта");
|
||||
return scriptFile;
|
||||
@@ -594,23 +523,6 @@ public class Utils {
|
||||
}
|
||||
return res;
|
||||
}
|
||||
public static String strikeThrough(String s) {
|
||||
StringBuilder res = new StringBuilder();
|
||||
for (char c : s.toCharArray()) {
|
||||
res.append(c);
|
||||
if (c != Constants.toStrike)
|
||||
res.append(Constants.toStrike);
|
||||
}
|
||||
return res.toString();
|
||||
}
|
||||
public static String noStrikeThrough(String s) {
|
||||
StringBuilder res = new StringBuilder();
|
||||
for (char c : s.toCharArray()) {
|
||||
if (c != (Constants.toStrike))
|
||||
res.append(c);
|
||||
}
|
||||
return res.toString();
|
||||
}
|
||||
public static void addEmptyLines(Vector<String> lines, int num) {
|
||||
IntStream.range(0, num).mapToObj(i -> "").forEach(lines::add);
|
||||
}
|
||||
@@ -657,8 +569,8 @@ public class Utils {
|
||||
public static void Kill(String PID, boolean force) {
|
||||
if (!PID.isEmpty()) {
|
||||
String killCommand =
|
||||
force ? Global.isWindows ? "taskkill /PID " + CommonUtils.DQuotes(PID) + " /F /T" : "kill -9 " + CommonUtils.DQuotes(PID) :
|
||||
Global.isWindows ? "taskkill /PID " + CommonUtils.DQuotes(PID) : "kill -2 " + CommonUtils.DQuotes(PID);
|
||||
force ? CommonUtils.isWindows ? "taskkill /PID " + CommonUtils.DQuotes(PID) + " /F /T" : "kill -9 " + CommonUtils.DQuotes(PID) :
|
||||
CommonUtils.isWindows ? "taskkill /PID " + CommonUtils.DQuotes(PID) : "kill -2 " + CommonUtils.DQuotes(PID);
|
||||
System.out.println(killCommand);
|
||||
try {
|
||||
Process killer = Utils.startScript(Global.TempDirectory, Global.TempDirectory, "killer", killCommand);
|
||||
@@ -782,7 +694,7 @@ public class Utils {
|
||||
try {
|
||||
if (p != null) res = Double.parseDouble(p);
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package Common_old.Utils.Validators;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import Common.Utils.TextLog;
|
||||
import Common_old.Utils.Utils;
|
||||
import org.fife.ui.rsyntaxtextarea.RSyntaxUtilities;
|
||||
public class PathValidator extends Validator {
|
||||
PathValidatorState state;
|
||||
@@ -39,7 +39,7 @@ public class PathValidator extends Validator {
|
||||
name.append(c);
|
||||
break;
|
||||
default:
|
||||
if (Utils.isForbidden(c))
|
||||
if (CommonUtils.isForbiddenCharacter(c))
|
||||
state = PathValidatorState.Forbidden;
|
||||
else name.append(c);
|
||||
break;
|
||||
@@ -54,7 +54,7 @@ public class PathValidator extends Validator {
|
||||
Log.Writeln(string_name + ": имя файла или каталога в пути имеет неверный формат");
|
||||
break;
|
||||
case Forbidden:
|
||||
Log.Writeln(string_name + ": Составляющие путь имена содержат запрещённые символы \n" + Constants.all_forbidden_characters_string);
|
||||
Log.Writeln(string_name + ": Составляющие путь имена содержат запрещённые символы \n" + CommonUtils.printAllForbiddenCharacters());
|
||||
break;
|
||||
case Name:
|
||||
if (spaces_count > 0)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package Common_old.Utils.Validators;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import _VisualDVM.Global;
|
||||
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.Vector;
|
||||
@@ -167,7 +166,7 @@ public class ShellParser {
|
||||
userName = userName_in;
|
||||
}
|
||||
public static void printChar() {
|
||||
if (c != Constants.boop) {
|
||||
if (c != CommonConstants.boop) {
|
||||
int code = c;
|
||||
if ((!return_active) || (c == '\n')) {
|
||||
System.out.print(c == '\r' ? ("\\r") :
|
||||
@@ -211,7 +210,7 @@ public class ShellParser {
|
||||
} else
|
||||
state = ShellParserState.End;
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
state = ShellParserState.End;
|
||||
}
|
||||
} while (!state.equals(ShellParserState.End));
|
||||
@@ -237,7 +236,7 @@ public class ShellParser {
|
||||
} else
|
||||
state = ShellParserState.End;
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
state = ShellParserState.End;
|
||||
}
|
||||
} while (!state.equals(ShellParserState.End));
|
||||
@@ -262,7 +261,7 @@ public class ShellParser {
|
||||
} else
|
||||
return;
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
return;
|
||||
}
|
||||
} while (!res.toString().contains(command));
|
||||
|
||||
@@ -78,7 +78,7 @@ public class CompilersDBTable extends iDBTable<Compiler> {
|
||||
//самое опасное место. теоретически тут можно ввести любую команду ОС, в том числе rm -rf
|
||||
if (call_command.contains(" "))
|
||||
Log.Writeln("Прямая команда вызова не может содержать пробелы");
|
||||
if (!call_command.contains("+")&&Utils.ContainsForbiddenName(call_command))
|
||||
if (!call_command.contains("+")&& CommonUtils.ContainsForbiddenName(call_command))
|
||||
Log.Writeln("Прямая команда вызова содержит запрещённые символы");
|
||||
else {
|
||||
if (Utils.isLinuxSystemCommand(call_command))
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package GlobalData;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.SQLITE.SQLiteDatabase;
|
||||
@@ -131,7 +132,7 @@ public class GlobalDatabase extends SQLiteDatabase {
|
||||
try {
|
||||
Global.db.Update((DBObject) Current.get(Current.Credentials));
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
//--
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package GlobalData.Module;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import GlobalData.Makefile.Makefile;
|
||||
@@ -31,7 +32,7 @@ public class Module extends ModuleAnchestor {
|
||||
try {
|
||||
Global.db.Update(this);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package GlobalData.RemoteFile.UI;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.UI.Windows.Dialog.Dialog;
|
||||
import GlobalData.RemoteFile.RemoteFile;
|
||||
@@ -30,7 +30,7 @@ public class RemoteFileChooser extends Dialog<String, RemoteFileChooserFields> {
|
||||
try {
|
||||
Refresh(session.user.connection.sftpChannel.pwd());
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
onCancel(); //закрываем окно.
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,7 @@ public class RemoteFileChooser extends Dialog<String, RemoteFileChooserFields> {
|
||||
fields.treeForm.Show();
|
||||
fields.lCurrentFolder.setText(path);
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
onCancel();
|
||||
}
|
||||
}
|
||||
@@ -76,7 +76,7 @@ public class RemoteFileChooser extends Dialog<String, RemoteFileChooserFields> {
|
||||
try {
|
||||
Refresh(session.user.connection.sftpChannel.getHome());
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
onCancel(); //закрываем окно.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class RunConfiguration extends iDBObject {
|
||||
try {
|
||||
dim = Integer.parseInt(dim_);
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
res.add(dim);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package GlobalData.Settings;
|
||||
import Common.Database.Tables.DBTable;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Utils.Utils;
|
||||
import Repository.Component.ComponentType;
|
||||
|
||||
@@ -43,7 +43,7 @@ public class SettingsDBTable extends DBTable<SettingName, DBSetting> {
|
||||
AddSetting(new DBSetting(SettingName.Kernels, Utils.getHalfKernels(), SettingType.IntField, ComponentType.Visualiser));
|
||||
AddSetting(new DBSetting(SettingName.AutoBugReportsLoad, 0, SettingType.SapforFlag, ComponentType.Visualiser, true));
|
||||
AddSetting(new DBSetting(SettingName.AutoTestsLoad, 0, SettingType.SapforFlag, ComponentType.Visualiser, true));
|
||||
if (Global.isWindows)
|
||||
if (CommonUtils.isWindows)
|
||||
AddSetting(new DBSetting(SettingName.LocalMakePathWindows, "C:\\MinGW\\msys\\1.0\\bin\\make.exe", SettingType.StringField, ComponentType.Visualiser));
|
||||
AddSetting(new DBSetting(SettingName.SmallScreen, 0, SettingType.SapforFlag, ComponentType.Visualiser));
|
||||
//совместимость. указываем явно чтобы не были видны в меню.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package GlobalData.Splitter;
|
||||
import Common.Database.Tables.DBTable;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.CommonUtils;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.lang.reflect.Field;
|
||||
@@ -32,7 +32,7 @@ public class SplittersDBTable extends DBTable<String, Splitter> {
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
public void Save(Object form) {
|
||||
@@ -44,7 +44,7 @@ public class SplittersDBTable extends DBTable<String, Splitter> {
|
||||
getDb().Update(splitter);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package GlobalData.Tasks.Passes;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import GlobalData.Tasks.Supervisor.TaskSupervisor;
|
||||
import Visual_DVM_2021.Passes.ProcessPass;
|
||||
public abstract class TaskLocalPass<S extends TaskSupervisor> extends ProcessPass {
|
||||
@@ -9,7 +9,7 @@ public abstract class TaskLocalPass<S extends TaskSupervisor> extends ProcessPas
|
||||
try {
|
||||
supervisor = s_class.newInstance();
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package GlobalData.Tasks.RunTask;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.StringTemplate;
|
||||
@@ -70,7 +71,7 @@ public class RunTask extends Task {
|
||||
try {
|
||||
Global.db.Update(this);
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,7 +90,7 @@ public class RunTask extends Task {
|
||||
try {
|
||||
if (p != null) CleanTime = Double.parseDouble(p);
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package GlobalData.Tasks.Supervisor.Local;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.Tasks.RunTask.RunTask;
|
||||
import GlobalData.Tasks.Supervisor.TaskSupervisor;
|
||||
@@ -44,7 +44,7 @@ public abstract class LocalTaskSupervisor<T extends Task> extends TaskSupervisor
|
||||
return Paths.get(task.getUser().getLocalProjectsDir().getAbsolutePath(), project.getUniqKey()).toFile();
|
||||
}
|
||||
protected File getBinary() {
|
||||
return Paths.get(getProjectCopy().getAbsolutePath(), "0" + (Global.isWindows ? ".exe" : "")).toFile();
|
||||
return Paths.get(getProjectCopy().getAbsolutePath(), "0" + (CommonUtils.isWindows ? ".exe" : "")).toFile();
|
||||
}
|
||||
protected File getProjectOutput() {
|
||||
return Paths.get(getProjectCopy().getAbsolutePath(), Constants.out_file).toFile();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package GlobalData.Tasks.Supervisor.Local.Windows;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.CommonUtils;
|
||||
import GlobalData.Tasks.Supervisor.Local.LocalTaskSupervisor;
|
||||
import GlobalData.Tasks.Task;
|
||||
import GlobalData.Tasks.TaskState;
|
||||
@@ -21,7 +21,7 @@ public abstract class WindowsLocalTaskSupervisor<T extends Task> extends LocalTa
|
||||
try {
|
||||
AbortTask();
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
task.state = TaskState.AbortedByTimeout;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public abstract class TaskSupervisor<T extends Task, P extends Pass_2021> {
|
||||
try {
|
||||
project.CleanInterruptFile();
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
protected void PrepareWorkspace() throws Exception {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package GlobalData.Tasks;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import Common.Database.Objects.iDBObject;
|
||||
import _VisualDVM.Global;
|
||||
@@ -94,7 +95,7 @@ public abstract class Task extends iDBObject {
|
||||
try {
|
||||
Global.db.Update(this);
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package ProjectData.Files;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.Utils.Utils;
|
||||
import ProjectData.GCOV.GCOV_info;
|
||||
import ProjectData.LanguageName;
|
||||
@@ -98,7 +97,7 @@ public class DBProjectFile extends ProjectFile {
|
||||
lastLine = line_in;
|
||||
father.db.Update(this);
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -293,7 +292,7 @@ public class DBProjectFile extends ProjectFile {
|
||||
father.db.Update(this);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -305,7 +304,7 @@ public class DBProjectFile extends ProjectFile {
|
||||
father.db.Update(this);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -317,7 +316,7 @@ public class DBProjectFile extends ProjectFile {
|
||||
father.db.Update(this);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package ProjectData.Files.UI.Editor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Editor.BaseEditor;
|
||||
@@ -149,7 +150,7 @@ public class SPFEditor extends BaseEditor implements SPFEditorInterface {
|
||||
painter
|
||||
));
|
||||
} catch (BadLocationException ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.Settings.SettingName;
|
||||
import ProjectData.SapforData.FileObject;
|
||||
import ProjectData.SapforData.FileObjectWithMessages;
|
||||
@@ -395,7 +394,7 @@ public class Message extends FileObject {
|
||||
}
|
||||
} while (idx != -1);
|
||||
if (sum != splited.length && !message.equals("")) {
|
||||
Utils.CopyToClipboard(message);
|
||||
CommonUtils.CopyToClipboard(message);
|
||||
throw new PassException("Ошибка при декодировании сообщений на русском языке\n" +
|
||||
"message=" + CommonUtils.Brackets(message));
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public void UpdatefgResistance(int resistance_in) {
|
||||
@@ -257,7 +257,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public void UpdatefgScreen(double screen_in) {
|
||||
@@ -265,7 +265,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public void UpdateCompilationMaxtime(int ct_in) {
|
||||
@@ -273,7 +273,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public void UpdateRunMaxtime(int rt_in) {
|
||||
@@ -281,7 +281,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
//</editor-fold>
|
||||
@@ -298,7 +298,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public void SwitchFilterMultiplied() {
|
||||
@@ -306,7 +306,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public boolean IsMCopy() {
|
||||
@@ -449,7 +449,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
public boolean UpdateLanguage(LanguageName lang_in) {
|
||||
@@ -540,7 +540,7 @@ public class db_project_info extends DBObject {
|
||||
db.Update(this);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -548,14 +548,14 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public void UpdateDVMCount() {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public boolean UpdateAddictedCount() {
|
||||
@@ -563,7 +563,7 @@ public class db_project_info extends DBObject {
|
||||
db.Update(this);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -697,7 +697,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
public mxGraphComponent DrawFunctionsGraph() {
|
||||
@@ -863,7 +863,7 @@ public class db_project_info extends DBObject {
|
||||
for (DBProjectFile file : parent.db.files.Data.values()) {
|
||||
Files.copy(file.file.toPath(),
|
||||
Paths.get(Home.getAbsolutePath(),
|
||||
Global.isWindows ? file.name :
|
||||
CommonUtils.isWindows ? file.name :
|
||||
file.name.replace('\\', '/')));
|
||||
}
|
||||
}
|
||||
@@ -1087,7 +1087,7 @@ public class db_project_info extends DBObject {
|
||||
for (DBProjectFile file : db.files.Data.values()) {
|
||||
File src_file = file.file;
|
||||
File dst_file = Paths.get(dst.getAbsolutePath(),
|
||||
Global.isWindows ? file.name :
|
||||
CommonUtils.isWindows ? file.name :
|
||||
file.name.replace('\\', '/')).toFile();
|
||||
Files.copy(src_file.toPath(), dst_file.toPath());
|
||||
}
|
||||
@@ -1232,7 +1232,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
for (ParallelRegion parallelRegion : parallelRegions.Data.values())
|
||||
parallelRegion.UpdateLoopsCount();
|
||||
@@ -1241,7 +1241,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
for (ParallelRegion parallelRegion : parallelRegions.Data.values())
|
||||
parallelRegion.UpdateFunctionsCount();
|
||||
@@ -1251,7 +1251,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
for (ParallelRegion parallelRegion : parallelRegions.Data.values())
|
||||
parallelRegion.UpdateArraysCount();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Repository.Component;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Utils.Utils;
|
||||
|
||||
import java.text.DateFormat;
|
||||
@@ -51,7 +51,7 @@ public class Instruction extends Component {
|
||||
DateFormat df = new SimpleDateFormat("MMM dd yyyy HH:mm:ss", Locale.ENGLISH);
|
||||
date_text = df.format(getFile().lastModified());
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package Repository.Component;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.CommonUtils;
|
||||
public abstract class OSDComponent extends Component {
|
||||
@Override
|
||||
public String getFileName() {
|
||||
return getComponentType().toString() + (Global.isWindows ? ".exe" : "");
|
||||
return getComponentType().toString() + (CommonUtils.isWindows ? ".exe" : "");
|
||||
}
|
||||
@Override
|
||||
public String getNewFileName() {
|
||||
return getComponentType().toString() + "_new" + (Global.isWindows ? ".exe" : "");
|
||||
return getComponentType().toString() + "_new" + (CommonUtils.isWindows ? ".exe" : "");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Repository.Component.Sapfor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
@@ -47,7 +47,7 @@ public class MessagesServer {
|
||||
if (serverSocket != null)
|
||||
serverSocket.close();
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public int getPort() {
|
||||
|
||||
@@ -138,7 +138,7 @@ public abstract class Sapfor extends OSDComponent {
|
||||
RunAnalysis("SPF_GetVersionAndBuildDate", -1, "", "");
|
||||
Visualizer_2.UnpackVersionInfo(this, getResult());
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
UI.Error("Не удалось получить версию компонента " + CommonUtils.DQuotes(getComponentType().getDescription()));
|
||||
}
|
||||
}
|
||||
@@ -455,7 +455,7 @@ public abstract class Sapfor extends OSDComponent {
|
||||
Utils.delete_with_check(outputFile);
|
||||
Utils.delete_with_check(errorsFile);
|
||||
//---
|
||||
File file = new File(data_workspace, name + (Global.isWindows ? ".bat" : ".sh"));
|
||||
File file = new File(data_workspace, name + (CommonUtils.isWindows ? ".bat" : ".sh"));
|
||||
FileUtils.write(file,
|
||||
CommonUtils.DQuotes(sapfor_drv)
|
||||
+ (flags.isEmpty() ? "" : (" " + flags))
|
||||
@@ -478,7 +478,7 @@ public abstract class Sapfor extends OSDComponent {
|
||||
exit_code = process.waitFor();
|
||||
flag = true;
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
Utils.sleep(1000);
|
||||
}
|
||||
}
|
||||
@@ -529,7 +529,7 @@ public abstract class Sapfor extends OSDComponent {
|
||||
public static File temp_copy = null;
|
||||
public static File getTempCopy(File src) throws Exception {
|
||||
if (temp_copy == null || !temp_copy.exists()) {
|
||||
temp_copy = Utils.getTempFileName("SAPFOR" + (Global.isWindows ? ".exe" : ""));
|
||||
temp_copy = Utils.getTempFileName("SAPFOR" + (CommonUtils.isWindows ? ".exe" : ""));
|
||||
FileUtils.copyFile(src, temp_copy);
|
||||
temp_copy.setExecutable(true);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Visualizer_2 extends OSDComponent {
|
||||
}
|
||||
@Override
|
||||
public String getHome() {
|
||||
return Global.Home;
|
||||
return CommonUtils.Home;
|
||||
}
|
||||
@Override
|
||||
public void GetVersionInfo() {
|
||||
@@ -48,7 +48,7 @@ public class Visualizer_2 extends OSDComponent {
|
||||
Command("get_version: ");
|
||||
UnpackVersionInfo(this, response);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public void refreshPid(){
|
||||
@@ -58,7 +58,7 @@ public class Visualizer_2 extends OSDComponent {
|
||||
PID = response;
|
||||
// UI.Info("SERVER PID = "+Utils.Brackets(PID));
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Repository;
|
||||
import Common_old.Utils.Utils;
|
||||
import Common.Utils.CommonUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.Serializable;
|
||||
@@ -18,6 +18,6 @@ public class EmailMessage implements Serializable {
|
||||
targets.addAll(targets_in);
|
||||
}
|
||||
public void addAttachement(File f) throws Exception {
|
||||
files.put(f.getName(), Utils.packFile(f));
|
||||
files.put(f.getName(), CommonUtils.fileToBytes(f));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
LinkedHashMap<String, File> innerFiles = new LinkedHashMap<>();
|
||||
for (String aName : message_in.files.keySet()) {
|
||||
File f = Utils.getTempFileName(aName);
|
||||
Utils.unpackFile(message_in.files.get(aName), f);
|
||||
CommonUtils.bytesToFile(message_in.files.get(aName), f);
|
||||
innerFiles.put(aName, f);
|
||||
}
|
||||
Vector<String> targets_ = new Vector<>(message_in.targets);
|
||||
@@ -223,7 +223,7 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
Print("Отправить клиенту файл по пути " + CommonUtils.Brackets(request.arg));
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
File file = new File(request.arg);
|
||||
response.object = file.exists() ? Utils.packFile(file) : null;
|
||||
response.object = file.exists() ? CommonUtils.fileToBytes(file) : null;
|
||||
break;
|
||||
case Email:
|
||||
Print("Отправка сообщения электронной почты");
|
||||
|
||||
@@ -101,7 +101,7 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
ZipFolderPass zip = new ZipFolderPass();
|
||||
File archives = new File(Utils.getDateName("Bugs"));
|
||||
if (zip.Do("Bugs", archives.getAbsolutePath())) {
|
||||
response.object = Utils.packFile(archives);
|
||||
response.object = CommonUtils.fileToBytes(archives);
|
||||
Print("Архив успешно запакован");
|
||||
} else throw new RepositoryRefuseException("Не удалось запаковать архивы");
|
||||
break;
|
||||
@@ -135,24 +135,24 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
case ReceiveBugReportsDatabase:
|
||||
Print("Получить базу данных баг репортов");
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
response.object = Utils.packFile(db.getFile());
|
||||
response.object = CommonUtils.fileToBytes(db.getFile());
|
||||
break;
|
||||
case ReceiveBugReport:
|
||||
Print("Скачать баг репорт по ключу " + request.arg);
|
||||
File bugArchive = Paths.get(Global.Home, "Bugs", request.arg).toFile();
|
||||
File bugArchive = Paths.get(CommonUtils.Home, "Bugs", request.arg).toFile();
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
response.object = Utils.packFile(bugArchive);
|
||||
response.object = CommonUtils.fileToBytes(bugArchive);
|
||||
break;
|
||||
case SendBugReport:
|
||||
Print("Отправить баг репорт " + request.arg);
|
||||
File bugArchive1 = Paths.get(Global.Home, "Bugs", request.arg).toFile();
|
||||
Utils.unpackFile((byte[]) request.object, bugArchive1);
|
||||
File bugArchive1 = Paths.get(CommonUtils.Home, "Bugs", request.arg).toFile();
|
||||
CommonUtils.bytesToFile((byte[]) request.object, bugArchive1);
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
break;
|
||||
//</editor-fold>
|
||||
case GetComponentsBackups:
|
||||
Print("Получить список сохраненных версий компонента " + request.arg);
|
||||
File backupsDirectory = Paths.get(Global.Home, "Components", request.arg, "Backups").toFile();
|
||||
File backupsDirectory = Paths.get(CommonUtils.Home, "Components", request.arg, "Backups").toFile();
|
||||
//--
|
||||
if (backupsDirectory.exists()) {
|
||||
File[] files = backupsDirectory.listFiles(File::isFile);
|
||||
@@ -182,9 +182,9 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
3
|
||||
);
|
||||
Print("Опубликовать компонент " + sComponentType);
|
||||
File componentFile = Paths.get(Global.Home, "Components", sComponentType, componentFileName).toFile();
|
||||
File versionFile = Paths.get(Global.Home, "Components", sComponentType, "version.txt").toFile();
|
||||
File backupsFolder = Paths.get(Global.Home, "Components", sComponentType, "Backups").toFile();
|
||||
File componentFile = Paths.get(CommonUtils.Home, "Components", sComponentType, componentFileName).toFile();
|
||||
File versionFile = Paths.get(CommonUtils.Home, "Components", sComponentType, "version.txt").toFile();
|
||||
File backupsFolder = Paths.get(CommonUtils.Home, "Components", sComponentType, "Backups").toFile();
|
||||
//0 архивация старой версии, если она есть.
|
||||
if (componentFile.exists()) {
|
||||
String versionText = "";
|
||||
@@ -200,11 +200,11 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
FileUtils.moveFile(componentFile, backupFile);
|
||||
}
|
||||
//1 распаковка компонента
|
||||
Utils.unpackFile((byte[]) request.object, componentFile);
|
||||
CommonUtils.bytesToFile((byte[]) request.object, componentFile);
|
||||
//2 запись версии компонента
|
||||
FileUtils.writeStringToFile(versionFile, sComponentVersion);
|
||||
//3 запись в журнал компонента
|
||||
File changesLog = Paths.get(Global.Home, "Components", sComponentType, "changes.txt").toFile();
|
||||
File changesLog = Paths.get(CommonUtils.Home, "Components", sComponentType, "changes.txt").toFile();
|
||||
FileWriter writer = new FileWriter(changesLog.getAbsolutePath(), true);
|
||||
BufferedWriter bufferWriter = new BufferedWriter(writer);
|
||||
bufferWriter.write(componentChangeRecord);
|
||||
@@ -217,11 +217,11 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
String sComponentType_ = packed_[0];
|
||||
String sComponentMinimalVersion = packed_[1];
|
||||
Print("Поднять минимальную версию компонента " + sComponentType_);
|
||||
File minimal_versionFile = Paths.get(Global.Home, "Components", sComponentType_, "minimal_version.txt").toFile();
|
||||
File minimal_versionFile = Paths.get(CommonUtils.Home, "Components", sComponentType_, "minimal_version.txt").toFile();
|
||||
FileUtils.writeStringToFile(minimal_versionFile, sComponentMinimalVersion);
|
||||
//-
|
||||
//3 запись в журнал компонента
|
||||
File changesLog_ = Paths.get(Global.Home, "Components", sComponentType_, "changes.txt").toFile();
|
||||
File changesLog_ = Paths.get(CommonUtils.Home, "Components", sComponentType_, "changes.txt").toFile();
|
||||
FileWriter writer_ = new FileWriter(changesLog_.getAbsolutePath(), true);
|
||||
BufferedWriter bufferWriter_ = new BufferedWriter(writer_);
|
||||
bufferWriter_.write("Минимальная версия поднята до " + sComponentMinimalVersion + "\n");
|
||||
@@ -233,10 +233,10 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
case ReceiveComponent:
|
||||
String[] packed1 = request.arg.split("\n");
|
||||
//тип/имя файла
|
||||
File componentFile1 = Paths.get(Global.Home, "Components", packed1[0], packed1[1]).toFile();
|
||||
File componentFile1 = Paths.get(CommonUtils.Home, "Components", packed1[0], packed1[1]).toFile();
|
||||
Print("Получить компонент " + packed1[0]);
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
response.object = Utils.packFile(componentFile1);
|
||||
response.object = CommonUtils.fileToBytes(componentFile1);
|
||||
break;
|
||||
default:
|
||||
throw new RepositoryRefuseException("Неподдерживаемый код: " + code);
|
||||
@@ -246,7 +246,7 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
LinkedHashMap<ComponentType, String> response_actual_versions_ = new LinkedHashMap<>();
|
||||
for (String sType : types) {
|
||||
ComponentType componentType = ComponentType.valueOf(sType);
|
||||
File vFile = Paths.get(Global.Home, "Components", sType, "version.txt").toFile();
|
||||
File vFile = Paths.get(CommonUtils.Home, "Components", sType, "version.txt").toFile();
|
||||
String v_string = CommonUtils.removeCharacters(
|
||||
Utils.ReadAllText(vFile),
|
||||
"\n", "\r"
|
||||
@@ -262,7 +262,7 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
LinkedHashMap<ComponentType, String> response_minimal_versions_ = new LinkedHashMap<>();
|
||||
for (String sType : types_) {
|
||||
ComponentType componentType = ComponentType.valueOf(sType);
|
||||
File vFile = Paths.get(Global.Home, "Components", sType, "minimal_version.txt").toFile();
|
||||
File vFile = Paths.get(CommonUtils.Home, "Components", sType, "minimal_version.txt").toFile();
|
||||
String mv_string = CommonUtils.removeCharacters(
|
||||
Utils.ReadAllText(vFile),
|
||||
"\n", "\r"
|
||||
@@ -275,7 +275,7 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
case GetComponentChangesLog:
|
||||
Print("Получить журнал изменений компонента " + request.arg);
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
response.object = Utils.packFile(Paths.get(Global.Home, "Components", request.arg, "changes.txt").toFile());
|
||||
response.object = CommonUtils.fileToBytes(Paths.get(CommonUtils.Home, "Components", request.arg, "changes.txt").toFile());
|
||||
break;
|
||||
case CheckURLRegistered:
|
||||
Print("Проверить учетную запись на машине");
|
||||
@@ -337,7 +337,7 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
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.packFile(resultArchive);
|
||||
response.object = CommonUtils.fileToBytes(resultArchive);
|
||||
} else
|
||||
throw new RepositoryRefuseException("Внутренняя ошибка. Не удалось запаковать версию");
|
||||
//--
|
||||
@@ -417,7 +417,7 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
//-------------------------------------
|
||||
Thread.sleep(60000);
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package Repository.Server;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Utils.Utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.Serializable;
|
||||
@@ -30,10 +29,10 @@ public class ServerExchangeUnit_2021 implements Serializable {
|
||||
}
|
||||
//--------
|
||||
public void Unpack() throws Exception {
|
||||
Utils.unpackFile((byte[]) object, new File(arg));
|
||||
CommonUtils.bytesToFile((byte[]) object, new File(arg));
|
||||
}
|
||||
public void Unpack(File file) throws Exception {
|
||||
Utils.unpackFile((byte[]) object, file);
|
||||
CommonUtils.bytesToFile((byte[]) object, file);
|
||||
}
|
||||
public void Print() {
|
||||
System.out.println("codeName=" + CommonUtils.Brackets(codeName));
|
||||
|
||||
@@ -3,7 +3,6 @@ import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.Windows.Dialog.DBObjectDialog;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.Account.AccountRole;
|
||||
import Repository.Subscribes.Subscriber;
|
||||
public class SubscriberForm extends DBObjectDialog<Subscriber, SubscriberFields> {
|
||||
@@ -22,7 +21,7 @@ public class SubscriberForm extends DBObjectDialog<Subscriber, SubscriberFields>
|
||||
public void validateFields() {
|
||||
if (fields.tfName.getText().isEmpty())
|
||||
Log.Writeln("Имя учётной записи не может быть пустым");
|
||||
Utils.validateEmail(fields.tfAddress.getText(), Log);
|
||||
CommonUtils.validateEmail(fields.tfAddress.getText(), Log);
|
||||
if (fields.tfAddress.getText().isEmpty())
|
||||
Log.Writeln_("Адрес электронной почты не может быть пустым");
|
||||
if (!title_text.equals("Регистрация") && (fields.tfAddress.isEditable() && Global.componentsServer.db.subscribers.Data.containsKey(fields.tfAddress.getText()))) {
|
||||
|
||||
@@ -33,7 +33,7 @@ public class MachineProcess extends DBObject {
|
||||
userName = p.user_name;
|
||||
userPassword = p.user_password;
|
||||
userWorkspace = p.user_workspace;
|
||||
testingSystemRoot = Global.Home;
|
||||
testingSystemRoot = CommonUtils.Home;
|
||||
serverName = Global.testingServer.name;
|
||||
id = Utils.getDateName(machineAddress + "_" + machinePort + "_" + userName);
|
||||
}
|
||||
@@ -86,7 +86,7 @@ public class MachineProcess extends DBObject {
|
||||
InetAddress localAddress = InetAddress.getByName(Global.properties.ServerAddress);
|
||||
local = localAddress.getHostAddress().equals(address.getHostAddress());
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
return local;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public class MachineProcess extends DBObject {
|
||||
File workspace = getWorkspace();
|
||||
Utils.CheckAndCleanDirectory(workspace);
|
||||
//копирование визуализатора
|
||||
File src = new File(Global.Home, "TestingSystem.jar");
|
||||
File src = new File(CommonUtils.Home, "TestingSystem.jar");
|
||||
File supervisor = new File(workspace, "VisualSapfor.jar");
|
||||
FileUtils.copyFile(src, supervisor);
|
||||
//создание настроек
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package TestingSystem.Common.Test;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Database.Objects.riDBObject;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Utils;
|
||||
import ProjectData.Files.FileState;
|
||||
import ProjectData.Files.FileType;
|
||||
import ProjectData.Files.ProjectFile;
|
||||
@@ -94,7 +94,7 @@ public class Test extends riDBObject {
|
||||
if (testArchive.exists())
|
||||
FileUtils.forceDelete(testArchive);
|
||||
//--
|
||||
Utils.unpackFile(project_archive_bytes, tmpArchive); // распаковка байтов.
|
||||
CommonUtils.bytesToFile(project_archive_bytes, tmpArchive); // распаковка байтов.
|
||||
//--
|
||||
UnzipFolderPass unzipFolderPass = new UnzipFolderPass();
|
||||
if (!unzipFolderPass.Do(
|
||||
|
||||
@@ -188,7 +188,7 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
|
||||
//---
|
||||
public TestingPlanner(){}
|
||||
public TestingPlanner(String... args) {
|
||||
Global.isWindows = System.getProperty("os.name").startsWith("Windows");
|
||||
CommonUtils.isWindows = System.getProperty("os.name").startsWith("Windows");
|
||||
//---
|
||||
String machineAddress = args[0];
|
||||
int machinePort = Integer.parseInt(args[1]);
|
||||
@@ -197,9 +197,9 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
|
||||
String userWorkspace = args[4];
|
||||
String testingSystemRoot = args[5];
|
||||
serverName = args[6];
|
||||
supervisorHome = new File(Global.Home); //при инициализации это текущая папка.
|
||||
supervisorHome = new File(CommonUtils.Home); //при инициализации это текущая папка.
|
||||
//---
|
||||
Global.Log = new Loggable() {
|
||||
CommonUtils.MainLog = new Loggable() {
|
||||
@Override
|
||||
public String getLogHomePath() {
|
||||
return supervisorHome.getAbsolutePath();
|
||||
@@ -209,9 +209,9 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
|
||||
return Current.mode.toString();
|
||||
}
|
||||
};
|
||||
Global.Log.ClearLog();
|
||||
CommonUtils.MainLog.ClearLog();
|
||||
//--
|
||||
Global.Home = testingSystemRoot;
|
||||
CommonUtils.Home = testingSystemRoot;
|
||||
Global.CheckTestingSystemDirectories();
|
||||
//---
|
||||
machine = new Machine(machineAddress, machineAddress, machinePort, MachineType.Server);
|
||||
@@ -222,7 +222,7 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
|
||||
Print("userName=" + CommonUtils.Brackets(userName));
|
||||
Print("userPassword=" + CommonUtils.Brackets(userPassword));
|
||||
Print("userWorkspace=" + CommonUtils.Brackets(userWorkspace));
|
||||
Print("root=" + CommonUtils.Brackets(Global.Home));
|
||||
Print("root=" + CommonUtils.Brackets(CommonUtils.Home));
|
||||
Print("serverName=" + serverName);
|
||||
Print("=====");
|
||||
//----
|
||||
|
||||
@@ -192,14 +192,14 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
test_id = Integer.parseInt(request.arg);
|
||||
if (db.tests.containsKey(test_id)) {
|
||||
test = db.tests.get(test_id);
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK, "", Utils.packFile(test.getArchive()));
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK, "", CommonUtils.fileToBytes(test.getArchive()));
|
||||
} else
|
||||
throw new RepositoryRefuseException("Теста с именем " + request.arg + " не существует");
|
||||
break;
|
||||
case ReceiveTestsDatabase:
|
||||
Print("Получить базу данных тестов");
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
response.object = Utils.packFile(db.getFile());
|
||||
response.object = CommonUtils.fileToBytes(db.getFile());
|
||||
break;
|
||||
//---
|
||||
case RefreshDVMTests:
|
||||
@@ -422,7 +422,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
File workspace = dvmPackage.getLocalWorkspace();
|
||||
File results_zip = new File(workspace, "results.zip");
|
||||
File package_json = dvmPackage.getJsonFile();
|
||||
response.object = new Pair(Utils.packFile(results_zip), Utils.packFile(package_json));
|
||||
response.object = new Pair(CommonUtils.fileToBytes(results_zip), CommonUtils.fileToBytes(package_json));
|
||||
}
|
||||
private void DownloadDVMPackages() throws Exception {
|
||||
Vector<Integer> ids = (Vector<Integer>) request.object;
|
||||
@@ -434,7 +434,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
File workspace = dvmPackage.getLocalWorkspace();
|
||||
File results_zip = new File(workspace, "results.zip");
|
||||
File package_json = dvmPackage.getJsonFile();
|
||||
res.add(new Pair<>(dvmPackage_id, new Pair(Utils.packFile(results_zip), Utils.packFile(package_json))));
|
||||
res.add(new Pair<>(dvmPackage_id, new Pair(CommonUtils.fileToBytes(results_zip), CommonUtils.fileToBytes(package_json))));
|
||||
}
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
response.object = res;
|
||||
@@ -450,7 +450,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
||||
ZipFolderPass zipFolderPass = new ZipFolderPass();
|
||||
zipFolderPass.Do(workspace.getAbsolutePath(), results_zip.getAbsolutePath());
|
||||
if (results_zip.exists())
|
||||
response.object = Utils.packFile(results_zip);
|
||||
response.object = CommonUtils.fileToBytes(results_zip);
|
||||
else
|
||||
throw new RepositoryRefuseException("Не удалось заархивировать пакет тестирования SAPFOR с ключом " + sapforPackage_id);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package TestingSystem.Common.ThreadsPlanner;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.InterruptThread;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
@@ -12,7 +12,7 @@ public abstract class ThreadsPlanner {
|
||||
try {
|
||||
Interrupt();
|
||||
} catch (Exception exception) {
|
||||
Global.Log.PrintException(exception);
|
||||
CommonUtils.MainLog.PrintException(exception);
|
||||
}
|
||||
System.exit(0);
|
||||
return null;
|
||||
@@ -51,20 +51,20 @@ public abstract class ThreadsPlanner {
|
||||
}
|
||||
//--
|
||||
public void Start() {
|
||||
Global.Log.Print("Planner started");
|
||||
CommonUtils.MainLog.Print("Planner started");
|
||||
try {
|
||||
//--
|
||||
while (!waitingThreads.isEmpty() || !activeThreads.isEmpty()) {
|
||||
Global.Log.Print(getThreadsSummary());
|
||||
CommonUtils.MainLog.Print(getThreadsSummary());
|
||||
checkActiveThreads();
|
||||
tryStartThreads();
|
||||
Thread.sleep(wait_ms);
|
||||
}
|
||||
//--
|
||||
} catch (Exception exception) {
|
||||
Global.Log.PrintException(exception);
|
||||
CommonUtils.MainLog.PrintException(exception);
|
||||
} finally {
|
||||
Global.Log.Print("Planner finished");
|
||||
CommonUtils.MainLog.Print("Planner finished");
|
||||
finalize();
|
||||
}
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public abstract class ThreadsPlanner {
|
||||
activeThreads.removeAll(toExclude);
|
||||
//--
|
||||
double progress = ((double)done_threads/threads.size())*100.0;
|
||||
Global.Log.Print("done_threads="+done_threads+";all_threads="+threads.size()+";progress="+progress);
|
||||
CommonUtils.MainLog.Print("done_threads="+done_threads+";all_threads="+threads.size()+";progress="+progress);
|
||||
File progress_file = new File("progress");
|
||||
try {
|
||||
FileUtils.writeStringToFile(progress_file, String.valueOf(((int)progress)));
|
||||
|
||||
@@ -111,7 +111,7 @@ public abstract class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
|
||||
try {
|
||||
if (isPrintOn()) {
|
||||
System.out.println(message);
|
||||
Global.Log.Print(message);
|
||||
CommonUtils.MainLog.Print(message);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
|
||||
@@ -2,8 +2,6 @@ package TestingSystem.DVM;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import Common_old.UI.UI;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.Machine.Machine;
|
||||
import GlobalData.RemoteFile.RemoteFile;
|
||||
@@ -58,35 +56,35 @@ public class UserConnection {
|
||||
try {
|
||||
in.close();
|
||||
} catch (Exception exception) {
|
||||
Global.Log.PrintException(exception);
|
||||
CommonUtils.MainLog.PrintException(exception);
|
||||
}
|
||||
}
|
||||
if (out != null) {
|
||||
try {
|
||||
out.close();
|
||||
} catch (Exception exception) {
|
||||
Global.Log.PrintException(exception);
|
||||
CommonUtils.MainLog.PrintException(exception);
|
||||
}
|
||||
}
|
||||
if (pin != null) {
|
||||
try {
|
||||
pin.close();
|
||||
} catch (Exception exception) {
|
||||
Global.Log.PrintException(exception);
|
||||
CommonUtils.MainLog.PrintException(exception);
|
||||
}
|
||||
}
|
||||
if (pout != null) {
|
||||
try {
|
||||
pout.close();
|
||||
} catch (Exception exception) {
|
||||
Global.Log.PrintException(exception);
|
||||
CommonUtils.MainLog.PrintException(exception);
|
||||
}
|
||||
}
|
||||
if (fromServer != null) {
|
||||
try {
|
||||
fromServer.close();
|
||||
} catch (Exception exception) {
|
||||
Global.Log.PrintException(exception);
|
||||
CommonUtils.MainLog.PrintException(exception);
|
||||
}
|
||||
}
|
||||
if (sftpChannel != null) sftpChannel.disconnect();
|
||||
@@ -439,35 +437,35 @@ public class UserConnection {
|
||||
try {
|
||||
in.close();
|
||||
} catch (Exception exception) {
|
||||
Global.Log.PrintException(exception);
|
||||
CommonUtils.MainLog.PrintException(exception);
|
||||
}
|
||||
}
|
||||
if (out != null) {
|
||||
try {
|
||||
out.close();
|
||||
} catch (Exception exception) {
|
||||
Global.Log.PrintException(exception);
|
||||
CommonUtils.MainLog.PrintException(exception);
|
||||
}
|
||||
}
|
||||
if (pin != null) {
|
||||
try {
|
||||
pin.close();
|
||||
} catch (Exception exception) {
|
||||
Global.Log.PrintException(exception);
|
||||
CommonUtils.MainLog.PrintException(exception);
|
||||
}
|
||||
}
|
||||
if (pout != null) {
|
||||
try {
|
||||
pout.close();
|
||||
} catch (Exception exception) {
|
||||
Global.Log.PrintException(exception);
|
||||
CommonUtils.MainLog.PrintException(exception);
|
||||
}
|
||||
}
|
||||
if (fromServer != null) {
|
||||
try {
|
||||
fromServer.close();
|
||||
} catch (Exception exception) {
|
||||
Global.Log.PrintException(exception);
|
||||
CommonUtils.MainLog.PrintException(exception);
|
||||
}
|
||||
}
|
||||
if (shellChannel != null) shellChannel.disconnect();
|
||||
|
||||
@@ -2,7 +2,6 @@ package TestingSystem.SAPFOR.Json;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.Utils.Utils;
|
||||
import ProjectData.Files.DBProjectFile;
|
||||
import ProjectData.Files.FileType;
|
||||
@@ -56,7 +55,7 @@ public class SapforVersion_json implements Serializable {
|
||||
state = SapforVersionState.Empty;
|
||||
comparisonState = VersionComparisonState.Unknown;
|
||||
//--
|
||||
String relativePath = Global.isWindows ? CommonUtils.toW(version) : version;
|
||||
String relativePath = CommonUtils.isWindows ? CommonUtils.toW(version) : version;
|
||||
Home = Paths.get(configurationRoot.getAbsolutePath(), relativePath).toFile();
|
||||
files = new LinkedHashMap<>();
|
||||
//--
|
||||
@@ -252,7 +251,7 @@ public class SapforVersion_json implements Serializable {
|
||||
//--
|
||||
public void createProject(File rootHome) throws Exception {
|
||||
project = null;
|
||||
String version_ = Global.isWindows ? CommonUtils.toW(version) : CommonUtils.toU(version);
|
||||
String version_ = CommonUtils.isWindows ? CommonUtils.toW(version) : CommonUtils.toU(version);
|
||||
project = new db_project_info();
|
||||
project.Home = Paths.get(rootHome.getAbsolutePath(), version_).toFile();
|
||||
project.name = project.Home.getName();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package TestingSystem.SAPFOR;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.Utils.Utils;
|
||||
import TestingSystem.Common.TaskThread;
|
||||
import TestingSystem.Common.ThreadsPlanner.ThreadsPlanner;
|
||||
@@ -20,7 +19,7 @@ public class PackageModeSupervisor extends ThreadsPlanner {
|
||||
package_json = (SapforPackage_json) CommonUtils.jsonFromFile(new File(Constants.package_json), SapforPackage_json.class);
|
||||
//--
|
||||
File sapfor_src = new File(package_json.sapfor_drv);
|
||||
sapfor_drv = new File(Global.Home, Utils.getDateName("SAPFOR_F"));
|
||||
sapfor_drv = new File(CommonUtils.Home, Utils.getDateName("SAPFOR_F"));
|
||||
FileUtils.copyFile(sapfor_src, sapfor_drv);
|
||||
if (!sapfor_drv.setExecutable(true))
|
||||
throw new Exception("Не удалось сделать файл " + sapfor_drv.getName() + " исполняемым!");
|
||||
@@ -50,7 +49,7 @@ public class PackageModeSupervisor extends ThreadsPlanner {
|
||||
//--
|
||||
//Очистка
|
||||
//очистка служебных файлов.
|
||||
Utils.deleteFilesByExtensions(new File(Global.Home),
|
||||
Utils.deleteFilesByExtensions(new File(CommonUtils.Home),
|
||||
"proj", "dep", "jar"
|
||||
// ,"sh", "exe", "bat"
|
||||
);
|
||||
@@ -58,7 +57,7 @@ public class PackageModeSupervisor extends ThreadsPlanner {
|
||||
if (sapfor_drv.exists())
|
||||
FileUtils.forceDelete(sapfor_drv);
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package TestingSystem.SAPFOR;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.Tasks.TaskState;
|
||||
import Repository.Component.Sapfor.Sapfor;
|
||||
@@ -42,11 +41,11 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
|
||||
//--
|
||||
version_json = null;
|
||||
//--->>
|
||||
parentTask = Paths.get(Global.Home,
|
||||
parentTask = Paths.get(CommonUtils.Home,
|
||||
String.valueOf(target.set_id),
|
||||
String.valueOf(target.sapfor_configuration_id),
|
||||
target.test_description).toFile();
|
||||
root = Paths.get(Global.Home, String.valueOf(target.set_id), String.valueOf(target.sapfor_configuration_id)).toFile();
|
||||
root = Paths.get(CommonUtils.Home, String.valueOf(target.set_id), String.valueOf(target.sapfor_configuration_id)).toFile();
|
||||
task = null;
|
||||
//--->>
|
||||
return true;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package TestingSystem.SAPFOR.SapforTasksPackage.UI;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.CommonUtils;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
@@ -7,7 +7,7 @@ public abstract class SapforPackageTreeNode extends DefaultMutableTreeNode {
|
||||
public ImageIcon getIcon() {
|
||||
ImageIcon res = new ImageIcon((getClass().getResource("/icons/versions/" + getImageKey() + ".png")));
|
||||
if (res==null) {
|
||||
Global.Log.Print("/icons/versions/" + getImageKey() + ".png=NULL");
|
||||
CommonUtils.MainLog.Print("/icons/versions/" + getImageKey() + ".png=NULL");
|
||||
// res= new ImageIcon((getClass().getResource("/icons/versions/Version.png")));
|
||||
}
|
||||
return (getImageKey() != null) ? res : null;
|
||||
|
||||
@@ -40,8 +40,8 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
File repo_err;
|
||||
//--
|
||||
public SapforTestingPlanner() {
|
||||
repo = new File(Global.Home, "Repo");
|
||||
repoSapforHome = Paths.get(Global.Home, "Repo", Constants.SAPFOR_REPOSITORY_BIN).toFile();
|
||||
repo = new File(CommonUtils.Home, "Repo");
|
||||
repoSapforHome = Paths.get(CommonUtils.Home, "Repo", Constants.SAPFOR_REPOSITORY_BIN).toFile();
|
||||
repo_bin = new File(repoSapforHome, "Sapfor_F");
|
||||
repo_out = new File(repoSapforHome, Constants.out_file);
|
||||
repo_err = new File(repoSapforHome, Constants.err_file);
|
||||
@@ -91,7 +91,7 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
protected void PackageWorkspaceCreation() throws Exception {
|
||||
//копирование визуализатора
|
||||
File visualiser = new File(workspace, "VisualSapfor.jar");
|
||||
FileUtils.copyFile(new File(Global.Home, "TestingSystem.jar"), visualiser);
|
||||
FileUtils.copyFile(new File(CommonUtils.Home, "TestingSystem.jar"), visualiser);
|
||||
//создание настроек
|
||||
GlobalProperties properties = new GlobalProperties(Global.properties);
|
||||
properties.Mode = Current.Mode.Package;
|
||||
|
||||
@@ -71,7 +71,7 @@ public class AddBugReport extends AddObjectPass<BugReport> {
|
||||
//логи во вложения.
|
||||
File attachementsDir = Current.getProject().getAttachmentsDirectory();
|
||||
Vector<File> logs = new Vector<>();
|
||||
logs.add(Global.Log.getLogFile());
|
||||
logs.add(CommonUtils.MainLog.getLogFile());
|
||||
logs.add(Paths.get(Global.ComponentsDirectory.getAbsolutePath(), "Sapfor_log.txt").toFile());
|
||||
logs.add(Paths.get(Global.ComponentsDirectory.getAbsolutePath(), "Server_log.txt").toFile());
|
||||
logs.add(Global.Components.get(ComponentType.Visualizer_2).getLogFile());
|
||||
|
||||
@@ -29,10 +29,10 @@ public class AddFile extends ChangeFilePass<DBProjectFile> {
|
||||
Log.Writeln_("Имя файла " + CommonUtils.Brackets(fileName) + " содержит кириллицу.");
|
||||
return false;
|
||||
}
|
||||
if (Utils.ContainsForbiddenName(fileName)) {
|
||||
if (CommonUtils.ContainsForbiddenName(fileName)) {
|
||||
Log.Writeln_("Имя файла " + CommonUtils.Brackets(fileName)
|
||||
+ " содержит запрещенные символы." +
|
||||
"\n" + Constants.all_forbidden_characters_string);
|
||||
"\n" + CommonUtils.printAllForbiddenCharacters());
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -2,7 +2,6 @@ package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Utils;
|
||||
import Repository.BugReport.BugReport;
|
||||
import Repository.BugReport.BugReportInterface;
|
||||
import Repository.EmailMessage;
|
||||
@@ -50,7 +49,7 @@ public class AppendBugReportField extends ComponentsRepositoryPass<BugReport> {
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.GetObjectCopyByPK, "", new Pair<>(BugReport.class, target.id)));
|
||||
target.SynchronizeFields((BugReport) response.object);
|
||||
oldValue = (String) BugReport.class.getField(fieldName).get(target);
|
||||
newValue = oldValue + "\n" + CommonUtils.Brackets(Utils.print_date(
|
||||
newValue = oldValue + "\n" + CommonUtils.Brackets(CommonUtils.print_date(
|
||||
new Date())) + " " + Current.getAccount().name
|
||||
+ " : " + addition;
|
||||
//2. дописываем нужное поле.
|
||||
|
||||
@@ -40,7 +40,7 @@ public class CloseCurrentProject extends Pass_2021<db_project_info> {
|
||||
Global.files_multiselection = false;
|
||||
//--
|
||||
Current.getSapfor().ResetAllAnalyses();
|
||||
Current.getSapfor().cd(new File(Global.Home));
|
||||
Current.getSapfor().cd(new File(CommonUtils.Home));
|
||||
Current.set(Current.Project, null);
|
||||
Current.set(Current.File, null);
|
||||
Current.set(Current.Function, null);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import ProjectData.Project.db_project_info;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
@@ -17,7 +17,7 @@ public class CloseProject extends Pass_2021<db_project_info> {
|
||||
@Override
|
||||
protected void performDone() throws Exception {
|
||||
Current.getSapfor().ResetAllAnalyses();
|
||||
Current.getSapfor().cd(new File(Global.Home));
|
||||
Current.getSapfor().cd(new File(CommonUtils.Home));
|
||||
Current.set(Current.Project, null);
|
||||
//-
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class CombineFiles extends Transformation {
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
result = Paths.get(target.last_version.Home.getAbsolutePath(),
|
||||
Global.isWindows ? fd.Result : CommonUtils.toU(fd.Result)).toFile();
|
||||
CommonUtils.isWindows ? fd.Result : CommonUtils.toU(fd.Result)).toFile();
|
||||
//-----------------------
|
||||
//получить список хедеров.
|
||||
//-----------------------
|
||||
|
||||
@@ -65,7 +65,7 @@ public class Compile extends Pass_2021<db_project_info> {
|
||||
|
||||
switch (Current.getMachine().type) {
|
||||
case Local:
|
||||
if (Global.isWindows) {
|
||||
if (CommonUtils.isWindows) {
|
||||
subpass = passes.get(PassCode_2021.WindowsLocalCompilation);
|
||||
} else
|
||||
subpass = passes.get(PassCode_2021.LinuxLocalCompilation);
|
||||
|
||||
@@ -43,7 +43,9 @@ public class CreateGroupFromDirectory extends PublishTests {
|
||||
return false;
|
||||
}
|
||||
if (!Utils.validateProjectFile(dir, Log)) {
|
||||
Log.Writeln_("Имя папки " + CommonUtils.Brackets(dir.getName()) + " содержит запрещённые символы " + Constants.all_forbidden_characters_string + ", или кириллицу.");
|
||||
Log.Writeln_("Имя папки " + CommonUtils.Brackets(dir.getName())
|
||||
+ " содержит запрещённые символы " +
|
||||
CommonUtils.printAllForbiddenCharacters() + ", или кириллицу.");
|
||||
return false;
|
||||
}
|
||||
//--
|
||||
|
||||
@@ -39,7 +39,9 @@ public class CreateGroupFromFiles extends PublishTests{
|
||||
return false;
|
||||
}
|
||||
if (!Utils.validateProjectFile(dir, Log)) {
|
||||
Log.Writeln_("Имя папки " + CommonUtils.Brackets(dir.getName()) + " содержит запрещённые символы " + Constants.all_forbidden_characters_string + ", или кириллицу.");
|
||||
Log.Writeln_("Имя папки " + CommonUtils.Brackets(dir.getName())
|
||||
+ " содержит запрещённые символы "
|
||||
+ CommonUtils.printAllForbiddenCharacters() + ", или кириллицу.");
|
||||
return false;
|
||||
}
|
||||
if (passes.get(PassCode_2021.PublishGroup).Do(dir.getName().toUpperCase())) {
|
||||
|
||||
@@ -94,8 +94,10 @@ public class CreateTestFromDirectory extends Pass_2021<Test> {
|
||||
return false;
|
||||
}
|
||||
//--
|
||||
if (CommonUtils.ContainsCyrillic(dir.getName()) || Utils.ContainsForbiddenName(dir.getName())) {
|
||||
Log.Writeln_("Имя папки " + CommonUtils.Brackets(dir.getName()) + " содержит запрещённые символы " + Constants.all_forbidden_characters_string + ", или кириллицу.");
|
||||
if (CommonUtils.ContainsCyrillic(dir.getName()) || CommonUtils.ContainsForbiddenName(dir.getName())) {
|
||||
Log.Writeln_("Имя папки " + CommonUtils.Brackets(dir.getName())
|
||||
+ " содержит запрещённые символы "
|
||||
+ CommonUtils.printAllForbiddenCharacters() + ", или кириллицу.");
|
||||
return false;
|
||||
}
|
||||
//--
|
||||
@@ -114,7 +116,7 @@ public class CreateTestFromDirectory extends Pass_2021<Test> {
|
||||
!Utils.isVersion(file)) {
|
||||
subdirs++;
|
||||
}
|
||||
} else if (file.isFile() && !CommonUtils.ContainsCyrillic(file.getName()) && !Utils.ContainsForbiddenName(file.getName())) {
|
||||
} else if (file.isFile() && !CommonUtils.ContainsCyrillic(file.getName()) && !CommonUtils.ContainsForbiddenName(file.getName())) {
|
||||
//если файл. все недопустимые файлы просто игнорируются.
|
||||
ProjectFile projectFile = new ProjectFile(file);
|
||||
if (isNotExcluded(projectFile)) {
|
||||
@@ -187,7 +189,7 @@ public class CreateTestFromDirectory extends Pass_2021<Test> {
|
||||
//--
|
||||
ZipFolderPass zip = new ZipFolderPass();
|
||||
if (zip.Do(tempProject.getAbsolutePath(), tempArchive.getAbsolutePath())) {
|
||||
target.project_archive_bytes = Utils.packFile(tempArchive);
|
||||
target.project_archive_bytes = CommonUtils.fileToBytes(tempArchive);
|
||||
} else throw new PassException("Не удалось создать архив папки с кодом.");
|
||||
return tempProject;
|
||||
}
|
||||
|
||||
@@ -37,8 +37,10 @@ public class CreateTestFromFile extends Pass_2021<Test> {
|
||||
File file_in = (File) args[0];
|
||||
group = (Group) args[1];
|
||||
//--
|
||||
if (CommonUtils.ContainsCyrillic(file_in.getName()) || Utils.ContainsForbiddenName(file_in.getName())) {
|
||||
Log.Writeln_("Имя файла " + CommonUtils.Brackets(file_in.getName()) + " содержит запрещённые символы " + Constants.all_forbidden_characters_string + ", или кириллицу.");
|
||||
if (CommonUtils.ContainsCyrillic(file_in.getName()) || CommonUtils.ContainsForbiddenName(file_in.getName())) {
|
||||
Log.Writeln_("Имя файла " + CommonUtils.Brackets(file_in.getName())
|
||||
+ " содержит запрещённые символы " +
|
||||
CommonUtils.printAllForbiddenCharacters() + ", или кириллицу.");
|
||||
return false;
|
||||
}
|
||||
//--
|
||||
@@ -72,7 +74,7 @@ public class CreateTestFromFile extends Pass_2021<Test> {
|
||||
//--
|
||||
ZipFolderPass zip = new ZipFolderPass();
|
||||
if (zip.Do(tempProject.getAbsolutePath(), tempArchive.getAbsolutePath())) {
|
||||
target.project_archive_bytes = Utils.packFile(tempArchive);
|
||||
target.project_archive_bytes = CommonUtils.fileToBytes(tempArchive);
|
||||
} else throw new PassException("Не удалось создать архив папки с кодом.");
|
||||
return tempProject;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ public class DVMConvertProject extends ComponentsRepositoryPass<db_project_info>
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
ServerExchangeUnit_2021 unit = new ServerExchangeUnit_2021(ServerCode.DVMConvertProject);
|
||||
unit.object = Utils.packFile(archive);
|
||||
unit.object = CommonUtils.fileToBytes(archive);
|
||||
Vector<String> unit_args = new Vector<>();
|
||||
unit_args.add(target.name);
|
||||
unit_args.add(target.languageName.toString());
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.Utils.Utils;
|
||||
import Repository.BugReport.BugReport;
|
||||
@@ -21,7 +22,7 @@ public class DownloadBugReport extends ComponentsRepositoryPass<BugReport> {
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.ReceiveBugReport, target.id));
|
||||
Utils.unpackFile((byte[]) response.object, BugReportInterface.getArchiveFile(target));
|
||||
CommonUtils.bytesToFile((byte[]) response.object, BugReportInterface.getArchiveFile(target));
|
||||
}
|
||||
@Override
|
||||
protected boolean validate() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.Utils.Utils;
|
||||
import Repository.Component.Component;
|
||||
import Repository.Server.ServerCode;
|
||||
import Repository.Server.ServerExchangeUnit_2021;
|
||||
@@ -11,6 +11,6 @@ public class DownloadComponent extends ComponentsRepositoryPass<Component> {
|
||||
target = Current.getComponent();
|
||||
String packed = target.getComponentType()+"\n"+target.getFileName();
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.ReceiveComponent, packed));
|
||||
Utils.unpackFile((byte[]) response.object, target.getNewFile());
|
||||
CommonUtils.bytesToFile((byte[]) response.object, target.getNewFile());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.Utils.Utils;
|
||||
@@ -66,8 +67,8 @@ public class DownloadDVMPackages extends Pass_2021<Vector<Integer>> {
|
||||
File loaded = new File(workspace, Constants.LOADED);
|
||||
Pair<byte[], byte[]> packed_package = p.getValue();
|
||||
//---
|
||||
Utils.unpackFile(packed_package.getKey(), results_zip);
|
||||
Utils.unpackFile(packed_package.getValue(), dvmPackage.getJsonFile());
|
||||
CommonUtils.bytesToFile(packed_package.getKey(), results_zip);
|
||||
CommonUtils.bytesToFile(packed_package.getValue(), dvmPackage.getJsonFile());
|
||||
passes.get(PassCode_2021.UnzipFolderPass).Do(results_zip.getAbsolutePath(), workspace.getAbsolutePath());
|
||||
FileUtils.writeStringToFile(loaded, new Date().toString());
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Constants;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.Utils.Utils;
|
||||
@@ -49,7 +50,7 @@ public class DownloadSapforPackage extends Pass_2021<SapforPackage> {
|
||||
File workspace = target.getLocalWorkspace();
|
||||
Utils.forceDeleteWithCheck(workspace);
|
||||
File archive = Utils.getTempFileName(String.valueOf(target.id));
|
||||
Utils.unpackFile(packed,archive);
|
||||
CommonUtils.bytesToFile(packed,archive);
|
||||
passes.get(PassCode_2021.UnzipFolderPass).Do(archive.getAbsolutePath(), Global.SapforPackagesDirectory.getAbsolutePath());
|
||||
FileUtils.writeStringToFile(loaded, new Date().toString());
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Utils;
|
||||
import Repository.EmailMessage;
|
||||
import Repository.Subscribes.Subscriber;
|
||||
import Repository.Subscribes.UI.SubscriberForm;
|
||||
@@ -26,7 +25,7 @@ public class EditAccount extends Email {
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
Subscriber res = new Subscriber(); // объект для заполнения полей.не более.
|
||||
if (f.ShowDialog("Регистрация", res)) {
|
||||
if (!Utils.validateEmail(res.address, Log)) {
|
||||
if (!CommonUtils.validateEmail(res.address, Log)) {
|
||||
return false;
|
||||
}
|
||||
name = res.name;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import _VisualDVM.Global;
|
||||
import ProjectData.Files.DBProjectFile;
|
||||
import Visual_DVM_2021.Passes.Transformation;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
@@ -20,7 +19,7 @@ public class EraseBadSymbols extends Transformation {
|
||||
res_text.append(CommonUtils.Translit(c));
|
||||
else res_text.append(' ');
|
||||
}
|
||||
File dst = Paths.get(target.last_version.Home.getAbsolutePath(), Global.isWindows ? file.name : file.name.replace('\\', '/')).toFile();
|
||||
File dst = Paths.get(target.last_version.Home.getAbsolutePath(), CommonUtils.isWindows ? file.name : file.name.replace('\\', '/')).toFile();
|
||||
FileUtils.write(dst, res_text.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.Module.Module;
|
||||
import ProjectData.Files.DBProjectFile;
|
||||
@@ -17,7 +16,7 @@ public class GCOV extends Precompilation {
|
||||
return new File(workspace, getBinaryName());
|
||||
}
|
||||
protected String getBinaryName() {
|
||||
return Global.isWindows ? "0.exe" : "0";
|
||||
return CommonUtils.isWindows ? "0.exe" : "0";
|
||||
}
|
||||
@Override
|
||||
public boolean needsConfirmations() {
|
||||
@@ -68,7 +67,7 @@ public class GCOV extends Precompilation {
|
||||
if (getBinary().exists()) {
|
||||
ShowMessage1("Запуск для GCOV");
|
||||
name_to_kill = "0.exe";
|
||||
StartProcess(Global.isWindows?"0.exe":"./0", target.run_maxtime);
|
||||
StartProcess(CommonUtils.isWindows?"0.exe":"./0", target.run_maxtime);
|
||||
target.updateRunOut(output);
|
||||
} else {
|
||||
Log.Writeln_("Не удалось собрать проект.");
|
||||
@@ -94,7 +93,7 @@ public class GCOV extends Precompilation {
|
||||
target.db.Update(file);
|
||||
File targetGcov = Paths.get(
|
||||
target.getGCOVDirectory().getAbsolutePath(),
|
||||
(Global.isWindows?file.name:file.getUnixName()) + ".gcov").toFile();
|
||||
(CommonUtils.isWindows?file.name:file.getUnixName()) + ".gcov").toFile();
|
||||
Files.copy(gcov.toPath(), targetGcov.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,13 +18,13 @@ public class LocalInitaliseUser extends ProcessPass<User> {
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
File workspace = Paths.get(Global.Home, "User").toFile();
|
||||
File workspace = Paths.get(CommonUtils.Home, "User").toFile();
|
||||
target.workspace = workspace.getAbsolutePath();
|
||||
Utils.CheckAndCleanDirectory(workspace);
|
||||
FileUtils.forceMkdir(target.getLocalProjectsDir());
|
||||
FileUtils.forceMkdir(target.getLocalModulesDir());
|
||||
//-
|
||||
if (!Global.isWindows) {
|
||||
if (!CommonUtils.isWindows) {
|
||||
File headerCode = target.getHeaderCodeFile();
|
||||
//-
|
||||
File starterCode = target.getStarterCodeFile();
|
||||
|
||||
@@ -29,7 +29,7 @@ public class OpenBugReportTestProject extends Pass_2021<BugReport> {
|
||||
root = Paths.get(Global.visualiser.getWorkspace().getAbsolutePath(),
|
||||
target.id).toFile();
|
||||
project = Paths.get(root.getAbsolutePath(),
|
||||
Global.isWindows ? CommonUtils.toW(target.project_version)
|
||||
CommonUtils.isWindows ? CommonUtils.toW(target.project_version)
|
||||
: CommonUtils.toU(target.project_version)).toFile();
|
||||
return true;
|
||||
}else {
|
||||
|
||||
@@ -54,12 +54,12 @@ public class OpenCurrentProject extends Pass_2021<db_project_info> {
|
||||
mode = Mode.ProjectInfo;
|
||||
target = (db_project_info) arg;
|
||||
dir = target.Home;
|
||||
Global.Log.Print(DebugPrintLevel.Project, "готовая версия " + CommonUtils.Brackets(dir.getAbsolutePath()));
|
||||
CommonUtils.MainLog.Print(DebugPrintLevel.Project, "готовая версия " + CommonUtils.Brackets(dir.getAbsolutePath()));
|
||||
return needsOpen();
|
||||
}
|
||||
}
|
||||
if ((dir != null) && needsOpen()) {
|
||||
Global.Log.Print(DebugPrintLevel.Project, CommonUtils.Brackets(dir.toString()));
|
||||
CommonUtils.MainLog.Print(DebugPrintLevel.Project, CommonUtils.Brackets(dir.toString()));
|
||||
if (!dir.isDirectory()) {
|
||||
Log.Writeln_(CommonUtils.Brackets(dir) + "\nне является папкой!");
|
||||
return false;
|
||||
@@ -85,7 +85,7 @@ public class OpenCurrentProject extends Pass_2021<db_project_info> {
|
||||
db_project_info root = Current.getRoot();
|
||||
db_project_info project = root.find_version_r(dir);
|
||||
if (project != null) {
|
||||
Global.Log.Print("версия найдена в текущем корне");
|
||||
CommonUtils.MainLog.Print("версия найдена в текущем корне");
|
||||
//версия уже существует. и выстраивать дерево второй раз не нужно.
|
||||
//как и отображать дерево.
|
||||
target = project;
|
||||
@@ -94,7 +94,7 @@ public class OpenCurrentProject extends Pass_2021<db_project_info> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
Global.Log.Print(DebugPrintLevel.Project, "построение дерева версий");
|
||||
CommonUtils.MainLog.Print(DebugPrintLevel.Project, "построение дерева версий");
|
||||
target = new db_project_info(dir);
|
||||
new_root = target.CreateVersionsTree();
|
||||
target.Open();
|
||||
|
||||
@@ -48,7 +48,7 @@ public class Precompilation extends Pass_2021<db_project_info> {
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = Current.getProject();
|
||||
if (Global.isWindows) {
|
||||
if (CommonUtils.isWindows) {
|
||||
//--
|
||||
makepath = Global.db.settings.get(SettingName.LocalMakePathWindows).toString();
|
||||
if (makepath.isEmpty()) {
|
||||
@@ -184,7 +184,7 @@ public class Precompilation extends Pass_2021<db_project_info> {
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
if (Global.isWindows) {
|
||||
if (CommonUtils.isWindows) {
|
||||
name_to_kill = "make.exe";
|
||||
StartProcess(CommonUtils.DQuotes(Global.db.settings.get(SettingName.LocalMakePathWindows).Value) + " -j " + Global.db.settings.get(SettingName.Kernels).toString(),
|
||||
target.compilation_maxtime);
|
||||
@@ -246,7 +246,7 @@ public class Precompilation extends Pass_2021<db_project_info> {
|
||||
}
|
||||
@Override
|
||||
public void Interrupt() throws Exception {
|
||||
if (Global.isWindows) {
|
||||
if (CommonUtils.isWindows) {
|
||||
if (!name_to_kill.isEmpty()) {
|
||||
killed = true;
|
||||
Process killer = Runtime.getRuntime().exec("taskkill /FI \"IMAGENAME eq " + name_to_kill + "\" /F /T");
|
||||
|
||||
@@ -3,7 +3,6 @@ import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.UI;
|
||||
import Common_old.Utils.Utils;
|
||||
import GlobalData.Account.AccountRole;
|
||||
import Repository.Component.Component;
|
||||
import Repository.Component.ComponentType;
|
||||
@@ -32,7 +31,7 @@ public class PublishComponent extends ComponentsRepositoryPass<Component> {
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (!Global.isWindows) {
|
||||
if (!CommonUtils.isWindows) {
|
||||
Log.Writeln_("Публикация компонент разрешена только для Windows");
|
||||
return false;
|
||||
}
|
||||
@@ -71,7 +70,7 @@ public class PublishComponent extends ComponentsRepositoryPass<Component> {
|
||||
protected void ServerAction() throws Exception {
|
||||
String change_description = (f.Result == null) ? "не указаны" : f.Result;
|
||||
String change_record_header = String.join(" ",
|
||||
CommonUtils.Brackets(Utils.print_date(new Date())) + ":",
|
||||
CommonUtils.Brackets(CommonUtils.print_date(new Date())) + ":",
|
||||
Current.getAccount().name + CommonUtils.RBrackets(Current.getAccount().email),
|
||||
"публикует версию", CommonUtils.DQuotes(target.version)
|
||||
);
|
||||
@@ -85,14 +84,14 @@ public class PublishComponent extends ComponentsRepositoryPass<Component> {
|
||||
target.getVersionText() + "\n" +
|
||||
change_record;
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.PublishComponent,
|
||||
packed, Utils.packFile(target.getFile())
|
||||
packed, CommonUtils.fileToBytes(target.getFile())
|
||||
));
|
||||
if (target.needs_update_minimal_version) {
|
||||
packed = target.getComponentType().toString() + "\n" +
|
||||
target.getVersionText() + "\n";
|
||||
//--
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.UpdateComponentMinimalVersion,
|
||||
packed, Utils.packFile(target.getFile())
|
||||
packed, CommonUtils.fileToBytes(target.getFile())
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,9 @@ public class ReplaceTestsFromFiles extends TestingSystemPass<Vector<Test>> {
|
||||
return false;
|
||||
}
|
||||
if (!Utils.validateProjectFile(dir, Log)) {
|
||||
Log.Writeln_("Имя папки " + CommonUtils.Brackets(dir.getName()) + " содержит запрещённые символы " + Constants.all_forbidden_characters_string + ", или кириллицу.");
|
||||
Log.Writeln_("Имя папки " + CommonUtils.Brackets(dir.getName()) + " содержит запрещённые символы "
|
||||
+ CommonUtils.printAllForbiddenCharacters()
|
||||
+ ", или кириллицу.");
|
||||
return false;
|
||||
}
|
||||
if (files.isEmpty()) {
|
||||
|
||||
@@ -59,7 +59,7 @@ public class Run extends Pass_2021<db_project_info> {
|
||||
protected void body() throws Exception {
|
||||
switch (Current.getMachine().type) {
|
||||
case Local:
|
||||
if (Global.isWindows) {
|
||||
if (CommonUtils.isWindows) {
|
||||
subpass = passes.get(PassCode_2021.WindowsLocalRun);
|
||||
} else
|
||||
subpass = passes.get(PassCode_2021.LinuxLocalRun);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.Utils.Utils;
|
||||
import Repository.BugReport.BugReportInterface;
|
||||
import Repository.BugReport.BugReportState;
|
||||
import Repository.Server.ServerCode;
|
||||
@@ -13,7 +13,7 @@ public class SendBugReport extends ComponentsRepositoryPass {
|
||||
//отправить архив.
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.SendBugReport,
|
||||
Current.getBugReport().id,
|
||||
Utils.packFile(BugReportInterface.getArchiveFile(Current.getBugReport()))
|
||||
CommonUtils.fileToBytes(BugReportInterface.getArchiveFile(Current.getBugReport()))
|
||||
));
|
||||
}
|
||||
// синхрон бд
|
||||
|
||||
@@ -37,7 +37,7 @@ public class ShowComponentChangesLog extends ComponentsRepositoryPass<Component>
|
||||
@Override
|
||||
protected void ServerAction() throws Exception {
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.GetComponentChangesLog, target.getComponentType().toString()));
|
||||
Utils.unpackFile((byte[]) response.object, res);
|
||||
CommonUtils.bytesToFile((byte[]) response.object, res);
|
||||
}
|
||||
@Override
|
||||
protected boolean validate() {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Repository.Component.Component;
|
||||
@@ -21,7 +22,7 @@ public class UpdateComponent extends Pass_2021<Component> {
|
||||
switch (Current.getComponent().getComponentType()) {
|
||||
case Sapfor_F:
|
||||
case Visualizer_2:
|
||||
subPass = Global.isWindows ? PassCode_2021.DownloadComponent : PassCode_2021.BuildComponent;
|
||||
subPass = CommonUtils.isWindows ? PassCode_2021.DownloadComponent : PassCode_2021.BuildComponent;
|
||||
break;
|
||||
case Visualiser:
|
||||
case Instruction:
|
||||
|
||||
@@ -66,7 +66,7 @@ public class Pass_2021<T> {
|
||||
if (pass.hasStats())
|
||||
FAPasses.add(pass);
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,7 @@ public class Pass_2021<T> {
|
||||
if (Current.HasProject())
|
||||
UI.fastAccessMenuBar.Refresh();
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -280,7 +280,7 @@ public class Pass_2021<T> {
|
||||
if (ex instanceof PassException) {
|
||||
Log.Writeln_(ex.getMessage());
|
||||
} else
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
public boolean start(Object... args) {
|
||||
//------------------------------->
|
||||
@@ -292,7 +292,7 @@ public class Pass_2021<T> {
|
||||
target = null;
|
||||
Log = new TextLog();
|
||||
if (!getDescription().isEmpty())
|
||||
Global.Log.Print(DebugPrintLevel.Passes, getDescription() + " стартует..");
|
||||
CommonUtils.MainLog.Print(DebugPrintLevel.Passes, getDescription() + " стартует..");
|
||||
timer.Start();
|
||||
//------------------------------->
|
||||
try {
|
||||
@@ -323,7 +323,7 @@ public class Pass_2021<T> {
|
||||
try {
|
||||
animation_sem.acquire();
|
||||
} catch (InterruptedException e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
//и уничтожаем его.
|
||||
// UI.Print(DebugPrintLevel.Passes, "Окно анимации активировано.");
|
||||
@@ -374,12 +374,12 @@ public class Pass_2021<T> {
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
state = PassState.ExternalCrushed;
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
//------------------------------->
|
||||
timer.Stop();
|
||||
if (!getDescription().isEmpty()) {
|
||||
Global.Log.Print(DebugPrintLevel.Passes,
|
||||
CommonUtils.MainLog.Print(DebugPrintLevel.Passes,
|
||||
getDescription() +
|
||||
" окончен за " + timer.Print() +
|
||||
" состояние " + CommonUtils.Brackets(state.getDescription())
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Visual_DVM_2021.Passes;
|
||||
import Common.CommonConstants;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Utils.Utils;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
@@ -51,7 +51,7 @@ public abstract class ProcessPass<T> extends Pass_2021<T> {
|
||||
output.add(line);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Global.Log.PrintException(ex);
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
public String ReadLine() throws Exception {
|
||||
@@ -61,7 +61,7 @@ public abstract class ProcessPass<T> extends Pass_2021<T> {
|
||||
return brStdout.readLine();
|
||||
}
|
||||
public void PerformScript(String script_text) throws Exception {
|
||||
PerformScript(Utils.CreateTempFile("script", Global.isWindows ? "bat" : "", script_text), true);
|
||||
PerformScript(Utils.CreateTempFile("script", CommonUtils.isWindows ? "bat" : "", script_text), true);
|
||||
}
|
||||
public void PerformScript(File script, boolean wait) throws Exception {
|
||||
if (!script.setExecutable(true)) throw new PassException("Не удалось создать исполняемый файл для скрипта");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.SSH;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import GlobalData.Tasks.Supervisor.Remote.RemoteTaskSupervisor;
|
||||
public abstract class TaskConnectionPass<S extends RemoteTaskSupervisor> extends ConnectionPass {
|
||||
public S supervisor; //инициализация идет в конструкторе потомка.
|
||||
@@ -8,7 +8,7 @@ public abstract class TaskConnectionPass<S extends RemoteTaskSupervisor> extends
|
||||
try {
|
||||
supervisor = s_class.newInstance();
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Visual_DVM_2021.Passes;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.UI.DebugPrintLevel;
|
||||
@@ -82,7 +83,7 @@ public class SapforAnalysis extends SapforPass {
|
||||
unpack(sapfor.getResult());
|
||||
}
|
||||
if (!isAtomic() && !asDonePhase) {
|
||||
Global.Log.Print(DebugPrintLevel.Passes, "Поиск выполненных фаз..");
|
||||
CommonUtils.MainLog.Print(DebugPrintLevel.Passes, "Поиск выполненных фаз..");
|
||||
sapfor.RunAnalysis(
|
||||
"SPF_GetPassesStateStr",
|
||||
-Global.messagesServer.getPort(),
|
||||
@@ -115,7 +116,7 @@ public class SapforAnalysis extends SapforPass {
|
||||
}
|
||||
}
|
||||
}
|
||||
Global.Log.Print(DebugPrintLevel.Passes, "Фазы получены.");
|
||||
CommonUtils.MainLog.Print(DebugPrintLevel.Passes, "Фазы получены.");
|
||||
}
|
||||
}
|
||||
//---------------------------------------------
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package Visual_DVM_2021.Passes.Server;
|
||||
import Common.Database.Objects.DBObject;
|
||||
import Common.Utils.CommonUtils;
|
||||
import _VisualDVM.Global;
|
||||
import Common_old.Utils.Utils;
|
||||
import Repository.RepositoryRefuseException;
|
||||
@@ -71,7 +72,7 @@ public abstract class RepositoryPass<S extends RepositoryServer, T> extends Pass
|
||||
}
|
||||
}
|
||||
protected void SendFile(File src, String dst) throws Exception {
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.SendFile, dst, Utils.packFile(src)));
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.SendFile, dst, CommonUtils.fileToBytes(src)));
|
||||
}
|
||||
protected void ReceiveFile(String src, File dst) throws Exception {
|
||||
Command(new ServerExchangeUnit_2021(ServerCode.ReceiveFile, src));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Visual_DVM_2021.Passes.UI;
|
||||
import _VisualDVM.Global;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.UI.Windows.Dialog.Dialog;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
|
||||
@@ -36,7 +36,7 @@ public class PassForm extends Dialog<Pass_2021, PassFields> {
|
||||
try {
|
||||
Result.Interrupt();
|
||||
} catch (Exception e) {
|
||||
Global.Log.PrintException(e);
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user