no message
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
package _VisualDVM.Repository.Component.Sapfor;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Current;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
@@ -47,7 +47,7 @@ public class MessagesServer {
|
||||
if (serverSocket != null)
|
||||
serverSocket.close();
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public int getPort() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package _VisualDVM.Repository.Component.Sapfor;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Current;
|
||||
import _VisualDVM.GlobalData.GlobalDatabase;
|
||||
@@ -140,8 +140,8 @@ public abstract class Sapfor extends OSDComponent {
|
||||
RunAnalysis("SPF_GetVersionAndBuildDate", -1, "", "");
|
||||
Visualizer_2.UnpackVersionInfo(this, getResult());
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
CommonUI.Error("Не удалось получить версию компонента " + CommonUtils.DQuotes(getComponentType().getDescription()));
|
||||
Utils_.MainLog.PrintException(e);
|
||||
UI_.Error("Не удалось получить версию компонента " + Utils_.DQuotes(getComponentType().getDescription()));
|
||||
}
|
||||
}
|
||||
public abstract String getUpdateCommand();
|
||||
@@ -169,9 +169,9 @@ public abstract class Sapfor extends OSDComponent {
|
||||
RunAnalysis("SPF_StatisticAnalyzer",
|
||||
-1,
|
||||
"",
|
||||
CommonUtils.DQuotes(src.getAbsolutePath()) +
|
||||
Utils_.DQuotes(src.getAbsolutePath()) +
|
||||
" "
|
||||
+ CommonUtils.DQuotes(dst.getAbsolutePath())
|
||||
+ Utils_.DQuotes(dst.getAbsolutePath())
|
||||
);
|
||||
}
|
||||
public void Restart() throws Exception {
|
||||
@@ -185,7 +185,7 @@ public abstract class Sapfor extends OSDComponent {
|
||||
public void cd(File directory_in) throws Exception {
|
||||
if (RunAnalysis("SPF_ChangeDirectory", -1, directory_in.getAbsolutePath(), "") != 0)
|
||||
throw new PassException("Sapfor: Не удалось перейти в папку "
|
||||
+ CommonUtils.Brackets(directory_in.getAbsolutePath()) +
|
||||
+ Utils_.Brackets(directory_in.getAbsolutePath()) +
|
||||
"\n" + "Код возврата: " + getErrorCode());
|
||||
}
|
||||
public String getResult() {
|
||||
@@ -257,7 +257,7 @@ public abstract class Sapfor extends OSDComponent {
|
||||
}
|
||||
} else if (z == 1) file_text = sub;
|
||||
else if (z == 2) {
|
||||
ModifiedFiles.put(CommonUtils.toW(sub), file_text);
|
||||
ModifiedFiles.put(Utils_.toW(sub), file_text);
|
||||
file_text = null;
|
||||
}
|
||||
codeIdx += count;
|
||||
@@ -336,7 +336,7 @@ public abstract class Sapfor extends OSDComponent {
|
||||
Utils.WriteToFile(file, OldFiles.get(name));
|
||||
}
|
||||
OldFiles.clear();
|
||||
} else CommonUI.Info("Сохранение файлов отсутствует.");
|
||||
} else UI_.Info("Сохранение файлов отсутствует.");
|
||||
}
|
||||
if (cuf != null)
|
||||
Pass.passes.get(PassCode.OpenCurrentFile).Do(cuf);
|
||||
@@ -353,20 +353,20 @@ public abstract class Sapfor extends OSDComponent {
|
||||
for (PassCode code : getAnalysesCodes())
|
||||
(Pass.passes.get(code)).Reset();
|
||||
//------------------------------------------------------------------------------------------>>>> пакетный режим.
|
||||
if (CommonUI.isActive()) {
|
||||
if (UI_.isActive()) {
|
||||
Pass.passes.get(PassCode.Precompilation).Reset();
|
||||
Pass.passes.get(PassCode.SPF_GetGCovInfo).Reset();
|
||||
}
|
||||
Global.enable_text_changed = false;
|
||||
Global.transformationPermission = TransformationPermission.None;
|
||||
if ((CommonUI.isActive()) && (UI.HasMainWindow()) && (UI.getVersionsWindow() != null))
|
||||
if ((UI_.isActive()) && (UI.HasMainWindow()) && (UI.getVersionsWindow() != null))
|
||||
UI.getVersionsWindow().BlockVariants();
|
||||
}
|
||||
//--------------------------------------------------------------------------->>
|
||||
//временный (?) проход, по тихому получить размерность теста, предварительно выполнив тихий парс.
|
||||
//тут все одноразовое. считаем что таблицы бд уже заполнены как надо.
|
||||
public LanguageStyle getStyle() throws Exception {
|
||||
return ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.FREE_FORM).toBoolean() ? LanguageStyle.free : LanguageStyle.fixed;
|
||||
return ((GlobalDatabase) Utils_.db).settings.get(SettingName.FREE_FORM).toBoolean() ? LanguageStyle.free : LanguageStyle.fixed;
|
||||
}
|
||||
//----------
|
||||
public static Vector<PassCode> getScenariosCodes() {
|
||||
@@ -411,12 +411,12 @@ public abstract class Sapfor extends OSDComponent {
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
public String getConsoleFlags() throws Exception {
|
||||
Vector<String> res = new Vector<>();
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.FREE_FORM).toBoolean())
|
||||
if (((GlobalDatabase) Utils_.db).settings.get(SettingName.FREE_FORM).toBoolean())
|
||||
res.add("-f90");
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.STATIC_SHADOW_ANALYSIS).toBoolean())
|
||||
if (((GlobalDatabase) Utils_.db).settings.get(SettingName.STATIC_SHADOW_ANALYSIS).toBoolean())
|
||||
res.add("-sh");
|
||||
res.add("-shwidth " + ((GlobalDatabase)CommonUtils.db).settings.get(SettingName.MAX_SHADOW_WIDTH));
|
||||
if (((GlobalDatabase)CommonUtils.db).settings.get(SettingName.KEEP_SPF_DIRECTIVES).toBoolean())
|
||||
res.add("-shwidth " + ((GlobalDatabase) Utils_.db).settings.get(SettingName.MAX_SHADOW_WIDTH));
|
||||
if (((GlobalDatabase) Utils_.db).settings.get(SettingName.KEEP_SPF_DIRECTIVES).toBoolean())
|
||||
res.add("-keepSPF");
|
||||
return String.join(" ", res);
|
||||
}
|
||||
@@ -457,16 +457,16 @@ public abstract class Sapfor extends OSDComponent {
|
||||
Utils.delete_with_check(outputFile);
|
||||
Utils.delete_with_check(errorsFile);
|
||||
//---
|
||||
File file = new File(data_workspace, name + (CommonUtils.isWindows() ? ".bat" : ".sh"));
|
||||
File file = new File(data_workspace, name + (Utils_.isWindows() ? ".bat" : ".sh"));
|
||||
FileUtils.write(file,
|
||||
CommonUtils.DQuotes(sapfor_drv)
|
||||
Utils_.DQuotes(sapfor_drv)
|
||||
+ (flags.isEmpty() ? "" : (" " + flags))
|
||||
+ " -noLogo"
|
||||
+ " " + command +
|
||||
" 1>" +
|
||||
CommonUtils.DQuotes(outputFile.getAbsolutePath()) +
|
||||
Utils_.DQuotes(outputFile.getAbsolutePath()) +
|
||||
" 2>" +
|
||||
CommonUtils.DQuotes(errorsFile.getAbsolutePath()),
|
||||
Utils_.DQuotes(errorsFile.getAbsolutePath()),
|
||||
Charset.defaultCharset());
|
||||
if (!file.setExecutable(true))
|
||||
throw new Exception("Не удалось сделать файл скрипта " + name + " исполняемым!");
|
||||
@@ -480,8 +480,8 @@ public abstract class Sapfor extends OSDComponent {
|
||||
exit_code = process.waitFor();
|
||||
flag = true;
|
||||
} catch (Exception ex) {
|
||||
CommonUtils.MainLog.PrintException(ex);
|
||||
CommonUtils.sleep(1000);
|
||||
Utils_.MainLog.PrintException(ex);
|
||||
Utils_.sleep(1000);
|
||||
}
|
||||
}
|
||||
while (!flag);
|
||||
@@ -531,7 +531,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" + (CommonUtils.isWindows() ? ".exe" : ""));
|
||||
temp_copy = Utils.getTempFileName("SAPFOR" + (Utils_.isWindows() ? ".exe" : ""));
|
||||
FileUtils.copyFile(src, temp_copy);
|
||||
temp_copy.setExecutable(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user