| Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/actions/OpenExternalDartdocAction.java
|
| ===================================================================
|
| --- editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/actions/OpenExternalDartdocAction.java (revision 13960)
|
| +++ editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/actions/OpenExternalDartdocAction.java (working copy)
|
| @@ -36,7 +36,6 @@
|
| import org.eclipse.ui.browser.IWebBrowser;
|
| import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
|
|
|
| -import java.lang.reflect.InvocationTargetException;
|
| import java.net.MalformedURLException;
|
| import java.net.URL;
|
| import java.util.ArrayList;
|
| @@ -148,11 +147,14 @@
|
| */
|
| private DartElement getDartElementToOpen(ITextSelection selection) {
|
| CompilationUnit input = SelectionConverter.getInputAsCompilationUnit(editor);
|
| + if (input == null || selection == null) {
|
| + return null;
|
| + }
|
| if (!ActionUtil.isProcessable(getShell(), input)) {
|
| return null;
|
| }
|
| try {
|
| - DartElement[] elements = SelectionConverter.codeResolveOrInputForked(editor);
|
| + DartElement[] elements = SelectionConverter.codeResolve(editor);
|
| if (elements == null) {
|
| return null;
|
| }
|
| @@ -176,10 +178,8 @@
|
| return dartElement;
|
| }
|
| }
|
| - } catch (InvocationTargetException e) {
|
| + } catch (DartModelException e) {
|
| DartToolsPlugin.log(e);
|
| - } catch (InterruptedException e) {
|
| - DartToolsPlugin.log(e);
|
| }
|
| return null;
|
| }
|
|
|