protected void run(IStructuredSelection selection) { try { Assert.isTrue(canEnable(selection));  Object first= selection.getFirstElement(); Assert.isTrue(first instanceof IMethod);  IMethod method= (IMethod) first; run(method.getNameRange().getOffset(), method.getNameRange().getLength(), method.getCompilationUnit()); } catch (JavaModelException e) { ExceptionHandler.handle(e, getShell(), DIALOG_TITLE, RefactoringMessages.getString("InlineMethodAction.unexpected_exception")); }
protected void run(ITextSelection selection) { ICompilationUnit cu= getCompilationUnit(); if (cu == null) return; run(selection.getOffset(), selection.getLength(), cu);
	protected void run(IStructuredSelection selection) {		try {			Assert.isTrue(canEnable(selection));			Object first= selection.getFirstElement();			Assert.isTrue(first instanceof IMethod);			IMethod method= (IMethod) first;			run(method.getNameRange().getOffset(), method.getNameRange().getLength(), method.getCompilationUnit());		} catch (JavaModelException e) {			ExceptionHandler.handle(e, getShell(), DIALOG_TITLE, RefactoringMessages.getString("InlineMethodAction.unexpected_exception")); //$NON-NLS-1$		}	}