Ejemplo n.º 1
0
 private SearchPatternData determineInitValuesFrom(final IErlElement e) {
   final ErlangSearchPattern pattern =
       new SearchPatternFactory(ErlangEngine.getInstance().getModelUtilService())
           .getSearchPatternFromErlElementAndLimitTo(e, getLimitTo());
   if (pattern == null) {
     return null;
   }
   return new SearchPatternData(
       pattern.patternString(),
       ISearchPageContainer.WORKSPACE_SCOPE,
       LimitTo.REFERENCES,
       pattern.getSearchFor(),
       null,
       getLastIncludeMask());
 }
Ejemplo n.º 2
0
 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;
 }