Rendering HTML page for a plugin

I need to develop a plugin that that renders an HTML visualization of d3.js from java code. In eclipse this was possible due to internal browser support. However, after checking out OpenAPI, I couldn't find any kind of component like this. I don't mean to just see the code of it, but instead to show the actual content (as displayed in the browser)

 

  1. Is this kind of rendering possible in IntelliJ? If yes, how?
  2. If it is not, could you suggest any kind of work around that could make this possible? I know JavaFX has browser support but I am not sure on how to configure an IntelliJ plugin to use JavaFX (any help on this would be welcome)

Thanks!

2 comments

Does anyone know anything about this? It would be really helpful to know if it possible so that we could proceed

0

Hi João,

I've investigated this a couple of times, unfortunately the story is fairly sad. Swing's built-in HTML renderer is very basic and definitely won't work for d3. JavaFX is only available in later Java versions, and on OSX many users are still on JDK6. IntelliJ now bundles a JRE 8, but I believe that doesn't contain JavaFX since it's based on OpenJDK and isn't a full JDK anyway.

There are a few libraries which allow embedding a real browser engine in a Swing component which you could bundle with your plugin. JXBrowser is one commercial one, and there are a couple of free ones too. They're quite large downloads, though.

Cheers,

Colin

0

Please sign in to leave a comment.