01: package core;
02:
03: import org.eclipse.jdt.core.IJavaElement;
04:
05: /**
06: * Each kind of refactoring consists of three parts.
07: * The first part does the modification on the target element.
08: * The second part eventually updates concerning compilation units.
09: * The last part does the update on the model
10: *
11: * @author sh
12: *
13: */
14: public interface IRefactoring {
15:
16: /**
17: * Does the modification on the given model element.
18: *
19: * @param modelElement the model element to modify
20: */
21: public void modification(IJavaElement modelElement);
22:
23: /**
24: * Scans all source files in the workspace and checks
25: * if modifications are needed to do.
26: *
27: * @param modelElement the model element has been refactered
28: */
29: public void updateSource(IJavaElement modelElement);
30:
31: /**
32: * Scans all model files in the workspace and starts the updating
33: * process.
34: *
35: * @param modelElement the model element to update
36: */
37: public void updateModel(IJavaElement modelElement);
38:
39: /**
40: * Starts the refactoring process.
41: * It invokes the modification, updateSource and
42: * updateModel call.
43: *
44: * @param info the info object containing all important
45: * information for refactoring
46: */
47: public void process(RefactorInfo info);
48: }
|