2024-10-14 12:14:01 +03:00
|
|
|
package _VisualDVM.Passes.All;
|
2024-10-24 23:40:24 +03:00
|
|
|
import Common.MainModule_;
|
2024-10-14 15:19:13 +03:00
|
|
|
import Common.Passes.Pass;
|
2024-10-09 22:01:19 +03:00
|
|
|
import _VisualDVM.Current;
|
2024-10-13 22:08:13 +03:00
|
|
|
import _VisualDVM.Global;
|
2024-10-24 23:40:24 +03:00
|
|
|
import _VisualDVM.GlobalData.Makefile.Makefile;
|
2024-10-09 22:21:57 +03:00
|
|
|
import _VisualDVM.GlobalData.Makefile.UI.MakefilePreviewForm;
|
2024-10-14 12:14:01 +03:00
|
|
|
import _VisualDVM.Passes.PassCode;
|
2025-02-16 22:37:26 +03:00
|
|
|
import _VisualDVM.ProjectData.LanguageName;
|
2024-10-14 15:19:13 +03:00
|
|
|
import _VisualDVM.ProjectData.Project.db_project_info;
|
2024-10-09 23:37:58 +03:00
|
|
|
public class ShowMakefilePreview extends Pass<db_project_info> {
|
2023-09-17 22:13:42 +03:00
|
|
|
@Override
|
|
|
|
|
public String getIconPath() {
|
|
|
|
|
return "/icons/ShowPassword.png";
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public String getButtonText() {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected boolean canStart(Object... args) {
|
2024-10-25 02:08:23 +03:00
|
|
|
if (Global.mainModule.Check(Log, Current.Project) && MainModule_.instance.getDb().getTable(Makefile.class).getUI().CheckCurrent(Log)) {
|
2024-10-13 22:08:13 +03:00
|
|
|
target = Global.mainModule.getProject();
|
2025-02-16 22:37:26 +03:00
|
|
|
return !target.languageName.equals(LanguageName.fortran) || Global.mainModule.getPass(PassCode.SPF_ParseFilesWithOrder).Do();
|
2023-09-17 22:13:42 +03:00
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected void body() throws Exception {
|
|
|
|
|
new MakefilePreviewForm().ShowDialog("Предпросмотр мейкфайла для текущего проекта",
|
2024-10-24 23:40:24 +03:00
|
|
|
MainModule_.instance.getDb().getTable(Makefile.class).getUI().getCurrent().Generate(target));
|
2023-09-17 22:13:42 +03:00
|
|
|
}
|
|
|
|
|
}
|