mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-240913 [jcef] ExceptionInInitializerError when opening md file with non-default jdk
GitOrigin-RevId: 70e38f175faa08bb10382870a325b6b2cb9d381c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0b409db580
commit
3a2ce802e5
+2
-10
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package org.intellij.plugins.markdown.ui.preview.jcef;
|
||||
|
||||
import com.intellij.ui.jcef.JBCefApp;
|
||||
import org.intellij.plugins.markdown.ui.preview.MarkdownHtmlPanel;
|
||||
import org.intellij.plugins.markdown.ui.preview.MarkdownHtmlPanelProvider;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -16,16 +17,7 @@ public class JCEFHtmlPanelProvider extends MarkdownHtmlPanelProvider {
|
||||
@NotNull
|
||||
@Override
|
||||
public AvailabilityInfo isAvailable() {
|
||||
try {
|
||||
// [tav] todo: we bundle jcef.jar with API in IDEA that anyway provides this class. So we should check for jcef module presence in JBR.
|
||||
if (Class.forName("org.cef.browser.CefBrowser", false, getClass().getClassLoader()) != null) {
|
||||
return AvailabilityInfo.AVAILABLE;
|
||||
}
|
||||
}
|
||||
catch (ClassNotFoundException ignored) {
|
||||
}
|
||||
|
||||
return AvailabilityInfo.UNAVAILABLE;
|
||||
return JBCefApp.isSupported() ? AvailabilityInfo.AVAILABLE : AvailabilityInfo.UNAVAILABLE;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user