Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/RefactoringExecutionStarter.java

Issue 10823372: 'Inline Method' refactoring (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/RefactoringExecutionStarter.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/RefactoringExecutionStarter.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/RefactoringExecutionStarter.java
index 87e572727b9f1618219460ea8c9870a558c110c1..dec2585861e37f85d1b4b598eb53021104255166 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/RefactoringExecutionStarter.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/RefactoringExecutionStarter.java
@@ -226,8 +226,8 @@ public final class RefactoringExecutionStarter {
Shell shell) {
try {
DartElement[] elements = unit.codeSelect(offset, length);
- if (elements.length == 1 && elements[0] instanceof Method) {
- Method method = (Method) elements[0];
+ if (elements.length == 1 && elements[0] instanceof DartFunction) {
+ DartFunction method = (DartFunction) elements[0];
InlineMethodRefactoring refactoring = new InlineMethodRefactoring(method, unit, offset);
if (refactoring != null) {
new RefactoringStarter().activate(

Powered by Google App Engine
This is Rietveld 408576698