use of org.apache.hop.core.search.ISearchable in project hop by apache.
the class HopDataOrchestrationPerspective method getSearchables.
@Override
public List<ISearchable> getSearchables() {
List<ISearchable> searchables = new ArrayList<>();
for (final TabItemHandler item : items) {
// The type handler is the pipeline or workflow
//
IHopFileTypeHandler typeHandler = item.getTypeHandler();
searchables.add(new ISearchable() {
@Override
public String getLocation() {
return "Data orchestration perspective in tab : " + item.getTabItem().getText();
}
@Override
public String getName() {
return typeHandler.getName();
}
@Override
public String getType() {
return typeHandler.getFileType().getName();
}
@Override
public String getFilename() {
return typeHandler.getFilename();
}
@Override
public Object getSearchableObject() {
return typeHandler.getSubject();
}
@Override
public ISearchableCallback getSearchCallback() {
return (searchable, searchResult) -> {
activate();
switchToTab(item);
};
}
});
}
return searchables;
}
Aggregations