use of org.erlide.engine.services.search.SearchFor in project erlide_eclipse by erlang.
the class ErlangSearchPage method determineInitValuesFrom.
private SearchPatternData determineInitValuesFrom(final IErlModule module, final int offset, final OpenResult res) throws ErlModelException {
if (res == null) {
return null;
}
final ErlangSearchPattern pattern = SearchUtil.getSearchPatternFromOpenResultAndLimitTo(module, offset, res, LimitTo.REFERENCES, true);
final String patternString = pattern == null ? "" : pattern.patternString();
final SearchFor searchFor = pattern == null ? SearchFor.FUNCTION : pattern.getSearchFor();
final SearchPatternData searchPatternData = new SearchPatternData(patternString, ISearchPageContainer.WORKSPACE_SCOPE, LimitTo.REFERENCES, searchFor, null, SearchUtil.SEARCH_IN_SOURCES);
return searchPatternData;
}
Aggregations