| Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractUtils.java
|
| diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractUtils.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractUtils.java
|
| index 278fc0fdbb6a9f3a8d8c3b2d4a3a2d0d0919ca5e..4e45a81b4a0f164946a84697af3dfccd735c7f34 100644
|
| --- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractUtils.java
|
| +++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/internal/corext/refactoring/code/ExtractUtils.java
|
| @@ -23,6 +23,7 @@ import com.google.dart.compiler.ast.DartStatement;
|
| import com.google.dart.compiler.ast.DartUnit;
|
| import com.google.dart.compiler.common.HasSourceInfo;
|
| import com.google.dart.compiler.common.SourceInfo;
|
| +import com.google.dart.compiler.parser.DartParser;
|
| import com.google.dart.compiler.parser.DartScanner;
|
| import com.google.dart.compiler.parser.Token;
|
| import com.google.dart.compiler.type.Type;
|
| @@ -108,7 +109,10 @@ public class ExtractUtils {
|
| }
|
| Type type = expression.getType();
|
| String typeSource = getTypeSource(type);
|
| - if ("Dynamic".equals(typeSource)) {
|
| + if ("dynamic".equals(typeSource)) {
|
| + return null;
|
| + }
|
| + if (DartParser.DYNAMIC_KEYWORD_DEPRECATED.equals(typeSource)) {
|
| return null;
|
| }
|
| return typeSource;
|
| @@ -119,8 +123,14 @@ public class ExtractUtils {
|
| */
|
| public static String getTypeSource(Type type) {
|
| String typeSource = type.toString();
|
| - typeSource = StringUtils.replace(typeSource, "<Dynamic>", "");
|
| - typeSource = StringUtils.replace(typeSource, "<Dynamic, Dynamic>", "");
|
| + typeSource = StringUtils.replace(typeSource, "<dynamic>", "");
|
| + typeSource = StringUtils.replace(typeSource, "<dynamic, dynamic>", "");
|
| + typeSource = StringUtils.replace(
|
| + typeSource,
|
| + "<" + DartParser.DYNAMIC_KEYWORD_DEPRECATED + ">",
|
| + "");
|
| + typeSource = StringUtils.replace(typeSource, "<" + DartParser.DYNAMIC_KEYWORD_DEPRECATED + ", "
|
| + + DartParser.DYNAMIC_KEYWORD_DEPRECATED + ">", "");
|
| return typeSource;
|
| }
|
|
|
|
|