no message

This commit is contained in:
2024-10-20 20:51:23 +03:00
parent f6da288ec5
commit b40328f931
56 changed files with 422 additions and 310 deletions

View File

@@ -443,16 +443,7 @@ public class Message extends FileObject {
break;
}
}
@Override
public boolean isVisible() {
return true;
/*
if (Global.mainModule.HasFile() && Global.mainModule.getFile().name.equals(file)) {
Object o = Global.mainModule.get(Current.FileGraphElement);
return !(o instanceof FileObjectWithMessages) || ((FileObjectWithMessages) o).HasMessage(this);
} else return false;
*/
}
@Override
public Object getFieldAt(int columnIndex) {
switch (columnIndex) {

View File

@@ -40,11 +40,22 @@ public class MessagesControlForm extends DataSetControlForm<Message> {
}
*/
@Override
public Comparator<Message> getDefaultComparator() {
protected Comparator<Message> getDefaultComparator() {
return Comparator.comparingInt(o -> o.line);
}
@Override
public boolean hasMenuBar() {
return false;
}
@Override
public boolean isObjectVisible(Message object) {
return true;
}
/*
if (Global.mainModule.HasFile() && Global.mainModule.getFile().name.equals(file)) {
Object o = Global.mainModule.get(Current.FileGraphElement);
return !(o instanceof FileObjectWithMessages) || ((FileObjectWithMessages) o).HasMessage(this);
} else return false;
*/
}

View File

@@ -42,10 +42,6 @@ public class MessageRecommendation extends iDBObject {
argValue.equals(recommendation_in.argValue);
}
@Override
public boolean isVisible() {
return true;
}
@Override
public Object getFieldAt(int columnIndex) {
switch (columnIndex) {
case 1:

View File

@@ -8,8 +8,4 @@ public class MessageWarning extends Message {
}
public MessageWarning() {
}
@Override
public boolean isVisible() {
return super.isVisible() && Global.mainModule.getProject().db.warnings.getUI().ApplyFilters(this);
}
}

View File

@@ -368,15 +368,6 @@ public class ProjectArray extends DBObject {
return (State == ArrayState.Selected);
}
//-
@Override
public boolean isVisible() {
if (isTemplFlag > 0) return true;
return shortName.startsWith(filterName) &&
location.toString().startsWith(filterLocation) &&
locName.startsWith(filterLocationName) &&
has_decl_place(filterFile) &&
has_region(filterRegion);
}
public void init_new_ac() {
ac_new.clear();
for (int dim : ac_current.keySet())

View File

@@ -39,4 +39,13 @@ public class ProjectArraysForm extends DataSetControlForm<ProjectArray> {
columns.get(4).setMaxWidth(200);
}
}
@Override
public boolean isObjectVisible(ProjectArray object) {
if (object.isTemplFlag > 0) return true;
return object.shortName.startsWith(object.filterName) &&
object.location.toString().startsWith(object.filterLocation) &&
object.locName.startsWith(object.filterLocationName) &&
object.has_decl_place(object.filterFile) &&
object.has_region(object.filterRegion);
}
}