summaryrefslogtreecommitdiff
path: root/platform/structuralsearch/source/com/intellij/structuralsearch/MatchResultSink.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/structuralsearch/source/com/intellij/structuralsearch/MatchResultSink.java')
-rw-r--r--platform/structuralsearch/source/com/intellij/structuralsearch/MatchResultSink.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/platform/structuralsearch/source/com/intellij/structuralsearch/MatchResultSink.java b/platform/structuralsearch/source/com/intellij/structuralsearch/MatchResultSink.java
new file mode 100644
index 000000000000..8a4fdf968a8c
--- /dev/null
+++ b/platform/structuralsearch/source/com/intellij/structuralsearch/MatchResultSink.java
@@ -0,0 +1,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();
+}