public class JavaLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSettingsProvider
LanguageCodeStyleSettingsProvider.SettingsType
EP_NAME
EXTENSION_POINT_NAME
Constructor and Description |
---|
JavaLanguageCodeStyleSettingsProvider() |
Modifier and Type | Method and Description |
---|---|
CodeStyleConfigurable |
createConfigurable(CodeStyleSettings settings,
CodeStyleSettings modelSettings)
Create a code style configurable for the given base settings and model settings.
|
CustomCodeStyleSettings |
createCustomSettings(CodeStyleSettings settings) |
PsiFile |
createFileFromText(Project project,
java.lang.String text)
Allows to customize PSI file creation for a language settings preview panel.
|
void |
customizeSettings(CodeStyleSettingsCustomizable consumer,
LanguageCodeStyleSettingsProvider.SettingsType settingsType) |
CodeStyleFieldAccessor |
getAccessor(java.lang.Object codeStyleObject,
java.lang.reflect.Field field) |
java.util.List<CodeStylePropertyAccessor> |
getAdditionalAccessors(java.lang.Object codeStyleObject) |
java.lang.String |
getCodeSample(LanguageCodeStyleSettingsProvider.SettingsType settingsType) |
DocCommentSettings |
getDocCommentSettings(CodeStyleSettings rootSettings)
Returns a wrapper around language's own code documentation comment settings from the given
rootSettings . |
IndentOptionsEditor |
getIndentOptionsEditor() |
Language |
getLanguage()
Specifies a language this provider applies to.
|
int |
getRightMargin(LanguageCodeStyleSettingsProvider.SettingsType settingsType) |
calcSettingPagesProviders, createFileFromText, customizeDefaults, findUsingBaseLanguage, forLanguage, getApplicableLanguages, getCodeSample, getDefaultCommonSettings, getDefaultCommonSettings, getDisplayPriority, getDisplayPriority, getExternalLanguageId, getFileExt, getFileExt, getLanguage, getLanguageName, getLanguageName, getLanguagesWithCodeStyleSettings, getPredefinedCodeStyles, getPropertyMapper, getRightMargin, getSettingsPagesProviders, getSupportedFields, getSupportedFields, resetSettingsPagesProviders, supportsExternalFormats
createSettingsPage, getConfigurableDisplayName, getGroup, getPriority, hasSettingsPage
public JavaLanguageCodeStyleSettingsProvider()
public CodeStyleConfigurable createConfigurable(CodeStyleSettings settings, CodeStyleSettings modelSettings)
LanguageCodeStyleSettingsProvider
createConfigurable
in class LanguageCodeStyleSettingsProvider
settings
- The base (initial) settings before changes.modelSettings
- The settings to which UI changes are applied.CodeStyleConfigurable
public CustomCodeStyleSettings createCustomSettings(CodeStyleSettings settings)
createCustomSettings
in class CodeStyleSettingsProvider
public Language getLanguage()
CodeStyleSettingsProvider
getConfigurableDisplayName()
is not
overridden.getLanguage
in class LanguageCodeStyleSettingsProvider
public java.lang.String getCodeSample(LanguageCodeStyleSettingsProvider.SettingsType settingsType)
getCodeSample
in class LanguageCodeStyleSettingsProvider
public int getRightMargin(LanguageCodeStyleSettingsProvider.SettingsType settingsType)
getRightMargin
in class LanguageCodeStyleSettingsProvider
public void customizeSettings(CodeStyleSettingsCustomizable consumer, LanguageCodeStyleSettingsProvider.SettingsType settingsType)
customizeSettings
in class LanguageCodeStyleSettingsProvider
public PsiFile createFileFromText(Project project, java.lang.String text)
LanguageCodeStyleSettingsProvider
IMPORTANT: The created file must be a non-physical one with PSI events disabled. For more information see
PsiFileFactory.createFileFromText(String, Language, CharSequence, boolean, boolean)
where
eventSystemEnabled
parameter must be false
createFileFromText
in class LanguageCodeStyleSettingsProvider
project
- current projecttext
- code sample to demonstrate formatting settings (see LanguageCodeStyleSettingsProvider.getCodeSample(LanguageCodeStyleSettingsProvider.SettingsType)
public IndentOptionsEditor getIndentOptionsEditor()
getIndentOptionsEditor
in class LanguageCodeStyleSettingsProvider
public DocCommentSettings getDocCommentSettings(CodeStyleSettings rootSettings)
LanguageCodeStyleSettingsProvider
rootSettings
.getDocCommentSettings
in class LanguageCodeStyleSettingsProvider
rootSettings
- Root code style setting to retrieve doc comment settings from.DocCommentSettings
wrapper object object which allows to retrieve and modify language's own
settings related to doc comment. The object is used then by common platform doc comment handling algorithms.public CodeStyleFieldAccessor getAccessor(java.lang.Object codeStyleObject, java.lang.reflect.Field field)
getAccessor
in class LanguageCodeStyleSettingsProvider
public java.util.List<CodeStylePropertyAccessor> getAdditionalAccessors(java.lang.Object codeStyleObject)
getAdditionalAccessors
in class LanguageCodeStyleSettingsProvider