Tool window with embedded java-cef

Answered

Hello dear IntelliJ support team,

I am working on embedding Java Chromium Embedded Framework (https://bitbucket.org/chromiumembedded/java-cef/overview) into a tool window plugin. I am using this example https://github.com/JetBrains/intellij-sdk-docs/tree/master/code_samples/tool_window) as starting point.

 

I have read docs https://www.jetbrains.org/intellij/sdk/docs/user_interface_components/tool_windows.html , but still, have difficulties with embedding. Could you be so kind as to briefly outline classes/methods I need to create.

Browser instalnce is object of java.awt.Component. Please reffer to screenshot https://gifyu.com/image/3BLt

Thank you in advance.

3 comments
Comment actions Permalink

in com.intellij.openapi.wm.ToolWindowFactory#createToolWindowContent:

ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
Content myContent = contentFactory.createContent(<yourComponent>, "title", false);

toolWindow.getContentManager().addContent(content);

0
Comment actions Permalink

Thank you, that works

0
Comment actions Permalink

@2111311792 I wonder  how did you package the JCEF distribution along with the plugins? 


thanks, 

Frank

0

Please sign in to leave a comment.