Package com.jetbrains

Interface DesktopActions.Handler

Enclosing interface:
DesktopActions

@Provides public static interface DesktopActions.Handler
Desktop action handler.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    browse(URI uri)
    Launches the default browser to display a URI.
    default void
    edit(File file)
    Launches the associated editor application and opens a file for editing.
    default void
    mail(URI mailtoURL)
    Launches the mail composing window of the user default mail client, filling the message fields specified by a mailto: URI.
    default void
    open(File file)
    Launches the associated application to open the file.
    default void
    print(File file)
    Prints a file with the native desktop printing facility, using the associated application's print command.
  • Method Details

    • open

      default void open(File file) throws IOException
      Launches the associated application to open the file.
      Parameters:
      file - the file to be opened with the associated application
      Throws:
      IOException - if the specified file has no associated application or the associated application fails to be launched
      See Also:
    • edit

      default void edit(File file) throws IOException
      Launches the associated editor application and opens a file for editing.
      Parameters:
      file - the file to be opened for editing
      Throws:
      IOException - if the specified file has no associated editor, or the associated application fails to be launched
      See Also:
    • print

      default void print(File file) throws IOException
      Prints a file with the native desktop printing facility, using the associated application's print command.
      Parameters:
      file - the file to be printed
      Throws:
      IOException - if the specified file has no associated application that can be used to print it
      See Also:
    • mail

      default void mail(URI mailtoURL) throws IOException
      Launches the mail composing window of the user default mail client, filling the message fields specified by a mailto: URI.
      Parameters:
      mailtoURL - the specified mailto: URI
      Throws:
      IOException - if the user default mail client is not found or fails to be launched
      See Also:
    • browse

      default void browse(URI uri) throws IOException
      Launches the default browser to display a URI.
      Parameters:
      uri - the URI to be displayed in the user default browser
      Throws:
      IOException - if the user default browser is not found, or it fails to be launched, or the default handler application failed to be launched
      See Also: