1 package no.uio.ifi.refaktor.analyze;
3 import no.uio.ifi.refaktor.analyze.collectors.LongestCommonPrefixCollector;
4 import no.uio.ifi.refaktor.analyze.collectors.SelectionValidator;
5 import no.uio.ifi.refaktor.utils.CompilationUnitTextSelection;
7 public class LongestCommonPrefixAnalyzer implements Analyzer {
9 private final CompilationUnitTextSelection selection;
10 private final LongestCommonPrefixCollector longestCommonPrefixCollector;
12 public LongestCommonPrefixAnalyzer(CompilationUnitTextSelection selection) {
13 this.selection = selection;
14 longestCommonPrefixCollector = new LongestCommonPrefixCollector(selection);
17 public String stringProperty() {
18 return longestCommonPrefixCollector.getProperty().toString();
22 public void analyze() {
23 CollectorManager.collectProperties(selection, longestCommonPrefixCollector);
26 public void checkIfSelectionIsValid() {
27 SelectionValidator.checkIfSelectionIsValid(selection);