@Override public void getPackageNames (final String prefix, final boolean directOnly, final Set<String> result) throws InterruptedException, IOException { try { IndexManager.priorityAccess(new IndexManager.Action<Void>() { @Override public Void run () throws IOException, InterruptedException {
@Override public void getReferencesFrequences ( @NonNull final Map<String,Integer> typeFreq, @NonNull final Map<String,Integer> pkgFreq) throws IOException, InterruptedException { assert typeFreq != null; assert pkgFreq != null; if (!(index instanceof Index.WithTermFrequencies)) { throw new IllegalStateException("Index does not support frequencies!"); //NOI18N } try { IndexManager.priorityAccess(new IndexManager.Action<Void>() { @Override public Void run() throws IOException, InterruptedException { final Term startTerm = DocumentUtil.referencesTerm("", null, true); //NOI18N final StoppableConvertor<Index.WithTermFrequencies.TermFreq,Void> convertor = new FreqCollector( startTerm, typeFreq, pkgFreq); ((Index.WithTermFrequencies)index).queryTermFrequencies( Collections.<Void>emptyList(), startTerm, convertor, cancel.get()); return null; } }); } catch (IOException ioe) { this.<Void,IOException>handleException(null, ioe, root); } }
final Pair<Convertor<? super Document, T>,Index> ctu = indexPath.getPatch(convertor); try { IndexManager.priorityAccess(new IndexManager.Action<Void>() { @Override public Void run () throws IOException, InterruptedException {
final Pair<Convertor<? super Document, T>,Index> ctu = indexPath.getPatch(convertor); try { IndexManager.priorityAccess(new IndexManager.Action<Void> () { @Override public Void run () throws IOException, InterruptedException {
final ElementKind kind = element.getKind(); if (kind == ElementKind.PACKAGE) { IndexManager.priorityAccess(new IndexManager.Action<Void> () { @Override public Void run () throws IOException, InterruptedException { result); } else { IndexManager.priorityAccess(new IndexManager.Action<Void> () { @Override public Void run () throws IOException, InterruptedException {