no message

This commit is contained in:
2024-10-14 12:14:01 +03:00
parent 3a29898d5f
commit 452c4c7268
466 changed files with 1255 additions and 1100 deletions

View File

@@ -0,0 +1,67 @@
package _VisualDVM.Passes.All;
import _VisualDVM.Current;
import Common.Visual.Windows.Dialog.Text.ReadOnlyMultilineTextForm;
import _VisualDVM.Global;
import _VisualDVM.GlobalData.Compiler.Compiler;
import _VisualDVM.GlobalData.Machine.MachineType;
import _VisualDVM.Passes.PassCode;
import Common.Passes.Pass;
public class ShowCompilerVersion extends Pass<String> {
Pass<String> subpass;
boolean needsShow = true;
Compiler compiler;
//-
@Override
public String getIconPath() {
return "/icons/versions/Version.png";
}
@Override
public String getButtonText() {
return "";
}
@Override
protected boolean canStart(Object... args) throws Exception {
target = null;
if (args.length == 0) {
if (Global.mainModule.Check(Log, Current.Compiler)) {
compiler = Global.mainModule.getCompiler();
needsShow = true;
return true;
}
} else if (args.length == 2) {
compiler = (Compiler) args[0];
needsShow = (boolean) args[1];
return true;
}
return false;
}
@Override
protected void body() throws Exception {
subpass = null;
compiler.ResetVersion();
if (Global.mainModule.getMachine().type.equals(MachineType.Local)) {
subpass = Global.mainModule.getPass(PassCode.LocalSingleCommand);
} else {
subpass = Global.mainModule.getPass(PassCode.RemoteSingleCommand);
}
if (subpass != null) {
if (compiler.versionLoaded = subpass.Do(compiler.getVersionCommand())) {
target = subpass.target;
compiler.versionText = target;
compiler.ParseVersion();
}
}
}
@Override
protected boolean validate() {
return (subpass != null) && (target != null);
}
@Override
protected void showDone() throws Exception {
if (needsShow) {
(Global.mainModule.getDb()).compilers.RefreshUI();
ReadOnlyMultilineTextForm ff = new ReadOnlyMultilineTextForm();
ff.ShowDialog("Версия", target);
}
}
}