Class EclipseJavascriptFormatterSettings

java.lang.Object
de.funfried.netbeans.plugins.external.formatter.javascript.eclipse.EclipseJavascriptFormatterSettings

public class EclipseJavascriptFormatterSettings extends Object
Utility class for Eclipse specific settings.
Author:
bahlef
  • Field Details

    • ACTIVE_PROFILE

      public static final String ACTIVE_PROFILE
      Property key which defines the active profile of the Eclipse configuration file.
      Since:
      1.14
      See Also:
    • CONFIG_FILE_LOCATION

      public static final String CONFIG_FILE_LOCATION
      Property key which defines the location of the Eclipse formatter configuration file.
      Since:
      1.14
      See Also:
    • USE_PROJECT_PREFS

      public static final String USE_PROJECT_PREFS
      Property key which defines whether or not to use Eclipse project specific formatter configuration if available.
      Since:
      1.14
      See Also:
    • PROJECT_PREF_FILE

      public static final String PROJECT_PREF_FILE
      Constant value of the Eclipse project specific formatter configuration file name.
      Since:
      1.14
      See Also:
    • LINEFEED

      public static final String LINEFEED
      Property key which defines the line feed setting for the Eclipse formatter.
      Since:
      1.14
      See Also:
  • Method Details

    • getEclipseFormatterFile

      public static String getEclipseFormatterFile(Preferences preferences, Document document)
      Returns the Eclipse formatter file for the given Document from the given Preferences. If USE_PROJECT_PREFS is true in the given Preferences, it will be automatically checked if there is a project specific formatter configuration file available.
      Parameters:
      preferences - the Preferences where to load from
      document - the Document
      Returns:
      the Eclipse formatter file for the given Document from the given Preferences. If USE_PROJECT_PREFS is true in the given Preferences, it will be automatically checked if there is a project specific formatter configuration file available
    • isWorkspaceMechanicFile

      public static boolean isWorkspaceMechanicFile(String filename)
      Returns true if the given filename ends with the workspace mechanic file extension epf.
      Parameters:
      filename - the filename to check
      Returns:
      true if the given filename ends with the workspace mechanic file extension epf, otherwise false
    • isXMLConfigurationFile

      public static boolean isXMLConfigurationFile(String filename)
      Returns true if the given filename ends with the XML file extension.
      Parameters:
      filename - the filename to check
      Returns:
      true if the given filename ends with the XML file extension, otherwise false
    • isProjectSetting

      public static boolean isProjectSetting(String filename)
      Returns true if the given filename ends with org.eclipse.jdt.core.prefs.
      Parameters:
      filename - the filename to check
      Returns:
      true if the given filename ends with org.eclipse.jdt.core.prefs, otherwise false