| Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/actions/ConvertMethodToGetterAction_NEW.java
|
| diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/actions/ConvertMethodToGetterAction_NEW.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/actions/ConvertMethodToGetterAction_NEW.java
|
| index b68ab08552db7457411facc77ba245e653fefa87..5fe09cd731e17a2976567c115cac3dd6b23a6559 100644
|
| --- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/actions/ConvertMethodToGetterAction_NEW.java
|
| +++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/actions/ConvertMethodToGetterAction_NEW.java
|
| @@ -13,9 +13,9 @@
|
| */
|
| package com.google.dart.tools.ui.actions;
|
|
|
| -import com.google.dart.server.generated.types.Element;
|
| import com.google.dart.server.generated.types.ElementKind;
|
| import com.google.dart.server.generated.types.NavigationRegion;
|
| +import com.google.dart.server.generated.types.NavigationTarget;
|
| import com.google.dart.tools.core.DartCore;
|
| import com.google.dart.tools.core.analysis.model.AnalysisServerNavigationListener;
|
| import com.google.dart.tools.ui.internal.actions.NewSelectionConverter;
|
| @@ -86,10 +86,10 @@ public class ConvertMethodToGetterAction_NEW extends AbstractRefactoringAction_N
|
|
|
| private void updateSelectedElement() {
|
| setEnabled(false);
|
| - Element[] elements = NewSelectionConverter.getNavigationTargets(file, selectionOffset);
|
| - if (elements.length != 0) {
|
| - Element element = elements[0];
|
| - String kind = element.getKind();
|
| + NavigationTarget[] targets = NewSelectionConverter.getNavigationTargets(file, selectionOffset);
|
| + if (targets.length != 0) {
|
| + NavigationTarget target = targets[0];
|
| + String kind = target.getKind();
|
| setEnabled(kind.equals(ElementKind.FUNCTION) || kind.equals(ElementKind.METHOD));
|
| }
|
| }
|
|
|