Module jEdit

Class FileOpenerService

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

public abstract class FileOpenerService extends 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
Author:
Alan Ezust
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    open(String fileName, View view)
    Searches available FileOpenerServices and uses the first, or the preferred one based on the "fileopener.service" property.
    abstract void
    openFile(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 Details

    • FileOpenerService

      public FileOpenerService()
  • Method Details

    • openFile

      public abstract void openFile(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(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