Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
285,900
void (@NotNull String name) { myName = name; }
setName
285,901
void (@NlsContexts.Label String description) { myDescription = description; }
setDescription
285,902
String () { ExtensionFileNameMatcher ext = ContainerUtil.findInstance(FileTypeManager.getInstance().getAssociations(this), ExtensionFileNameMatcher.class); return ext == null ? "" : ext.getExtension(); }
getDefaultExtension
285,903
Icon () { Icon icon = myIcon; if (icon == null) { if (myIconPath != null) { icon = IconLoader.getIcon(myIconPath, UserFileType.class.getClassLoader()); myIcon = icon; } if (icon == null) { // to not load PlatformIcons on UserFileType instantiation icon = PlatformIcons.CUSTOM_FILE_ICON; } } return icon; }
getIcon
285,904
void (@NotNull UserFileType<T> newType) { myName = newType.getName(); myDescription = newType.getDescription(); }
copyFrom
285,905
void (@NotNull Icon icon) { myIcon = icon; }
setIcon
285,906
void (@NotNull String value) { myIconPath = value; }
setIconPath
285,907
String () { return getName(); }
toString
285,908
FileType (@NotNull String fileName) { return MockLanguageFileType.INSTANCE; }
getFileTypeByFileName
285,909
FileType (@NotNull VirtualFile file) { return MockLanguageFileType.INSTANCE; }
getFileTypeByFile
285,910
FileType (@NotNull String extension) { return MockLanguageFileType.INSTANCE; }
getFileTypeByExtension
285,911
void (@NotNull FileType type, String @Nullable ... defaultAssociatedExtensions) { }
registerFileType
285,912
boolean (@NotNull String name) { return false; }
isFileIgnored
285,913
boolean (@NotNull VirtualFile file) { return false; }
isFileIgnored
285,914
List<FileNameMatcher> (@NotNull FileType type) { return List.of(); }
getAssociations
285,915
FileType (@NotNull VirtualFile file, @NotNull Project project) { return file.getFileType(); }
getKnownFileTypeOrAssociate
285,916
String () { return ""; }
getIgnoredFilesList
285,917
void (@NotNull String list) { }
setIgnoredFilesList
285,918
void (@NotNull FileType type, @NotNull FileNameMatcher matcher) { }
associate
285,919
void (@NotNull FileType type, @NotNull FileNameMatcher matcher) { }
removeAssociation
285,920
FileType (@NotNull String fileTypeName) { return MockLanguageFileType.INSTANCE; }
getStdFileType
285,921
FileType () { return myAddedFileType; }
getAddedFileType
285,922
FileType () { return myRemovedFileType; }
getRemovedFileType
285,923
String () { var result = new SmartList<String>(); if (myAddedFileType != null) { result.add("added file type = " + myAddedFileType); } if (myRemovedFileType != null) { result.add("removed file type = " + myRemovedFileType); } return "FileTypeEvent[" + StringUtil.join(result, ", ") + "]"; }
toString
285,924
SettingsEditor<UserBinaryFileType> () { return null; }
getEditor
285,925
boolean () { return true; }
isBinary
285,926
FileEditor () { return myEditor; }
getEditor
285,927
LogicalPosition () { return myPosition; }
getPosition
285,928
int (@NotNull FileEditorLocation fileEditorLocation) { TextEditorLocation otherLocation = (TextEditorLocation)fileEditorLocation; if (myEditor != otherLocation.myEditor) { Logger.getInstance(TextEditorLocation.class).error("Different editors: " + myEditor + "; and " + otherLocation.myEditor); } return myPosition.compareTo(otherLocation.myPosition); }
compareTo
285,929
String () { return myPosition.toString(); }
toString
285,930
String (@NotNull Project project, @NotNull VirtualFile vFile) { return vFile.getPresentableName(); }
getUniqueVirtualFilePath
285,931
String (@NotNull Project project, @NotNull VirtualFile vFile) { return vFile.getPresentableName(); }
getUniqueVirtualFilePathWithinOpenedFileEditors
285,932
UniqueVFilePathBuilder () { UniqueVFilePathBuilder service = ApplicationManager.getApplication().getService(UniqueVFilePathBuilder.class); return service != null ? service : DUMMY_BUILDER; }
getInstance
285,933
boolean () { return false; }
isContentBuiltIn
285,934
ActionGroup () { return myToolbar; }
getToolbarActions
285,935
JComponent () { return mySearchComponent; }
getSearchComponent
285,936
String () { return myToolbarPlace; }
getToolbarPlace
285,937
JComponent () { return myToolbarContext; }
getToolbarContextComponent
285,938
JComponent () { return myComponent; }
getComponent
285,939
String (JTextField textField) { String selectedText = textField.getSelectedText(); return selectedText != null ? selectedText : textField.getText(); }
getText
285,940
void (JTextField textField, @NotNull String text) { if (textField.getSelectedText() != null) { textField.replaceSelection(text); } else { textField.setText(text); } }
setText
285,941
String (JTextField textField) { return textField.getText(); }
getText
285,942
void (JTextField textField, @NotNull String text) { textField.setText(text); }
setText
285,943
String (JComboBox comboBox) { Object item = comboBox.getEditor().getItem(); return item.toString(); }
getText
285,944
void (JComboBox comboBox, @NotNull String text) { comboBox.getEditor().setItem(text); }
setText
285,945
boolean () { return false; }
isSelectedByDefault
285,946
boolean () { return false; }
shouldSaveOptionsOnCancel
285,947
String () { return IdeCoreBundle.message("dialog.options.do.not.ask"); }
getDoNotShowMessage
285,948
boolean () { return !isSelectedByDefault(); }
isToBeShown
285,949
void (boolean toBeShown, int exitCode) { rememberChoice(!toBeShown, exitCode); }
setToBeShown
285,950
boolean () { return true; }
canBeHidden
285,951
ValidationInfo () { okEnabled = true; return this; }
withOKEnabled
285,952
ValidationInfo () { warning = true; return this; }
asWarning
285,953
ValidationInfo (@Nullable JComponent component) { ValidationInfo result = new ValidationInfo(message, component); result.warning = warning; result.okEnabled = okEnabled; return result; }
forComponent
285,954
boolean (Object o) { if (this == o) return true; if (!(o instanceof ValidationInfo that)) return false; return StringUtil.equals(this.message, that.message) && this.component == that.component && this.okEnabled == that.okEnabled && this.warning == that.warning; }
equals
285,955
Icon () { return myDefaultIcon; }
getDefaultIcon
285,956
Color () { return myPopupBackground; }
getPopupBackground
285,957
Color () { return myForeground; }
getTitleForeground
285,958
Color () { return myBorderColor; }
getBorderColor
285,959
NotificationType () { return this == ERROR ? NotificationType.ERROR : this == WARNING ? NotificationType.WARNING : NotificationType.INFORMATION; }
toNotificationType
285,960
void (@NotNull JBPopup popup, @NotNull Component parent) { if (popup instanceof AlignedPopup ap) { ap.showUnderneathOf(parent, false); } else { popup.showUnderneathOf(parent); } }
showUnderneathWithoutAlignment
285,961
boolean () { return myOk; }
isOk
285,962
Balloon () { return (Balloon)myWindow; }
asBalloon
285,963
JBPopup () { return (JBPopup)myWindow; }
asPopup
285,964
Icon () { return myIcon; }
getIcon
285,965
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; LocalFilePath path = (LocalFilePath)o; if (myIsDirectory != path.myIsDirectory) { return false; } if (myPath.equals(path.myPath)) { return true; } if (!myPath.equalsIgnoreCase(path.myPath)) { return false; } // make sure to not query (expensive) getVirtualFile() until it's absolutely necessary, e.g. we encountered two file paths differ by case only VirtualFile file = getVirtualFile(); VirtualFile oFile = path.getVirtualFile(); if (file == null && oFile == null) return !SystemInfo.isFileSystemCaseSensitive; return Objects.equals(file, oFile); }
equals
285,966
int () { int result = Strings.stringHashCodeInsensitive(myPath); result = 31 * result + (myIsDirectory ? 1 : 0); return result; }
hashCode
285,967
void () { }
refresh
285,968
void () { LocalFileSystem.getInstance().refreshAndFindFileByPath(myPath); }
hardRefresh
285,969
String () { return myPath; }
getPath
285,970
boolean () { return myIsDirectory; }
isDirectory
285,971
boolean (@NotNull FilePath parent, boolean strict) { return FileUtil.startsWith(this.getPath(), parent.getPath(), SystemInfo.isFileSystemCaseSensitive, strict); }
isUnder
285,972
FilePath () { String parent = PathUtil.getParentPath(myPath); return parent.isEmpty() ? null : new LocalFilePath(parent, true, null); }
getParentPath
285,973
VirtualFile () { VirtualFile cachedFile = myCachedFile; if (cachedFile == null || !cachedFile.isValid() || !(cachedFile.isCaseSensitive() ? getPath(cachedFile).equals(myPath) : getPath(cachedFile).equalsIgnoreCase(myPath))) { myCachedFile = cachedFile = findFile(myPath); } return cachedFile; }
getVirtualFile
285,974
VirtualFile (@NotNull String path) { return LocalFileSystem.getInstance().findFileByPath(path); }
findFile
285,975
VirtualFile () { FilePath parent = getParentPath(); return parent != null ? parent.getVirtualFile() : null; }
getVirtualFileParent
285,976
File () { return new File(myPath); }
getIOFile
285,977
String () { return PathUtil.getFileName(myPath); }
getName
285,978
String () { return FileUtil.toSystemDependentName(myPath); }
getPresentableUrl
285,979
Document () { VirtualFile file = getVirtualFile(); if (file == null || file.getFileType().isBinary()) { return null; } return FileDocumentManager.getInstance().getDocument(file); }
getDocument
285,980
Charset () { return getCharset(null); }
getCharset
285,981
Charset (@Nullable Project project) { VirtualFile file = getVirtualFile(); String path = myPath; while ((file == null || !file.isValid()) && !path.isEmpty()) { path = PathUtil.getParentPath(path); file = findFile(path); } if (file != null) { return file.getCharset(); } EncodingManager e = project == null ? EncodingManager.getInstance() : EncodingProjectManager.getInstance(project); return e.getDefaultCharset(); }
getCharset
285,982
FileType () { VirtualFile file = getVirtualFile(); FileTypeManager manager = FileTypeManager.getInstance(); return file != null ? manager.getFileTypeByFile(file) : manager.getFileTypeByFileName(getName()); }
getFileType
285,983
String () { return myPath + (myIsDirectory ? "/" : ""); }
toString
285,984
boolean () { return false; }
isNonLocal
285,985
void () { }
disposeEditor
285,986
void () { disposeEditor(); uninstallWatcher(); }
dispose
285,987
void (CompositeSettingsEditor<Settings> owner) { myOwner = owner; }
setOwner
285,988
CompositeSettingsEditor<Settings> () { return myOwner; }
getOwner
285,989
void (Settings s) { bulkUpdate(() -> { if (myEditorComponent == null) getComponent(); resetEditorFrom(s); }); }
resetFrom
285,990
void (Runnable runnable) { boolean wasInUpdate = myIsInUpdate; try { myIsInUpdate = true; runnable.run(); } finally { myIsInUpdate = wasInUpdate; } fireEditorStateChanged(); }
bulkUpdate
285,991
JComponent () { if (myEditorComponent == null) { myEditorComponent = createEditor(); installWatcher(myEditorComponent); } return myEditorComponent; }
getComponent
285,992
void () { myListeners.clear(); }
dispose
285,993
void () { myWatcher = null; }
uninstallWatcher
285,994
void (JComponent c) { myWatcher = createWatcher(); myWatcher.register(c); UserActivityListener userActivityListener = new UserActivityListener() { @Override public void stateChanged() { fireEditorStateChanged(); } }; myWatcher.addUserActivityListener(userActivityListener, this); }
installWatcher
285,995
void () { fireEditorStateChanged(); }
stateChanged
285,996
UserActivityWatcher () { return new UserActivityWatcher(); }
createWatcher
285,997
void (SettingsEditorListener<Settings> listener) { myListeners.add(listener); }
addSettingsEditorListener
285,998
void (SettingsEditorListener<Settings> listener) { myListeners.remove(listener); }
removeSettingsEditorListener
285,999
void () { if (myIsInUpdate) { return; } for (SettingsEditorListener<Settings> listener : myListeners) { listener.stateChanged(this); } }
fireEditorStateChanged