Class LargeFileLimitsPreferenceHandler

java.lang.Object
org.eclipse.ui.internal.LargeFileLimitsPreferenceHandler

public class LargeFileLimitsPreferenceHandler extends Object

Parses the preference that specifies which editor should be used when opening a large file.

See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=577289
  • Field Details

    • PROMPT_EDITOR_PREFERENCE_VALUE

      public static final String PROMPT_EDITOR_PREFERENCE_VALUE
      Value of the preference that indicates a dialog should prompt the user to choose an editor, with which to open the large document.
      See Also:
    • LARGE_FILE_ASSOCIATIONS_PREFERENCE_PAGE_ID

      public static final String LARGE_FILE_ASSOCIATIONS_PREFERENCE_PAGE_ID
      Identifier of the preference page that allows the user to view and set file limit associations.
      See Also:
  • Constructor Details

  • Method Details

    • dispose

      public void dispose()
    • setDefaults

      public static void setDefaults()
    • restoreDefaults

      public static void restoreDefaults()
    • isLargeDocumentLegacyPreferenceSet

      public static boolean isLargeDocumentLegacyPreferenceSet()
    • getDefaultLimit

      public static long getDefaultLimit()
    • isDefaultLimitEnabled

      public static boolean isDefaultLimitEnabled()
    • setDefaultLimit

      public static void setDefaultLimit(long fileSize)
    • disableDefaultLimit

      public static void disableDefaultLimit()
    • getConfiguredExtensionTypes

      public static String[] getConfiguredExtensionTypes()
    • setConfiguredExtensionTypes

      public static void setConfiguredExtensionTypes(String[] extensionTypes)
    • getDisabledExtensionTypes

      public static String[] getDisabledExtensionTypes()
    • setDisabledExtensionTypes

      public static void setDisabledExtensionTypes(String[] extensionTypes)
    • getFileLimitsForExtension

      public static List<LargeFileLimitsPreferenceHandler.FileLimit> getFileLimitsForExtension(String fileExtension)
    • removeFileLimitsForExtension

      public static void removeFileLimitsForExtension(String fileExtension)
    • setFileLimitsForExtension

      public static void setFileLimitsForExtension(String fileExtension, List<LargeFileLimitsPreferenceHandler.FileLimit> fileLimits)
    • isPromptPreferenceValue

      public static boolean isPromptPreferenceValue(String editorId)
    • getEditorForInput

      public Optional<String> getEditorForInput(IEditorInput editorInput)
      Parameters:
      editorInput - the input for which to check
      Returns:
      null if the user was prompted and didn't select an editor, empty optional if no preference is set to indicate an editor for large documents, or the editor ID specified by the preference or user for the given document type
    • getLargeFilePreferenceValues

      public static List<LargeFileLimitsPreferenceHandler.FileLimit> getLargeFilePreferenceValues(String fileExtension)