private void copyOldIndentOptions(@NonNls final String extension, final IndentOptions options) { final FileType fileType = FileTypeManager.getInstance().getFileTypeByExtension(extension); if (fileType != FileTypes.UNKNOWN && fileType != FileTypes.PLAIN_TEXT && !myAdditionalIndentOptions.containsKey(fileType) && !fileType.getDefaultExtension().isEmpty()) { registerAdditionalIndentOptions(fileType, options); // // Upgrade to version 11 // if (fileType instanceof LanguageFileType) { Language lang = ((LanguageFileType) fileType).getLanguage(); CommonCodeStyleSettings langSettings = myCommonSettingsManager.getCommonSettings(lang); if (langSettings != this && langSettings.getIndentOptions() != null) { langSettings.importOldIndentOptions(this); } } } }
/** * @param langName The language name. * @return Language-specific code style settings or shared settings if not found. * @see CommonCodeStyleSettingsManager#getCommonSettings */ public CommonCodeStyleSettings getCommonSettings(String langName) { return myCommonSettingsManager.getCommonSettings(langName); }
public CommonCodeStyleSettings getCommonSettings(Language lang) { return myCommonSettingsManager.getCommonSettings(lang); }