org.jedit.core

## Class FileOpenerService

- java.lang.Object
- - org.jedit.core.FileOpenerService

-     public abstract class FileOpenerService
      extends java.lang.Object

  File Opener Service. FastOpen 2.5 and SmartOpen 1.1 offer this as a service to other plugins such as ErrorList 2.0 that can use it to open files when, for example, the error message only provides a filename and not an absolute path. A response to SF.net ticket #3481157
  Since:
    jEdit 5.0pre1

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileOpenerService()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `open(java.lang.String fileName, View view)` Searches available FileOpenerServices and uses the first, or the preferred one based on the "fileopener.service" property.
    `abstract void` | `openFile(java.lang.String fileName, View view)` Opens a file in jEdit, given only a filename and no path.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FileOpenerService

          public FileOpenerService()

  - ### Method Detail

    - #### openFile

          public abstract void openFile(java.lang.String fileName,
                      View view)

      Opens a file in jEdit, given only a filename and no path. May cause a dialog to popup asking the user for a choice.
      Parameters:
        `fileName` - the file name to search for
        `view` - the parent View

    - #### open

          public static void open(java.lang.String fileName,
                  View view)

      Searches available FileOpenerServices and uses the first, or the preferred one based on the "fileopener.service" property. You can set a preferred FileOpener from the Console beanshell like this:

             jEdit.setProperty("fileopener.service", "FastOpen");  // or "SmartOpen"

      This setting is ignored if there is only one FileOpenerService available.
      Parameters:
        `fileName` - the file name to search for
        `view` - the parent View