Search in sources :

Example 1 with SearchFor

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;
}
Also used : ErlangSearchPattern(org.erlide.engine.services.search.ErlangSearchPattern) SearchFor(org.erlide.engine.services.search.SearchFor)

Aggregations

ErlangSearchPattern (org.erlide.engine.services.search.ErlangSearchPattern)1 SearchFor (org.erlide.engine.services.search.SearchFor)1