Exemplo n.º 1
0
 public void clearItems() {
   synchronized (lock) {
     myItems.clear();
     mySortedItems.clear();
     myRelevanceClassifier = myArranger.createRelevanceClassifier();
   }
 }
Exemplo n.º 2
0
  public void addItem(LookupElement item) {
    synchronized (lock) {
      myRelevanceClassifier.addElement(item);
      mySortedItems.add(
          item); // ProcessCanceledException may occur in these two lines, then this element is
      // considered not added

      myItems.add(item);
      stamp++;
    }
  }