2024-10-09 22:21:57 +03:00
|
|
|
|
package _VisualDVM.ProjectData.SapforData;
|
2024-10-07 00:58:29 +03:00
|
|
|
|
import Common.Database.Objects.iDBObject;
|
2024-10-14 15:19:13 +03:00
|
|
|
|
import Common.Utils.Utils_;
|
2025-03-28 18:55:54 +03:00
|
|
|
|
import Common.Visual.Selectable;
|
2024-10-13 22:08:13 +03:00
|
|
|
|
import _VisualDVM.Global;
|
2024-10-09 22:21:57 +03:00
|
|
|
|
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
2025-03-28 18:55:54 +03:00
|
|
|
|
import com.google.gson.annotations.Expose;
|
2023-09-17 22:13:42 +03:00
|
|
|
|
import com.sun.org.glassfish.gmbal.Description;
|
|
|
|
|
|
//объект принадлежащий файлу и относящийся к его строке.
|
2025-03-28 18:55:54 +03:00
|
|
|
|
public class FileObject implements Selectable {
|
2023-09-17 22:13:42 +03:00
|
|
|
|
public String file = "";
|
2025-03-28 18:55:54 +03:00
|
|
|
|
@Expose
|
2023-09-17 22:13:42 +03:00
|
|
|
|
public int line = 1;
|
|
|
|
|
|
public FileObject() {
|
|
|
|
|
|
}
|
|
|
|
|
|
public FileObject(String file_in) {
|
|
|
|
|
|
file = file_in;
|
|
|
|
|
|
}
|
|
|
|
|
|
public DBProjectFile getFather() {
|
2024-10-13 22:08:13 +03:00
|
|
|
|
return Global.mainModule.getProject().db.files.Data.get(file);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
|
|
|
|
|
public void Show(boolean focus) {
|
2024-10-15 02:32:52 +03:00
|
|
|
|
Global.mainModule.getUI().getMainWindow().getProjectWindow().GotoFile(file, line, focus);
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|
2025-03-28 18:55:54 +03:00
|
|
|
|
//Selectable----
|
|
|
|
|
|
@Description("IGNORE")
|
|
|
|
|
|
boolean selected=false;
|
|
|
|
|
|
public String getSelectionText() {
|
|
|
|
|
|
return "файл " + Utils_.Brackets(file) + " строка: " + line;
|
|
|
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public boolean isSelected() {
|
|
|
|
|
|
return selected;
|
|
|
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public void select(boolean flag) {
|
|
|
|
|
|
selected = flag;
|
|
|
|
|
|
}
|
|
|
|
|
|
//-------
|
2025-03-31 14:40:09 +03:00
|
|
|
|
public void setFile(String file_in){
|
|
|
|
|
|
file = file_in;
|
|
|
|
|
|
}
|
2023-09-17 22:13:42 +03:00
|
|
|
|
}
|