summaryrefslogtreecommitdiff
path: root/xml/openapi/src/com/intellij
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2013-08-07 11:11:08 -0700
committerTor Norbye <tnorbye@google.com>2013-08-07 11:11:08 -0700
commit6739a8f0977b70ddc8a8283b169902da3f2eecb3 (patch)
tree5c5573c2ac01544f02d9318671aa558769726289 /xml/openapi/src/com/intellij
parentc1ace1f7e1e49c81bb4b75377c99f07be340abfe (diff)
downloadidea-6739a8f0977b70ddc8a8283b169902da3f2eecb3.tar.gz
Snapshot af729d01433bb5bbd6ca93c0fdf9778b36d624ce from master branch of git://git.jetbrains.org/idea/community.git
Change-Id: I214dd066d0d27444a26166c0eae1a5aaf3705d49
Diffstat (limited to 'xml/openapi/src/com/intellij')
-rw-r--r--xml/openapi/src/com/intellij/ide/browsers/WebBrowserUrlProvider.java17
1 files changed, 7 insertions, 10 deletions
diff --git a/xml/openapi/src/com/intellij/ide/browsers/WebBrowserUrlProvider.java b/xml/openapi/src/com/intellij/ide/browsers/WebBrowserUrlProvider.java
index 688191fcef19..2bdf78c50732 100644
--- a/xml/openapi/src/com/intellij/ide/browsers/WebBrowserUrlProvider.java
+++ b/xml/openapi/src/com/intellij/ide/browsers/WebBrowserUrlProvider.java
@@ -35,26 +35,23 @@ public abstract class WebBrowserUrlProvider {
}
}
- public boolean canHandleElement(@NotNull PsiElement element, @NotNull PsiFile psiFile, Ref<Url> result) {
+ public boolean canHandleElement(@NotNull PsiElement element, @NotNull PsiFile psiFile, @NotNull Ref<Url> result) {
VirtualFile file = psiFile.getVirtualFile();
if (file == null) {
return false;
}
- Url url;
try {
- url = getUrl(element, psiFile, file);
+ Url url = getUrl(element, psiFile, file);
+ if (url != null) {
+ result.set(url);
+ return true;
+ }
}
catch (BrowserException ignored) {
- return false;
- }
-
- if (url == null) {
- return false;
}
- result.set(url);
- return true;
+ return false;
}
@Nullable