44 lines
1.3 KiB
Java
44 lines
1.3 KiB
Java
package _VisualDVM.ProjectData.SapforData;
|
||
import Common.Database.Objects.iDBObject;
|
||
import Common.Utils.Utils_;
|
||
import Common.Visual.Selectable;
|
||
import _VisualDVM.Global;
|
||
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
||
import com.google.gson.annotations.Expose;
|
||
import com.sun.org.glassfish.gmbal.Description;
|
||
//объект принадлежащий файлу и относящийся к его строке.
|
||
public class FileObject implements Selectable {
|
||
public String file = "";
|
||
@Expose
|
||
public int line = 1;
|
||
public FileObject() {
|
||
}
|
||
public FileObject(String file_in) {
|
||
file = file_in;
|
||
}
|
||
public DBProjectFile getFather() {
|
||
return Global.mainModule.getProject().db.files.Data.get(file);
|
||
}
|
||
public void Show(boolean focus) {
|
||
Global.mainModule.getUI().getMainWindow().getProjectWindow().GotoFile(file, line, focus);
|
||
}
|
||
//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;
|
||
}
|
||
//-------
|
||
public void setFile(String file_in){
|
||
file = file_in;
|
||
}
|
||
}
|