how to Open the web page in the file editor position?


idea plugin develop, I want to click a button in the toolwindow, and different buttons represent different URLs. Open the web page in the file editor position. i need use jcef with jbcefbrowser and cefmessagerouter. 

 I looked at it JCEFHtmlPanelProvider, but do not know how to work? 
The effect is as shown in the figure



Please clarify.

What are URLs? Do they contain hash and do you want to navigate to the hash position?

What is registermessagerouterhanlder? I cannot find anything similar.

There is no figure attached.


hi Karol Lewandowski 

i use jcef

I will pass it to the plugin code  through js handler. Here is a handler for receiving the url. like cefmessagerouter.

the url like or any website

My purpose is to create a window in the picture. In the window is a jcefbrowser. After specifying the url, the window will be the same as the browser.

Click this tab page( position 1 in the picture. I want this window to look the same as the file editor next to it,and it will display the browser (position 2 in the picture).


Sorry, but it's hard to understand what you are trying to implement, but I assume you want to open pages in the browser like in the editor. If this is the case, then try implementing the com.intellij.openapi.fileEditor.FileEditor and com.intellij.openapi.fileEditor.FileEditorProvider. FileEditor.getComponent() should return a component which will embed the browser. Implementing editor is not trivial. I suggest getting inspiration from the existing implementations:

Also, a potentially similar plugin to what you want to implement: (it displays pages in a tool window).


Please sign in to leave a comment.