2023-11-19 02:12:44 +03:00
|
|
|
package Visual_DVM_2021.Passes.All;
|
2024-10-08 00:39:13 +03:00
|
|
|
import Common.CurrentAnchestor;
|
2024-10-07 00:58:29 +03:00
|
|
|
import Common_old.Current;
|
2023-09-17 22:13:42 +03:00
|
|
|
import GlobalData.Makefile.UI.MakefilePreviewForm;
|
|
|
|
|
import ProjectData.Project.db_project_info;
|
2023-11-19 02:12:44 +03:00
|
|
|
import Visual_DVM_2021.Passes.PassCode_2021;
|
|
|
|
|
import Visual_DVM_2021.Passes.Pass_2021;
|
2023-09-17 22:13:42 +03:00
|
|
|
public class ShowMakefilePreview extends Pass_2021<db_project_info> {
|
|
|
|
|
@Override
|
|
|
|
|
public String getIconPath() {
|
|
|
|
|
return "/icons/ShowPassword.png";
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public String getButtonText() {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected PassCode_2021 necessary() {
|
|
|
|
|
return PassCode_2021.SPF_ParseFilesWithOrder;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected boolean canStart(Object... args) {
|
2024-10-08 00:39:13 +03:00
|
|
|
if (CurrentAnchestor.Check(Log, Current.Project)) {
|
2023-09-17 22:13:42 +03:00
|
|
|
target = Current.getProject();
|
2024-10-08 00:39:13 +03:00
|
|
|
return CurrentAnchestor.Check(Log, Current.Makefile);
|
2023-09-17 22:13:42 +03:00
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
protected void body() throws Exception {
|
|
|
|
|
new MakefilePreviewForm().ShowDialog("Предпросмотр мейкфайла для текущего проекта",
|
|
|
|
|
Current.getMakefile().Generate(target));
|
|
|
|
|
}
|
|
|
|
|
}
|