Class OpenInCurrentIde

java.lang.Object
com.vaadin.base.devserver.OpenInCurrentIde

public final class OpenInCurrentIde extends Object
Util for opening a file in the currently used IDE.

Supports detecting VS Code, Eclipse and IntelliJ.

  • Method Details

    • openFile

      public static boolean openFile(File file, int lineNumber)
      Opens the given file at the given line number in the IDE used to launch the current Java application.

      If you are running the Java application from the command line or from an unsupported IDE, then this method does nothing.

      Parameters:
      file - the file to open
      lineNumber - the line number to highlight
      Returns:
      true if the file was opened, false otherwise
    • main

      public static void main(String[] args)