39 lines
1.3 KiB
Java
39 lines
1.3 KiB
Java
package _VisualDVM.GlobalData.Module;
|
|
import Common.CommonConstants;
|
|
import Common.Utils.Utils_;
|
|
import _VisualDVM.Current;
|
|
import _VisualDVM.Global;
|
|
import _VisualDVM.GlobalData.Makefile.Makefile;
|
|
import _VisualDVM.ProjectData.LanguageName;
|
|
public class Module extends ModuleAnchestor {
|
|
public int makefile_id = CommonConstants.Nan;
|
|
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 Global.mainModule.matchCurrentID(Current.Makefile, makefile_id);
|
|
}
|
|
@Override
|
|
public boolean isSelected() {
|
|
return on > 0;
|
|
}
|
|
@Override
|
|
public void Select(boolean flag) {
|
|
on = flag ? 1 : 0;
|
|
try {
|
|
Global.mainModule.getDb().Update(this);
|
|
} catch (Exception e) {
|
|
Utils_.MainLog.PrintException(e);
|
|
}
|
|
}
|
|
}
|