2023-09-17 22:13:42 +03:00
|
|
|
package GlobalData.Module;
|
2024-10-07 00:58:29 +03:00
|
|
|
import Common_old.Constants;
|
|
|
|
|
import Common_old.Current;
|
|
|
|
|
import _VisualDVM.Global;
|
2023-09-17 22:13:42 +03:00
|
|
|
import GlobalData.Makefile.Makefile;
|
|
|
|
|
import ProjectData.LanguageName;
|
|
|
|
|
public class Module extends ModuleAnchestor {
|
2023-09-29 21:46:08 +03:00
|
|
|
public int makefile_id = Constants.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 {
|
|
|
|
|
Global.db.Update(this);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
Global.Log.PrintException(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|