summaryrefslogtreecommitdiff
path: root/plugins/structuralsearch/source/com/intellij/structuralsearch/MatchResultSink.java
blob: 8a4fdf968a8c7584f5bb323d2d070f50d6b0ba15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.intellij.structuralsearch;

import com.intellij.psi.PsiFile;
import com.intellij.structuralsearch.MatchingProcess;
import com.intellij.openapi.progress.ProgressIndicator;

/**
 * Interface for consumers of match results
 */
public interface MatchResultSink {
  /**
   * Notifies sink about new match
   * @param result
   */
  void newMatch(MatchResult result);

  /**
   *  Notifies sink about starting the matching for given element
   * @param element the current file
   */
  void processFile(PsiFile element);

  /**
   * Sets the reference to the matching process
   * @param matchingProcess the matching process reference
   */
  void setMatchingProcess(MatchingProcess matchingProcess);

  /**
   * Notifies sink about end of matching.
   */
  void matchingFinished();

  ProgressIndicator getProgressIndicator();
}