I'm creating Android Studio plugin and I need to open (preview) html file. For now I can open HTML file using this code:
String file="c:\\test\\index.html";
BrowserLauncher.getInstance().browse(file,WebBrowserManager.getInstance().getFirstActiveBrowser());
The problem is that this code open external webbrowser. But I would like to open this HTML file inside Android Studio (IntelliJ) IDE (open a new tab with HTML preview).
How can I do this?
Use Open In > Browser > Built-in Preview
It opens new tab in Android Studio