Search in sources :

Example 1 with PrepareApplyRefactoringsJob

use of org.autorefactor.refactoring.PrepareApplyRefactoringsJob in project AutoRefactor by JnRouvignac.

the class AutoRefactorHandler method execute.

@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
    Environment environment = getEnvironment();
    new PrepareApplyRefactoringsJob(getSelectedJavaElements(event), AllRefactoringRules.getConfiguredRefactoringRules(environment.getPreferences()), environment).schedule();
    // Use ASTMatcher and do not compare content of expressions, compare just resolvedTypeBinding().
    return null;
}
Also used : PrepareApplyRefactoringsJob(org.autorefactor.refactoring.PrepareApplyRefactoringsJob) Environment(org.autorefactor.environment.Environment)

Example 2 with PrepareApplyRefactoringsJob

use of org.autorefactor.refactoring.PrepareApplyRefactoringsJob in project AutoRefactor by JnRouvignac.

the class ChooseRefactoringsWizard method performFinish.

@Override
public boolean performFinish() {
    final List<RefactoringRule> refactoringRules = chooseRefactoringsPage.getSelectedRefactorings();
    new PrepareApplyRefactoringsJob(javaElements, refactoringRules, getEnvironment()).schedule();
    return !refactoringRules.isEmpty();
}
Also used : RefactoringRule(org.autorefactor.refactoring.RefactoringRule) PrepareApplyRefactoringsJob(org.autorefactor.refactoring.PrepareApplyRefactoringsJob)

Aggregations

PrepareApplyRefactoringsJob (org.autorefactor.refactoring.PrepareApplyRefactoringsJob)2 Environment (org.autorefactor.environment.Environment)1 RefactoringRule (org.autorefactor.refactoring.RefactoringRule)1