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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/actions/OpenExternalDartdocAction.java

Issue 11233060: Cherry picked bug fix for 6161: svn merge -c 13959 https://dart.googlecode.com/svn/branches/bleedin… (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 8 years, 2 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
« no previous file with comments | « no previous file | tools/VERSION » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | tools/VERSION » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698