private void addMacroPaths(final CompletionResult result, final String typedText) { result.myMacros = new ArrayList<LookupFile>(); final Iterator<String> macros = myMacroMap.keySet().iterator(); while (macros.hasNext()) { String eachMacro = macros.next(); if (eachMacro.toUpperCase().startsWith(typedText.toUpperCase())) { final String eachPath = myMacroMap.get(eachMacro); if (eachPath != null) { final LookupFile macroFile = myFinder.find(eachPath); if (macroFile != null && macroFile.exists()) { result.myMacros.add(macroFile); result.myToComplete.add(macroFile); macroFile.setMacro(eachMacro); } } } } }