]>
Commit | Line | Data |
---|---|---|
2d553c1f AE |
1 | package no.uio.ifi.refaktor.handlers; |
2 | ||
bc6d84b1 | 3 | import no.uio.ifi.refaktor.analyze.candidates.ExtractLocalVariableCandidate; |
7a62bc80 | 4 | import no.uio.ifi.refaktor.change.SearchBasedRefactorChanger; |
e1b541ae | 5 | import no.uio.ifi.refaktor.change.changers.ProjectWideRefactorChanger; |
bc6d84b1 | 6 | import no.uio.ifi.refaktor.factories.ExtractLocalVariableFactory; |
8aac429a | 7 | import no.uio.ifi.refaktor.forTests.Refactorer; |
2d553c1f | 8 | |
2d553c1f | 9 | import org.eclipse.jdt.core.IMethod; |
2d553c1f | 10 | |
e1b541ae AE |
11 | import org.eclipse.core.resources.IProject; |
12 | ||
7a62bc80 | 13 | public class SearchBasedExtractLocalVariableWithAssertsHandler extends RefactorHandler{ |
2d553c1f AE |
14 | |
15 | @Override | |
7a62bc80 A |
16 | protected boolean supports(IMethod m) { |
17 | return true; | |
18 | } | |
2d553c1f | 19 | |
7a62bc80 A |
20 | @Override |
21 | protected boolean supports(IProject p) { | |
22 | return true; | |
23 | } | |
df7eb88a | 24 | |
7a62bc80 A |
25 | @Override |
26 | protected Refactorer getChanger(IMethod method) { | |
27 | return new SearchBasedRefactorChanger<ExtractLocalVariableCandidate>(method, new ExtractLocalVariableFactory()); | |
28 | } | |
29 | ||
30 | @Override | |
31 | protected Refactorer getChanger(IProject project) { | |
32 | return new ProjectWideRefactorChanger<ExtractLocalVariableCandidate>(project, new ExtractLocalVariableFactory()); | |
2d553c1f AE |
33 | } |
34 | ||
35 | } |