включен анализатор. v++

This commit is contained in:
2025-01-08 14:04:40 +03:00
parent a38427a25a
commit 368fcf4a8e
12 changed files with 21 additions and 23 deletions

View File

@@ -2,14 +2,13 @@ package _VisualDVM;
import Common.Utils.Loggable;
import Common.Utils.Utils_;
import Common.Visual.UI;
import _VisualDVM.GlobalData.Account.Account;
import _VisualDVM.GlobalData.Account.AccountRole;
import _VisualDVM.GlobalData.Settings.DBSetting;
import _VisualDVM.GlobalData.Settings.SettingName;
import _VisualDVM.Passes.PassCode;
import _VisualDVM.ProjectData.ProjectView;
import _VisualDVM.Repository.Component.ComponentType;
import _VisualDVM.Repository.Component.ComponentsSet;
import _VisualDVM.Repository.Component.PerformanceAnalyzer.PerformanceAnalyzer;
import _VisualDVM.Repository.Component.Sapfor.MessagesServer;
import _VisualDVM.Repository.Component.Visualizer_2;
import _VisualDVM.Repository.Server.ComponentsServer;
@@ -55,6 +54,7 @@ public class Global {
//------------------------------------------------------------------
public static ComponentsServer componentsServer = new ComponentsServer();
public static TestingServer testingServer = new TestingServer();
public static PerformanceAnalyzer performanceAnalyzer = null;
public static void SynschronizeProperties() {
try {
File new_propertiesFile = new File(Utils_.getHomeDirectory(), "properties");
@@ -144,8 +144,8 @@ public class Global {
ComponentsSet.visualizer_2.Shutdown();
if (messagesServer != null)
messagesServer.Shutdown();
if (ComponentsSet.performanceAnalyzer != null)
ComponentsSet.performanceAnalyzer.Shutdown();
if (performanceAnalyzer != null)
performanceAnalyzer.Shutdown();
} catch (Exception ex) {
if (Utils_.MainLog != null) {
Utils_.MainLog.PrintException(ex);

View File

@@ -13,7 +13,6 @@ public class ComponentsSet extends DataSet<ComponentType, Component> {
//------------------------------------------------------------------
public static Visualiser visualiser = null;
public static Visualizer_2 visualizer_2 = null;
public static PerformanceAnalyzer performanceAnalyzer = null;
public boolean bad_state = false;
public boolean need_update = false;
public boolean need_publish = false;
@@ -22,7 +21,7 @@ public class ComponentsSet extends DataSet<ComponentType, Component> {
put(ComponentType.Visualiser, visualiser = new Visualiser());
put(ComponentType.Sapfor_F, (Component) MainModule_.instance.set(Current.Sapfor, new Sapfor_F()));
put(ComponentType.Visualizer_2, visualizer_2);
put(ComponentType.PerformanceAnalyzer, performanceAnalyzer = new PerformanceAnalyzer());
put(ComponentType.PerformanceAnalyzer, Global.performanceAnalyzer = new PerformanceAnalyzer());
put(ComponentType.Instruction, new Instruction());
}
public boolean needChanges() {

View File

@@ -4,7 +4,6 @@ import Common.Visual.UI;
import _VisualDVM.Global;
import _VisualDVM.Repository.Component.Component;
import _VisualDVM.Repository.Component.ComponentType;
import _VisualDVM.Repository.Component.ComponentsSet;
import _VisualDVM.Utils;
import analyzer.common.MessageJtoJ;
@@ -103,7 +102,7 @@ public class PerformanceAnalyzer extends Component {
return null;
});
Utils.startScript(Global.TempDirectory, Global.ComponentsDirectory, "analyzer",
"java -jar -Dprism.order=sw " + Utils_.DQuotes(ComponentsSet.performanceAnalyzer.getFile()) + " --port " + getPort() + " --version");
"java -jar -Dprism.order=sw " + Utils_.DQuotes(Global.performanceAnalyzer.getFile()) + " --port " + getPort() + " --version");
//-
server_thread.join();
} catch (Exception ex) {
@@ -124,7 +123,7 @@ public class PerformanceAnalyzer extends Component {
process_thread = new Thread(() -> {
try {
Utils.startScript(Global.TempDirectory, Global.ComponentsDirectory, "analyzer",
"java -jar -Dprism.order=sw " + Utils_.DQuotes(ComponentsSet.performanceAnalyzer.getFile()) + " --port " + getPort());
"java -jar -Dprism.order=sw " + Utils_.DQuotes(Global.performanceAnalyzer.getFile()) + " --port " + getPort());
//-
} catch (Exception ex) {
ex.printStackTrace();

View File

@@ -61,7 +61,7 @@ public class Visualiser extends Component {
//http://www.seostella.com/ru/article/2012/02/05/formatirovanie-daty-v-java.html
@Override
public void GetVersionInfo() {
version = 1131;
version = 1132;
String pattern = "MMM dd yyyy HH:mm:ss";
DateFormat df = new SimpleDateFormat(pattern, Locale.ENGLISH);
date_text = df.format(getClassBuildTime());

View File

@@ -47,7 +47,7 @@ public class MainMenuBar extends VisualiserMenuBar {
});
}
});
/*
add(new MenuBarButton() {
{
setIcon("/icons/Comparsion.png");
@@ -57,7 +57,6 @@ public class MainMenuBar extends VisualiserMenuBar {
});
}
});
*/
addPasses(PassCode.ShowInstruction);
//-
setPreferredSize(new Dimension(0, 30));