|
if (!ActionUtil.isProcessable(getShell(),
fEditor))
return;
try{
ExtractMethodRefactoring
refactoring=
ExtractMethodRefactoring.create(SelectionConverter.getInputAsCompilationUnit(fEditor),
selection.getOffset(), selection.getLength());
if
(refactoring == null)
return;
new
RefactoringStarter().activate(refactoring, new ExtractMethodWizard(refactoring),
getShell(), DIALOG_MESSAGE_TITLE, false);
}
catch (CoreException e){
ExceptionHandler.handle(e,
DIALOG_MESSAGE_TITLE, RefactoringMessages.NewTextRefactoringAction_exception);
}
|