Class Settings
java.lang.Object
de.funfried.netbeans.plugins.external.formatter.ui.options.Settings
Settings utility class.
- Author:
- markiewb, bahlef
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Property value of the default formatter to use (NetBeans internal formatter).static final String
Property key which defines whether or not to use editorconfig in NetBeans if present.static final String
Property key which defines whether or not to use the settings of the external formatter in the NetBeans editor.static final String
Deprecated.static final String
Property key prefix for the enabled formatter per mime type.static final String
Property key which defines whether or not to use theOVERRIDE_TAB_SIZE_VALUE
instead of the one inside the external formatter configuration.static final String
Property key which defines the tab size which is used whenOVERRIDE_TAB_SIZE
is actived.static final String
Property key which defines whether or not to show notifications after each formatting.static final String
Property key which defines whether or not to use project specific settings instead of global formatter settings. -
Method Summary
Modifier and TypeMethodDescriptionstatic Preferences
getActivePreferences
(Document document) Returns the activePreferences
object for the givenDocument
, either the global preferences are returned or if theProject
has a separate configuration it will return the project specificPreferences
.static String
getLineFeed
(String lineFeedSetting, String fallback) Returns the real line feed characters for the given escaped line feed characters.
-
Field Details
-
ENABLED_FORMATTER_PREFIX
Property key prefix for the enabled formatter per mime type.- Since:
- 1.14
- See Also:
-
ENABLED_FORMATTER
Deprecated.UseENABLED_FORMATTER_PREFIX
insteadProperty key which defines the enabled formatter.- Since:
- 1.13
- See Also:
-
DEFAULT_FORMATTER
Property value of the default formatter to use (NetBeans internal formatter).- Since:
- 1.13
- See Also:
-
ENABLE_USE_OF_INDENTATION_SETTINGS
Property key which defines whether or not to use the settings of the external formatter in the NetBeans editor.- See Also:
-
ENABLE_USE_OF_EDITOR_CONFIG
Property key which defines whether or not to use editorconfig in NetBeans if present.- See Also:
-
OVERRIDE_TAB_SIZE
Property key which defines whether or not to use theOVERRIDE_TAB_SIZE_VALUE
instead of the one inside the external formatter configuration.- See Also:
-
OVERRIDE_TAB_SIZE_VALUE
Property key which defines the tab size which is used whenOVERRIDE_TAB_SIZE
is actived.- See Also:
-
SHOW_NOTIFICATIONS
Property key which defines whether or not to show notifications after each formatting.- See Also:
-
USE_PROJECT_SETTINGS
Property key which defines whether or not to use project specific settings instead of global formatter settings.- See Also:
-
-
Method Details
-
getActivePreferences
Returns the activePreferences
object for the givenDocument
, either the global preferences are returned or if theProject
has a separate configuration it will return the project specificPreferences
.- Parameters:
document
- the document to get thePreferences
for- Returns:
- the active
Preferences
object for the givenDocument
, either the global preferences are returned or if theProject
has a separate configuration it will return the project specificPreferences
-
getLineFeed
Returns the real line feed characters for the given escaped line feed characters.- Parameters:
lineFeedSetting
- escaped line feed characters, e.g.\\n
fallback
- if the escaped line feed characters could not be matched to a real line feed setting- Returns:
- the real line feed characters for the given escaped line feed characters, or the given
fallback
if the escaped characters could not be matched to a real line feed setting
-
ENABLED_FORMATTER_PREFIX
instead