Package org.eclipse.ui.internal
Class LargeFileLimitsPreferenceHandler
java.lang.Object
org.eclipse.ui.internal.LargeFileLimitsPreferenceHandler
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-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn editor and file size pair.static classstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringIdentifier of the preference page that allows the user to view and set file limit associations.static final StringValue of the preference that indicates a dialog should prompt the user to choose an editor, with which to open the large document. -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvoiddispose()static String[]static longstatic String[]getEditorForInput(IEditorInput editorInput) getFileLimitsForExtension(String fileExtension) getLargeFilePreferenceValues(String fileExtension) static booleanstatic booleanstatic booleanisPromptPreferenceValue(String editorId) static voidremoveFileLimitsForExtension(String fileExtension) static voidstatic voidsetConfiguredExtensionTypes(String[] extensionTypes) static voidsetDefaultLimit(long fileSize) static voidstatic voidsetDisabledExtensionTypes(String[] extensionTypes) static voidsetFileLimitsForExtension(String fileExtension, List<LargeFileLimitsPreferenceHandler.FileLimit> fileLimits)
-
Field Details
-
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
Identifier of the preference page that allows the user to view and set file limit associations.- See Also:
-
-
Constructor Details
-
LargeFileLimitsPreferenceHandler
public LargeFileLimitsPreferenceHandler() -
LargeFileLimitsPreferenceHandler
public LargeFileLimitsPreferenceHandler(LargeFileLimitsPreferenceHandler.PromptForEditor promptForEditor)
-
-
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
-
setConfiguredExtensionTypes
-
getDisabledExtensionTypes
-
setDisabledExtensionTypes
-
getFileLimitsForExtension
public static List<LargeFileLimitsPreferenceHandler.FileLimit> getFileLimitsForExtension(String fileExtension) -
removeFileLimitsForExtension
-
setFileLimitsForExtension
public static void setFileLimitsForExtension(String fileExtension, List<LargeFileLimitsPreferenceHandler.FileLimit> fileLimits) -
isPromptPreferenceValue
-
getEditorForInput
- Parameters:
editorInput- the input for which to check- Returns:
nullif 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)
-