blob: 318e88f27c2426d1c69345a53f4cb35fb78e140c (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
package com.intellij.structuralsearch.plugin.replace.impl;
import com.intellij.psi.PsiElement;
import com.intellij.psi.SmartPsiElementPointer;
import com.intellij.structuralsearch.MatchResult;
import com.intellij.structuralsearch.plugin.replace.ReplacementInfo;
import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.util.Map;
/**
* Created by IntelliJ IDEA.
* User: maxim
* Date: 03.12.2004
* Time: 21:33:53
* To change this template use File | Settings | File Templates.
*/
public class ReplacementInfoImpl extends ReplacementInfo {
List<SmartPsiElementPointer> matchesPtrList;
String result;
MatchResult matchResult;
Map<String,MatchResult> variableMap;
Map<PsiElement,String> elementToVariableNameMap;
public String getReplacement() {
return result;
}
public void setReplacement(String replacement) {
result = replacement;
}
@Nullable
@Override
public PsiElement getMatch(int index) {
return matchesPtrList.get(index).getElement();
}
@Override
public int getMatchesCount() {
return matchesPtrList.size();
}
public Map<String, MatchResult> getVariableMap() {
return variableMap;
}
public MatchResult getMatchResult() {
return matchResult;
}
}
|