no message
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package _VisualDVM.ProjectData.Project;
|
||||
import Common.CommonConstants;
|
||||
import Common.Current_;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Current;
|
||||
import Common.Database.Objects.DBObject;
|
||||
@@ -172,13 +172,13 @@ public class db_project_info extends DBObject {
|
||||
parent = parent_in;
|
||||
name = parent.GenerateVersionName(letter_in);
|
||||
languageName = parent.languageName;
|
||||
style = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.FREE_FORM).toBoolean() ? LanguageStyle.free : LanguageStyle.fixed;
|
||||
style = ((GlobalDatabase) Utils_.db).settings.get(SettingName.FREE_FORM).toBoolean() ? LanguageStyle.free : LanguageStyle.fixed;
|
||||
description = description_in;
|
||||
original = original_in;
|
||||
Home = Paths.get(parent_in.Home.getAbsolutePath(), name).toFile();
|
||||
parent.SaveVersionToBuild(name);
|
||||
if (!Home.mkdir()) throw new PassException("Не удалось создать папку для версии");
|
||||
creationDate = CommonUtils.getDateNumber(); //----------------------------------------------------------------------------->>>
|
||||
creationDate = Utils_.getDateNumber(); //----------------------------------------------------------------------------->>>
|
||||
CreateVisualiserData();
|
||||
parent.AddVersion(this);
|
||||
//если это делать раньше, папка версии учтется как подпапка.
|
||||
@@ -191,7 +191,7 @@ public class db_project_info extends DBObject {
|
||||
name = Home.getName();
|
||||
description = description_;
|
||||
if (create_data) {
|
||||
creationDate = CommonUtils.getDateNumber(); //----------------------------------------------------------------------------->>>
|
||||
creationDate = Utils_.getDateNumber(); //----------------------------------------------------------------------------->>>
|
||||
CreateVisualiserData();
|
||||
}
|
||||
}
|
||||
@@ -208,7 +208,7 @@ public class db_project_info extends DBObject {
|
||||
if (stored_info == null) {
|
||||
name = Home.getName();
|
||||
description = "";
|
||||
creationDate = CommonUtils.getDateNumber(); //----------------------------------------------------------------------------->>>
|
||||
creationDate = Utils_.getDateNumber(); //----------------------------------------------------------------------------->>>
|
||||
db.Insert(this);
|
||||
} else
|
||||
ExtractStoredInfo(stored_info);
|
||||
@@ -252,7 +252,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public void UpdatefgResistance(int resistance_in) {
|
||||
@@ -260,7 +260,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public void UpdatefgScreen(double screen_in) {
|
||||
@@ -268,7 +268,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public void UpdateCompilationMaxtime(int ct_in) {
|
||||
@@ -276,7 +276,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public void UpdateRunMaxtime(int rt_in) {
|
||||
@@ -284,7 +284,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
//</editor-fold>
|
||||
@@ -301,7 +301,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public void SwitchFilterMultiplied() {
|
||||
@@ -309,15 +309,15 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public boolean IsMCopy() {
|
||||
String lname = name.toLowerCase();
|
||||
return (lname.startsWith("m") && CommonUtils.isIntegerValue(lname.substring(1)));
|
||||
return (lname.startsWith("m") && Utils_.isIntegerValue(lname.substring(1)));
|
||||
}
|
||||
public String getTitle() {
|
||||
return name + " " + CommonUtils.DQuotes(description);
|
||||
return name + " " + Utils_.DQuotes(description);
|
||||
}
|
||||
public File getProjFile() {
|
||||
return Paths.get(Home.getAbsolutePath(), Constants.data, Constants.spf).toFile();
|
||||
@@ -452,7 +452,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception ex) {
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
Utils_.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
public boolean UpdateLanguage(LanguageName lang_in) {
|
||||
@@ -543,7 +543,7 @@ public class db_project_info extends DBObject {
|
||||
db.Update(this);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -551,14 +551,14 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public void UpdateDVMCount() {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public boolean UpdateAddictedCount() {
|
||||
@@ -566,7 +566,7 @@ public class db_project_info extends DBObject {
|
||||
db.Update(this);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -678,8 +678,8 @@ public class db_project_info extends DBObject {
|
||||
public boolean FolderNotExists(File new_directory, File subdir, TextLog passLog) {
|
||||
for (File pf : getSubdirectoriesSimple(subdir)) {
|
||||
if (pf.getName().equals(new_directory.getName())) {
|
||||
passLog.Writeln("В папке " + CommonUtils.Brackets(subdir.getAbsolutePath()) + "\n" +
|
||||
"уже существует папка с именем " + CommonUtils.Brackets(new_directory.getName()));
|
||||
passLog.Writeln("В папке " + Utils_.Brackets(subdir.getAbsolutePath()) + "\n" +
|
||||
"уже существует папка с именем " + Utils_.Brackets(new_directory.getName()));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -700,7 +700,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception ex) {
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
Utils_.MainLog.PrintException(ex);
|
||||
}
|
||||
}
|
||||
public mxGraphComponent DrawFunctionsGraph() {
|
||||
@@ -718,8 +718,8 @@ public class db_project_info extends DBObject {
|
||||
}
|
||||
public boolean CheckAttachmentFile(File f, TextLog Log) {
|
||||
Utils.validateFileShortNewName(f.getName(), Log);
|
||||
if (CommonUtils.getFileSizeMegaBytes(f) > 2)
|
||||
Log.Writeln_("Размер вложения " + CommonUtils.Brackets(f.getName()) + " превышает 2 Мb");
|
||||
if (Utils_.getFileSizeMegaBytes(f) > 2)
|
||||
Log.Writeln_("Размер вложения " + Utils_.Brackets(f.getName()) + " превышает 2 Мb");
|
||||
return Log.isEmpty();
|
||||
}
|
||||
public boolean CheckAllAttachments(TextLog Log) {
|
||||
@@ -848,7 +848,7 @@ public class db_project_info extends DBObject {
|
||||
for (String key_ : versions.keySet()) {
|
||||
String[] data_ = key_.split(letter);
|
||||
String last = data_[data_.length - 1];
|
||||
if (CommonUtils.isIntegerValue(last)) {
|
||||
if (Utils_.isIntegerValue(last)) {
|
||||
int vn = Integer.parseInt(last);
|
||||
if (vn > max_vn)
|
||||
max_vn = vn;
|
||||
@@ -866,7 +866,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(),
|
||||
CommonUtils.isWindows() ? file.name :
|
||||
Utils_.isWindows() ? file.name :
|
||||
file.name.replace('\\', '/')));
|
||||
}
|
||||
}
|
||||
@@ -906,7 +906,7 @@ public class db_project_info extends DBObject {
|
||||
}
|
||||
}
|
||||
public void createEmptyVersion(String versionLetter, String versionDescription) throws Exception {
|
||||
boolean needsM = ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.SaveModifications).toBoolean();
|
||||
boolean needsM = ((GlobalDatabase) Utils_.db).settings.get(SettingName.SaveModifications).toBoolean();
|
||||
if (needsM)
|
||||
createModification();
|
||||
last_version = new db_project_info(
|
||||
@@ -924,7 +924,7 @@ public class db_project_info extends DBObject {
|
||||
last_version.description = description_in;
|
||||
last_version.original = last_modification.name;
|
||||
last_version.Home = versionDirectory;
|
||||
last_version.creationDate = CommonUtils.getDateNumber(); //----------------------------------------------------------------------------->>>
|
||||
last_version.creationDate = Utils_.getDateNumber(); //----------------------------------------------------------------------------->>>
|
||||
last_version.CreateVisualiserData();
|
||||
this.AddVersion(last_version);
|
||||
}
|
||||
@@ -1090,7 +1090,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(),
|
||||
CommonUtils.isWindows() ? file.name :
|
||||
Utils_.isWindows() ? file.name :
|
||||
file.name.replace('\\', '/')).toFile();
|
||||
Files.copy(src_file.toPath(), dst_file.toPath());
|
||||
}
|
||||
@@ -1128,7 +1128,7 @@ public class db_project_info extends DBObject {
|
||||
String[] splited = packed_messages.split("\\|");
|
||||
int numberOfFiles = Integer.parseInt(splited[idx++]);
|
||||
for (int i = 0; i < numberOfFiles; ++i) {
|
||||
String message_file = CommonUtils.toW(splited[idx++]); //для ключа.
|
||||
String message_file = Utils_.toW(splited[idx++]); //для ключа.
|
||||
int numberOfMessages = Integer.parseInt(splited[idx++]);
|
||||
if (!db.files.Data.containsKey(message_file)) {
|
||||
throw new PassException("Ошибка при распаковке сообщений: файл: [" +
|
||||
@@ -1162,7 +1162,7 @@ public class db_project_info extends DBObject {
|
||||
String[] localSplit = splited[idx++].split(" ");
|
||||
int m_type = Integer.parseInt(localSplit[0]);
|
||||
if (m_type == 1) {
|
||||
CommonUI.Info(packed_messages);
|
||||
UI_.Info(packed_messages);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1235,7 +1235,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
for (ParallelRegion parallelRegion : parallelRegions.Data.values())
|
||||
parallelRegion.UpdateLoopsCount();
|
||||
@@ -1244,7 +1244,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
for (ParallelRegion parallelRegion : parallelRegions.Data.values())
|
||||
parallelRegion.UpdateFunctionsCount();
|
||||
@@ -1254,7 +1254,7 @@ public class db_project_info extends DBObject {
|
||||
try {
|
||||
db.Update(this);
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
for (ParallelRegion parallelRegion : parallelRegions.Data.values())
|
||||
parallelRegion.UpdateArraysCount();
|
||||
|
||||
Reference in New Issue
Block a user