Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
267,500
void (Element element) { serialize(element, DEFAULT_INDENT_OPTIONS); }
writeExternal
267,501
void (@NotNull Element indentOptionsElement, @Nullable IndentOptions defaultOptions) { SerializationFilter filter = null; if (defaultOptions != null) { //noinspection deprecation filter = new SkipDefaultValuesSerializationFilters() { @Override protected void configure(@NotNull Object o) { if (o instanceof IndentOptions...
serialize
267,502
void (@NotNull Object o) { if (o instanceof IndentOptions) { ((IndentOptions)o).copyFrom(defaultOptions); } }
configure
267,503
void (Element indentOptionsElement) { XmlSerializer.deserializeInto(indentOptionsElement, this); }
deserialize
267,504
Object () { try { return super.clone(); } catch (CloneNotSupportedException e) { // Cannot happen throw new RuntimeException(e); } }
clone
267,505
boolean (Object o) { if (this == o) return true; if (!(o instanceof IndentOptions that)) return false; if (CONTINUATION_INDENT_SIZE != that.CONTINUATION_INDENT_SIZE) return false; if (INDENT_SIZE != that.INDENT_SIZE) return false; if (LABEL_INDENT_ABSOLUTE != that.LABEL_INDENT_ABSOLUTE) return false; if (USE_RELATIVE_I...
equals
267,506
int () { int result = INDENT_SIZE; result = 31 * result + CONTINUATION_INDENT_SIZE; result = 31 * result + TAB_SIZE; result = 31 * result + (USE_TAB_CHARACTER ? 1 : 0); result = 31 * result + (SMART_TABS ? 1 : 0); result = 31 * result + LABEL_INDENT_SIZE; result = 31 * result + (LABEL_INDENT_ABSOLUTE ? 1 : 0); result =...
hashCode
267,507
void (IndentOptions other) { copyPublicFields(other, this); }
copyFrom
267,508
FileIndentOptionsProvider () { return myFileIndentOptionsProvider; }
getFileIndentOptionsProvider
267,509
void (@NotNull Document document) { document.putUserData(INDENT_OPTIONS_KEY, this); }
associateWithDocument
267,510
IndentOptions (@NotNull PsiFile file) { Document document = PsiDocumentManager.getInstance(file.getProject()).getDocument(file); return document != null ? document.getUserData(INDENT_OPTIONS_KEY) : null; }
retrieveFromAssociatedDocument
267,511
IndentOptions (@NotNull Document document) { return document.getUserData(INDENT_OPTIONS_KEY); }
retrieveFromAssociatedDocument
267,512
boolean () { return myOverrideLanguageOptions; }
isOverrideLanguageOptions
267,513
void (boolean overrideLanguageOptions) { myOverrideLanguageOptions = overrideLanguageOptions; }
setOverrideLanguageOptions
267,514
boolean (Object obj) { if (obj instanceof CommonCodeStyleSettings) { if ( ReflectionUtil.comparePublicNonFinalFields(this, obj) && mySoftMargins.equals(((CommonCodeStyleSettings)obj).mySoftMargins) && Comparing.equal(myIndentOptions, ((CommonCodeStyleSettings)obj).getIndentOptions()) && arrangementSettingsEqual((Common...
equals
267,515
boolean (CommonCodeStyleSettings obj) { ArrangementSettings theseSettings = myArrangementSettings; ArrangementSettings otherSettings = obj.getArrangementSettings(); if (theseSettings == null && otherSettings != null) { Rearranger<?> rearranger = Rearranger.EXTENSION.forLanguage(getLanguage()); if (rearranger instanceof...
arrangementSettingsEqual
267,516
List<Integer> () { return mySoftMargins.getValues(); }
getSoftMargins
267,517
void (List<Integer> values) { mySoftMargins.setValues(values); }
setSoftMargins
267,518
void () { PACKAGES_TO_USE_IMPORT_ON_DEMAND.addEntry(new PackageEntry(false, "java.awt", false)); PACKAGES_TO_USE_IMPORT_ON_DEMAND.addEntry(new PackageEntry(false,"javax.swing", false)); IMPORT_LAYOUT_TABLE.addEntry(PackageEntry.ALL_OTHER_IMPORTS_ENTRY); IMPORT_LAYOUT_TABLE.addEntry(PackageEntry.BLANK_LINE_ENTRY); IMPOR...
initImportsByDefault
267,519
void (@NotNull CodeStyleSettings parent) { myParentSettings = parent; }
setParentSettings
267,520
CodeStyleSettings () { return myParentSettings; }
getParentSettings
267,521
CodeStyleSettings () { CodeStyleSettings clone = new CodeStyleSettings(true, true); clone.copyFrom(this); return clone; }
clone
267,522
void (@NotNull CodeStyleSettings from) { myCustomCodeStyleSettingsManager.copyFrom(from); PACKAGES_TO_USE_IMPORT_ON_DEMAND.copyFrom(from.PACKAGES_TO_USE_IMPORT_ON_DEMAND); IMPORT_LAYOUT_TABLE.copyFrom(from.IMPORT_LAYOUT_TABLE); OTHER_INDENT_OPTIONS.copyFrom(from.OTHER_INDENT_OPTIONS); myAdditionalIndentOptions.clear();...
copyCustomSettingsFrom
267,523
void (CodeStyleSettings from) { CommonCodeStyleSettings.copyPublicFields(from, this); CommonCodeStyleSettings.copyPublicFields(from.OTHER_INDENT_OPTIONS, OTHER_INDENT_OPTIONS); mySoftMargins.setValues(from.getDefaultSoftMargins()); myExcludedFiles.setDescriptors(from.getExcludedFiles().getDescriptors()); copyCustomSett...
copyFrom
267,524
String () { return LINE_SEPARATOR != null ? LINE_SEPARATOR : ourSystemLineSeparator; }
getLineSeparator
267,525
List<String> () { return myRepeatAnnotations; }
getRepeatAnnotations
267,526
void (List<String> repeatAnnotations) { myRepeatAnnotations.clear(); myRepeatAnnotations.addAll(repeatAnnotations); }
setRepeatAnnotations
267,527
boolean () { return LAYOUT_STATIC_IMPORTS_SEPARATELY; }
isLayoutStaticImportsSeparately
267,528
void (boolean value) { LAYOUT_STATIC_IMPORTS_SEPARATELY = value; }
setLayoutStaticImportsSeparately
267,529
int () { return NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND; }
getNamesCountToUseImportOnDemand
267,530
void (int value) { NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND = value; }
setNamesCountToUseImportOnDemand
267,531
int () { return CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND; }
getClassCountToUseImportOnDemand
267,532
void (int value) { CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND = value; }
setClassCountToUseImportOnDemand
267,533
boolean () { return INSERT_INNER_CLASS_IMPORTS; }
isInsertInnerClassImports
267,534
void (boolean value) { INSERT_INNER_CLASS_IMPORTS = value; }
setInsertInnerClassImports
267,535
boolean () { return USE_SINGLE_CLASS_IMPORTS; }
isUseSingleClassImports
267,536
void (boolean value) { USE_SINGLE_CLASS_IMPORTS = value; }
setUseSingleClassImports
267,537
boolean () { return USE_FQ_CLASS_NAMES; }
isUseFqClassNames
267,538
void (boolean value) { USE_FQ_CLASS_NAMES = value; }
setUseFqClassNames
267,539
PackageEntryTable () { return IMPORT_LAYOUT_TABLE; }
getImportLayoutTable
267,540
PackageEntryTable () { return PACKAGES_TO_USE_IMPORT_ON_DEMAND; }
getPackagesToUseImportOnDemand
267,541
Pattern () { if (myFormatterOffPattern == null && FORMATTER_TAGS_ENABLED && FORMATTER_TAGS_ACCEPT_REGEXP) { myFormatterOffPattern = getPatternOrDisableRegexp(FORMATTER_OFF_TAG); } return myFormatterOffPattern; }
getFormatterOffPattern
267,542
void (@Nullable Pattern formatterOffPattern) { myFormatterOffPattern = formatterOffPattern; }
setFormatterOffPattern
267,543
Pattern () { if (myFormatterOffPattern == null && FORMATTER_TAGS_ENABLED && FORMATTER_TAGS_ACCEPT_REGEXP) { myFormatterOnPattern = getPatternOrDisableRegexp(FORMATTER_ON_TAG); } return myFormatterOnPattern; }
getFormatterOnPattern
267,544
void (@Nullable Pattern formatterOnPattern) { myFormatterOnPattern = formatterOnPattern; }
setFormatterOnPattern
267,545
Pattern (@NotNull String markerText) { try { return Pattern.compile(markerText); } catch (PatternSyntaxException pse) { LOG.error("Loaded regexp pattern is invalid: '" + markerText + "', error message: " + pse.getMessage()); FORMATTER_TAGS_ACCEPT_REGEXP = false; return null; } }
getPatternOrDisableRegexp
267,546
void (@NotNull Element element, int version) { element.setAttribute(VERSION_ATTR, Integer.toString(version)); }
setVersion
267,547
int (@NotNull Element element) { String versionStr = element.getAttributeValue(VERSION_ATTR); if (versionStr == null) { return 0; } else { try { return Integer.parseInt(versionStr); } catch (NumberFormatException nfe) { return CURR_VERSION; } } }
getVersion
267,548
IndentOptions (FileType fileType) { for (final FileTypeIndentOptionsFactory factory : CodeStyleSettingsService.getInstance().getFileTypeIndentOptionsFactories()) { if (factory.getFileType().equals(fileType)) { return getFileTypeIndentOptions(factory); } } return new IndentOptions(); }
getDefaultIndentOptions
267,549
IndentOptions () { return OTHER_INDENT_OPTIONS; }
getIndentOptions
267,550
IndentOptions (@Nullable FileType fileType) { IndentOptions indentOptions = getLanguageIndentOptions(fileType); if (indentOptions != null) return indentOptions; if (fileType == null) { return OTHER_INDENT_OPTIONS; } if (!myLoadedAdditionalIndentOptions) { loadAdditionalIndentOptions(); } indentOptions = myAdditionalInd...
getIndentOptions
267,551
IndentOptions (@Nullable Project project, @NotNull Document document) { PsiFile file = project != null ? PsiDocumentManager.getInstance(project).getPsiFile(document) : null; if (file != null) return getIndentOptionsByFile(file); VirtualFile vFile = FileDocumentManager.getInstance().getFile(document); FileType fileType ...
getIndentOptionsByDocument
267,552
IndentOptions (@Nullable PsiFile file) { if (file != null) { VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile != null) { return getIndentOptionsByFile(file.getProject(), virtualFile, null); } else { return getIndentOptions(file.getFileType()); } } return OTHER_INDENT_OPTIONS; }
getIndentOptionsByFile
267,553
IndentOptions (@NotNull Project project, @NotNull VirtualFile file, @Nullable TextRange formatRange) { try (AccessToken ignored = ProjectLocator.withPreferredProject(file, project)) { return getIndentOptionsByFile(project, file, formatRange, false, null); } }
getIndentOptionsByFile
267,554
IndentOptions (@NotNull Project project, @NotNull VirtualFile file, @Nullable TextRange formatRange, boolean ignoreDocOptions, @Nullable Processor<? super FileIndentOptionsProvider> providerProcessor) { Document document = FileDocumentManager.getInstance().getCachedDocument(file); boolean isFullReformat = document == n...
getIndentOptionsByFile
267,555
boolean (@NotNull Document document, @Nullable TextRange formatRange) { return formatRange != null && formatRange.equals(new TextRange(0, document.getTextLength())); }
isFileFullyCoveredByRange
267,556
void (@NotNull VirtualFile file, @NotNull FileIndentOptionsProvider provider, @NotNull IndentOptions options) { LOG.debug("Indent options returned by " + provider.getClass().getName() + " for " + file.getName() + ": indent size=" + options.INDENT_SIZE + ", use tabs=" + options.USE_TAB_CHARACTER + ", tab size=" + option...
logIndentOptions
267,557
IndentOptions (@Nullable FileType fileType) { if (!(fileType instanceof LanguageFileType)) return null; Language lang = ((LanguageFileType)fileType).getLanguage(); return getIndentOptions(lang); }
getLanguageIndentOptions
267,558
IndentOptions (@NotNull Language language) { IndentOptions langOptions = getIndentOptions(language); return langOptions != null ? langOptions : OTHER_INDENT_OPTIONS; }
getLanguageIndentOptions
267,559
IndentOptions (Language lang) { CommonCodeStyleSettings settings = myCommonSettingsManager.getCommonSettings(lang); return settings != null ? settings.getIndentOptions() : null; }
getIndentOptions
267,560
boolean (FileType fileType) { return getIndentOptions(fileType).SMART_TABS; }
isSmartTabs
267,561
int (FileType fileType) { return getIndentOptions(fileType).INDENT_SIZE; }
getIndentSize
267,562
int (FileType fileType) { return getIndentOptions(fileType).CONTINUATION_INDENT_SIZE; }
getContinuationIndentSize
267,563
int (FileType fileType) { return getIndentOptions(fileType).TAB_SIZE; }
getTabSize
267,564
boolean (FileType fileType) { return getIndentOptions(fileType).USE_TAB_CHARACTER; }
useTabCharacter
267,565
FileType (@NotNull FileType provided) { for (final FileType existing : myAdditionalIndentOptions.keySet()) { if (Comparing.strEqual(existing.getDefaultExtension(), provided.getDefaultExtension())) { return existing; } } return null; }
findRegisteredFileType
267,566
void () { synchronized (myAdditionalIndentOptions) { myLoadedAdditionalIndentOptions = true; for (final FileTypeIndentOptionsFactory factory : CodeStyleSettingsService.getInstance().getFileTypeIndentOptionsFactories()) { if (!myAdditionalIndentOptions.containsKey(factory.getFileType())) { registerAdditionalIndentOption...
loadAdditionalIndentOptions
267,567
IndentOptions (@NotNull FileTypeIndentOptionsFactory factory) { try { return factory.createIndentOptions(); } catch (AbstractMethodError error) { LOG.error(PluginException.createByClass("Plugin uses obsolete API", null, factory.getClass())); return new IndentOptions(); } }
getFileTypeIndentOptions
267,568
void () { CodeStyleSettings cleanSettings = new CodeStyleSettings(true, false); copyFrom(cleanSettings); myAdditionalIndentOptions.clear(); //hack myLoadedAdditionalIndentOptions = false; }
clearCodeStyleSettings
267,569
String () { return "TempFileType"; }
getName
267,570
String () { return myExtension; }
getDefaultExtension
267,571
Icon () { return null; }
getIcon
267,572
boolean () { return false; }
isBinary
267,573
CommonCodeStyleSettings (@Nullable Language lang) { CommonCodeStyleSettings settings = myCommonSettingsManager.getCommonSettings(lang); if (settings == null) { settings = myCommonSettingsManager.getDefaults(); //if (lang != null) { // LOG.warn("Common code style settings for language '" + lang.getDisplayName() + "' not...
getCommonSettings
267,574
CommonCodeStyleSettings (String langName) { return myCommonSettingsManager.getCommonSettings(langName); }
getCommonSettings
267,575
int (@Nullable Language language) { if (language != null) { CommonCodeStyleSettings langSettings = myCommonSettingsManager.getCommonSettings(language); if (langSettings != null) { if (langSettings.RIGHT_MARGIN >= 0) return langSettings.RIGHT_MARGIN; } } return getDefaultRightMargin(); }
getRightMargin
267,576
void (@Nullable Language language, int rightMargin) { if (language != null) { CommonCodeStyleSettings langSettings = myCommonSettingsManager.getCommonSettings(language); if (langSettings != null) { langSettings.RIGHT_MARGIN = rightMargin; return; } } setDefaultRightMargin(rightMargin); }
setRightMargin
267,577
int () { return RIGHT_MARGIN; }
getDefaultRightMargin
267,578
void (int rightMargin) { RIGHT_MARGIN = rightMargin; }
setDefaultRightMargin
267,579
boolean (@Nullable Language language) { if (language != null) { CommonCodeStyleSettings langSettings = myCommonSettingsManager.getCommonSettings(language); if (langSettings != null) { if (langSettings.WRAP_ON_TYPING != CommonCodeStyleSettings.WrapOnTyping.DEFAULT.intValue) { return langSettings.WRAP_ON_TYPING == Common...
isWrapOnTyping
267,580
int () { return myId; }
getId
267,581
WrapStyle (int wrappingStyleID) { for (WrapStyle style: values()) { if (style.myId == wrappingStyleID) { return style; } } LOG.error("Invalid wrapping option index: " + wrappingStyleID); return DO_NOT_WRAP; }
forWrapping
267,582
int (@Nullable WrapStyle wrapStyle) { return Optional.ofNullable(wrapStyle).orElse(DO_NOT_WRAP).myId; }
getId
267,583
String () { return myValue; }
toString
267,584
boolean (Object obj) { if (!(obj instanceof CodeStyleSettings)) return false; if (!ReflectionUtil.comparePublicNonFinalFields(this, obj)) return false; if (!mySoftMargins.equals(((CodeStyleSettings)obj).mySoftMargins)) return false; if (!myExcludedFiles.equals(((CodeStyleSettings)obj).getExcludedFiles())) return false;...
equals
267,585
CodeStyleSettings () { return DefaultsHolder.myDefaults; }
getDefaults
267,586
void () { if (myVersion < CURR_VERSION) { for (CustomCodeStyleSettings settings : myCustomCodeStyleSettingsManager.getAllSettings()) { settings.importLegacySettings(this); } myVersion = CURR_VERSION; } }
migrateLegacySettings
267,587
void () { CodeStyleSettings defaults = getDefaults(); ReflectionUtil.copyFields(getClass().getFields(), defaults, this, new DifferenceFilter<>(this, defaults){ @Override public boolean test(@NotNull Field field) { return field.getAnnotation(Deprecated.class) != null; } }); IMPORT_LAYOUT_TABLE.copyFrom(defaults.IMPORT_L...
resetDeprecatedFields
267,588
boolean (@NotNull Field field) { return field.getAnnotation(Deprecated.class) != null; }
test
267,589
int () { return myVersion; }
getVersion
267,590
List<Integer> (@Nullable Language language) { if (language != null) { CommonCodeStyleSettings languageSettings = myCommonSettingsManager.getCommonSettings(language); if (languageSettings != null && !languageSettings.getSoftMargins().isEmpty()) { return languageSettings.getSoftMargins(); } } return getDefaultSoftMargins...
getSoftMargins
267,591
void (@NotNull Language language, List<Integer> softMargins) { CommonCodeStyleSettings languageSettings = myCommonSettingsManager.getCommonSettings(language); assert languageSettings != null : "Settings for language " + language.getDisplayName() + " do not exist"; languageSettings.setSoftMargins(softMargins); }
setSoftMargins
267,592
List<Integer> () { return mySoftMargins.getValues(); }
getDefaultSoftMargins
267,593
void (List<Integer> softMargins) { mySoftMargins.setValues(softMargins); }
setDefaultSoftMargins
267,594
ExcludedFiles () { return myExcludedFiles; }
getExcludedFiles
267,595
SimpleModificationTracker () { return myModificationTracker; }
getModificationTracker
267,596
void (@NotNull LanguageCodeStyleProvider provider) { myCommonSettingsManager.removeLanguageSettings(provider); }
removeCommonSettings
267,597
void (@NotNull LanguageCodeStyleProvider provider) { myCommonSettingsManager.addLanguageSettings(provider); }
registerCommonSettings
267,598
void (@NotNull CustomCodeStyleSettingsFactory factory) { myCustomCodeStyleSettingsManager.unregisterCustomSettings(factory); }
removeCustomSettings
267,599
void (@NotNull CustomCodeStyleSettingsFactory factory) { myCustomCodeStyleSettingsManager.registerCustomSettings(this, factory); }
registerCustomSettings