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 SummaryNested ClassesModifier and TypeClassDescriptionstatic classAn editor and file size pair.static classstatic interface
- 
Field SummaryFieldsModifier 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 SummaryConstructorsConstructorDescription
- 
Method SummaryModifier 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_VALUEValue 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_IDIdentifier of the preference page that allows the user to view and set file limit associations.- See Also:
 
 
- 
- 
Constructor Details- 
LargeFileLimitsPreferenceHandlerpublic LargeFileLimitsPreferenceHandler()
- 
LargeFileLimitsPreferenceHandlerpublic LargeFileLimitsPreferenceHandler(LargeFileLimitsPreferenceHandler.PromptForEditor promptForEditor) 
 
- 
- 
Method Details- 
disposepublic void dispose()
- 
setDefaultspublic static void setDefaults()
- 
restoreDefaultspublic static void restoreDefaults()
- 
isLargeDocumentLegacyPreferenceSetpublic static boolean isLargeDocumentLegacyPreferenceSet()
- 
getDefaultLimitpublic static long getDefaultLimit()
- 
isDefaultLimitEnabledpublic static boolean isDefaultLimitEnabled()
- 
setDefaultLimitpublic static void setDefaultLimit(long fileSize) 
- 
disableDefaultLimitpublic static void disableDefaultLimit()
- 
getConfiguredExtensionTypes
- 
setConfiguredExtensionTypes
- 
getDisabledExtensionTypes
- 
setDisabledExtensionTypes
- 
getFileLimitsForExtensionpublic static List<LargeFileLimitsPreferenceHandler.FileLimit> getFileLimitsForExtension(String fileExtension) 
- 
removeFileLimitsForExtension
- 
setFileLimitsForExtensionpublic 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
 
- 
getLargeFilePreferenceValuespublic static List<LargeFileLimitsPreferenceHandler.FileLimit> getLargeFilePreferenceValues(String fileExtension) 
 
-