Files
VisualSapfor/src/_VisualDVM/GlobalData/Module/Module.java

38 lines
1.2 KiB
Java
Raw Normal View History

2024-10-09 22:21:57 +03:00
package _VisualDVM.GlobalData.Module;
2024-10-07 14:22:52 +03:00
import Common.CommonConstants;
2024-10-11 00:00:30 +03:00
import Common.Utils.Utils_;
2024-10-09 22:01:19 +03:00
import _VisualDVM.Current;
2024-10-09 22:21:57 +03:00
import _VisualDVM.GlobalData.Makefile.Makefile;
import _VisualDVM.ProjectData.LanguageName;
2023-09-17 22:13:42 +03:00
public class Module extends ModuleAnchestor {
2024-10-07 14:22:52 +03:00
public int makefile_id = CommonConstants.Nan;
2023-09-17 22:13:42 +03:00
public LanguageName language = LanguageName.n;
public int on = 1; //учитывать ли модуль при сборке. указание пользователя. если файлы отсутствуют - игнорится
public Module() {
}
public Module(LanguageName language_in, Makefile makefile) {
language = language_in;
if (makefile != null) {
makefile_id = makefile.id;
machine_id = makefile.machine_id;
}
}
@Override
public boolean isVisible() {
return Current.HasMakefile() && (makefile_id == Current.getMakefile().id);
}
@Override
public boolean isSelected() {
return on > 0;
}
@Override
public void Select(boolean flag) {
on = flag ? 1 : 0;
try {
2024-10-11 00:00:30 +03:00
Utils_.db.Update(this);
2023-09-17 22:13:42 +03:00
} catch (Exception e) {
2024-10-11 00:00:30 +03:00
Utils_.MainLog.PrintException(e);
2023-09-17 22:13:42 +03:00
}
}
}