Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
285,800
boolean (String place) { return KEYBOARD_SHORTCUT.equals(place) || MOUSE_SHORTCUT.equals(place) || FORCE_TOUCH.equals(place); }
isShortcutPlace
285,801
boolean (String place) { return MAIN_TOOLBAR.equals(place); }
isMainToolbar
285,802
boolean (@NotNull String place) { return ourPopupPlaces.contains(place) || place.startsWith(POPUP_PREFIX); }
isPopupPlace
285,803
boolean (@NotNull String place) { return place.startsWith(NEW_UI_RUN_TOOLBAR); }
isNewUiToolbarPlace
285,804
boolean (@NotNull String place) { return ourPopupPlaces.contains(place) || ourCommonPlaces.contains(place) || place.startsWith(POPUP_PREFIX) && isCommonPlace(place.substring(POPUP_PREFIX.length())); }
isCommonPlace
285,805
String (@Nullable String actionId) { return actionId == null ? POPUP : POPUP_PREFIX + actionId; }
getActionGroupPopupPlace
285,806
String (@Nullable String place) { return place == null ? POPUP : isPopupPlace(place) ? place : POPUP_PREFIX + place; }
getPopupPlace
285,807
boolean (@NotNull AnActionEvent e) { return SystemInfo.isMac && (MAIN_MENU.equals(e.getPlace()) || KEYBOARD_SHORTCUT.equals(e.getPlace())); }
isMacSystemMenuAction
285,808
boolean () { return myChooseFiles; }
isChooseFiles
285,809
boolean () { return myChooseFolders; }
isChooseFolders
285,810
boolean () { return myChooseJars; }
isChooseJars
285,811
boolean () { return myChooseJarsAsFiles; }
isChooseJarsAsFiles
285,812
boolean () { return myChooseJarContents; }
isChooseJarContents
285,813
boolean () { return myChooseMultiple; }
isChooseMultiple
285,814
void (@NlsContexts.DialogTitle String title) { withTitle(title); }
setTitle
285,815
FileChooserDescriptor (@NlsContexts.DialogTitle String title) { myTitle = title; return this; }
withTitle
285,816
void (@NlsContexts.Label String description) { withDescription(description); }
setDescription
285,817
FileChooserDescriptor (@NlsContexts.Label String description) { myDescription = description; return this; }
withDescription
285,818
boolean () { return myHideIgnored; }
isHideIgnored
285,819
void (boolean hideIgnored) { withHideIgnored(hideIgnored); }
setHideIgnored
285,820
FileChooserDescriptor (boolean hideIgnored) { myHideIgnored = hideIgnored; return this; }
withHideIgnored
285,821
List<VirtualFile> () { return Collections.unmodifiableList(myRoots); }
getRoots
285,822
void (VirtualFile @NotNull ... roots) { withRoots(roots); }
setRoots
285,823
void (@NotNull List<? extends VirtualFile> roots) { withRoots(roots); }
setRoots
285,824
FileChooserDescriptor (final VirtualFile... roots) { return withRoots(Arrays.asList(roots)); }
withRoots
285,825
FileChooserDescriptor (@NotNull List<? extends VirtualFile> roots) { if (roots.contains(null)) throw new IllegalArgumentException("'null' in roots: " + roots); myRoots.clear(); myRoots.addAll(roots); return this; }
withRoots
285,826
boolean () { return myShowFileSystemRoots; }
isShowFileSystemRoots
285,827
void (boolean showFileSystemRoots) { withShowFileSystemRoots(showFileSystemRoots); }
setShowFileSystemRoots
285,828
FileChooserDescriptor (boolean showFileSystemRoots) { myShowFileSystemRoots = showFileSystemRoots; return this; }
withShowFileSystemRoots
285,829
boolean () { return myTreeRootVisible; }
isTreeRootVisible
285,830
FileChooserDescriptor (boolean isTreeRootVisible) { myTreeRootVisible = isTreeRootVisible; return this; }
withTreeRootVisible
285,831
boolean () { return myShowHiddenFiles; }
isShowHiddenFiles
285,832
FileChooserDescriptor (boolean showHiddenFiles) { myShowHiddenFiles = showHiddenFiles; return this; }
withShowHiddenFiles
285,833
FileChooserDescriptor (@Nullable Condition<? super VirtualFile> filter) { myFileFilter = filter; return this; }
withFileFilter
285,834
boolean (VirtualFile file, boolean showHiddenFiles) { if (file.is(VFileProperty.SYMLINK) && file.getCanonicalPath() == null) { return false; } if (!file.isDirectory()) { if (FileElement.isArchive(file)) { if (!myChooseJars && !myChooseJarContents) { return false; } } else if (!myChooseFiles) { return false; } if (myFileFilter != null && !myFileFilter.value(file)) { return false; } } if (isHideIgnored() && FileTypeManager.getInstance().isFileIgnored(file)) { return false; } if (!showHiddenFiles && FileElement.isFileHidden(file)) { return false; } return true; }
isFileVisible
285,835
boolean (@Nullable VirtualFile file) { if (file == null) return false; if (file.is(VFileProperty.SYMLINK) && file.getCanonicalPath() == null) { return false; } if (file.isDirectory() && myChooseFolders) { return true; } if (myFileFilter != null && !file.isDirectory()) { return myFileFilter.value(file); } return acceptAsJarFile(file) || acceptAsGeneralFile(file); }
isFileSelectable
285,836
Icon (final VirtualFile file) { return dressIcon(file, IconUtil.getIcon(file, Iconable.ICON_FLAG_READ_STATUS, null)); }
getIcon
285,837
Icon (final VirtualFile file, final Icon baseIcon) { return file.isValid() && file.is(VFileProperty.SYMLINK) ? LayeredIcon.layeredIcon(new Icon[]{baseIcon, PlatformIcons.SYMLINK_ICON}) : baseIcon; }
dressIcon
285,838
String (final VirtualFile file) { return file.getPresentableName(); }
getName
285,839
boolean () { return myForcedToUseIdeaFileChooser; }
isForcedToUseIdeaFileChooser
285,840
void (boolean forcedToUseIdeaFileChooser) { myForcedToUseIdeaFileChooser = forcedToUseIdeaFileChooser; }
setForcedToUseIdeaFileChooser
285,841
boolean (VirtualFile file) { if (FileElement.isArchive(file)) return false; // should be handle by acceptsAsJarFile return !file.isDirectory() && myChooseFiles; }
acceptAsGeneralFile
285,842
boolean (VirtualFile file) { return myChooseJars && FileElement.isArchive(file); }
acceptAsJarFile
285,843
VirtualFile (VirtualFile file) { if (file.isDirectory() && (myChooseFolders || isFileSelectable(file))) { return file; } boolean isJar = FileTypeRegistry.getInstance().isFileOfType(file, ArchiveFileType.INSTANCE); if (!isJar) { return acceptAsGeneralFile(file) ? file : null; } if (myChooseJarsAsFiles) { return file; } if (!acceptAsJarFile(file)) { return null; } String path = file.getPath(); return JarFileSystem.getInstance().findFileByPath(path + JarFileSystem.JAR_SEPARATOR); }
getFileToSelect
285,844
Object () { try { return super.clone(); } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } }
clone
285,845
Object (@NotNull String dataId) { return myUserData.get(dataId); }
getUserData
285,846
String () { return "FileChooserDescriptor [" + myTitle + "]"; }
toString
285,847
void (final FileElement parent) { myParent = parent; }
setParent
285,848
FileElement () { return myParent; }
getParent
285,849
VirtualFile () { return myFile; }
getFile
285,850
String () { return myName; }
getName
285,851
String () { if (myPath == null) { final StringBuilder sb = new StringBuilder(); FileElement element = this; while (element != null) { if (element.myParent != null || !element.myName.equals(File.separator)) { sb.insert(0, element.myName); } element = element.myParent; if (element != null) { sb.insert(0, File.separator); } } myPath = sb.toString(); } return myPath; }
getPath
285,852
int () { return myFile == null ? 0 : myFile.hashCode(); }
hashCode
285,853
boolean (Object obj) { if (obj instanceof FileElement) { if (Comparing.equal(((FileElement)obj).myFile, myFile)) return true; } return false; }
equals
285,854
String () { return myName != null ? myName : ""; }
toString
285,855
boolean () { return isFileHidden(myFile); }
isHidden
285,856
boolean () { return isArchive(getFile()); }
isArchive
285,857
boolean (@Nullable VirtualFile file) { return file != null && file.isValid() && file.isInLocalFileSystem() && (file.is(VFileProperty.HIDDEN) || SystemInfo.isUnix && file.getName().startsWith(".")); }
isFileHidden
285,858
boolean (@Nullable VirtualFile file) { if (file == null) return false; if (isArchiveFileSystem(file) && file.getParent() == null) return true; return !file.isDirectory() && FileTypeManager.getInstance().getFileTypeByFileName(file.getNameSequence()) == ArchiveFileType.INSTANCE && !isArchiveFileSystem(file.getParent()); }
isArchive
285,859
boolean (VirtualFile file) { return file.getFileSystem() instanceof JarFileSystem; }
isArchiveFileSystem
285,860
FileChooserDescriptor () { return new FileChooserDescriptor(true, true, true, true, false, true); }
createAllButJarContentsDescriptor
285,861
FileChooserDescriptor () { return new FileChooserDescriptor(true, false, false, false, false, true); }
createMultipleFilesNoJarsDescriptor
285,862
FileChooserDescriptor () { return new FileChooserDescriptor(false, true, false, false, false, true); }
createMultipleFoldersDescriptor
285,863
FileChooserDescriptor () { return new FileChooserDescriptor(true, false, false, false, false, false); }
createSingleFileNoJarsDescriptor
285,864
FileChooserDescriptor () { return new FileChooserDescriptor(true, false, false, false, false, false) { @Override public boolean isFileSelectable(@Nullable VirtualFile file) { return super.isFileSelectable(file) || file != null && SystemInfo.isMac && file.isDirectory() && "app".equals(file.getExtension()); } }; }
createSingleFileOrExecutableAppDescriptor
285,865
boolean (@Nullable VirtualFile file) { return super.isFileSelectable(file) || file != null && SystemInfo.isMac && file.isDirectory() && "app".equals(file.getExtension()); }
isFileSelectable
285,866
FileChooserDescriptor () { return new FileChooserDescriptor(true, true, true, true, false, false); }
createSingleLocalFileDescriptor
285,867
FileChooserDescriptor () { return createSingleLocalFileDescriptor(); }
createSingleFileDescriptor
285,868
FileChooserDescriptor (@NotNull FileType fileType) { return new FileChooserDescriptor(true, false, false, false, false, false) .withFileFilter(file -> FileTypeRegistry.getInstance().isFileOfType(file, fileType)); }
createSingleFileDescriptor
285,869
FileChooserDescriptor (final String extension) { return new FileChooserDescriptor(true, false, false, false, false, false).withFileFilter( file -> Comparing.equal(file.getExtension(), extension, file.isCaseSensitive())); }
createSingleFileDescriptor
285,870
FileChooserDescriptor () { return new FileChooserDescriptor(false, true, false, false, false, false); }
createSingleFolderDescriptor
285,871
FileChooserDescriptor () { return new FileChooserDescriptor(false, true, true, false, true, true); }
createMultipleJavaPathDescriptor
285,872
FileChooserDescriptor () { return new FileChooserDescriptor(true, true, false, false, false, false); }
createSingleFileOrFolderDescriptor
285,873
FileChooserDescriptor (@NotNull FileType fileType) { return new FileChooserDescriptor(true, true, false, false, false, false) .withFileFilter(file -> FileTypeRegistry.getInstance().isFileOfType(file, fileType)); }
createSingleFileOrFolderDescriptor
285,874
DumbAwareAction (@NotNull Consumer<? super AnActionEvent> actionPerformed) { return new SimpleDumbAwareAction(actionPerformed); }
create
285,875
DumbAwareAction (@Nullable @NlsActions.ActionText String text, @NotNull Consumer<? super AnActionEvent> actionPerformed) { return new SimpleDumbAwareAction(text, actionPerformed); }
create
285,876
DumbAwareAction (@Nullable Icon icon, @NotNull Consumer<? super AnActionEvent> actionPerformed) { return new SimpleDumbAwareAction(icon, actionPerformed); }
create
285,877
DumbAwareAction (@Nullable @NlsActions.ActionText String text, @Nullable Icon icon, @NotNull Consumer<? super AnActionEvent> actionPerformed) { DumbAwareAction action = new SimpleDumbAwareAction(text, actionPerformed); action.getTemplatePresentation().setIcon(icon); return action; }
create
285,878
void (@NotNull AnActionEvent e) { myActionPerformed.consume(e); }
actionPerformed
285,879
String () { return "Mock"; }
getName
285,880
String () { //noinspection HardCodedStringLiteral return "Mock"; }
getDescription
285,881
String () { return ".mockExtensionThatProbablyWon'tEverExist"; }
getDefaultExtension
285,882
Icon () { return null; }
getIcon
285,883
FileTypeManager () { return ourInstance.get(); }
getInstance
285,884
void (@NotNull FileType type, @NotNull String extension) { associate(type, new ExtensionFileNameMatcher(extension)); }
associateExtension
285,885
void (@NotNull FileType type, @NotNull String pattern) { associate(type, parseFromString(pattern)); }
associatePattern
285,886
void (@NotNull FileType type, @NotNull String extension) { removeAssociation(type, new ExtensionFileNameMatcher(extension)); }
removeAssociatedExtension
285,887
FileNameMatcher (@NotNull String pattern) { return FileNameMatcherFactory.getInstance().createMatcher(pattern); }
parseFromString
285,888
void (@NotNull FileTypeEvent event) { FileType addedFileType = event.getAddedFileType(); if (addedFileType != null) { String name = addedFileType.getName(); switch (name) { case "JAVA" -> JAVA = (LanguageFileType)addedFileType; case "CLASS" -> CLASS = addedFileType; case "JSP" -> JSP = (LanguageFileType)addedFileType; case "JSPX" -> JSPX = (LanguageFileType)addedFileType; case "XML" -> XML = (LanguageFileType)addedFileType; case "DTD" -> DTD = (LanguageFileType)addedFileType; case "HTML" -> HTML = (LanguageFileType)addedFileType; case "XHTML" -> XHTML = (LanguageFileType)addedFileType; case "JavaScript" -> JS = (LanguageFileType)addedFileType; case "Properties" -> PROPERTIES = (LanguageFileType)addedFileType; case "GUI_DESIGNER_FORM" -> GUI_DESIGNER_FORM = addedFileType; } } FileType removedFileType = event.getRemovedFileType(); if (removedFileType != null) { String name = removedFileType.getName(); switch (name) { case "JAVA" -> JAVA = PLAIN_TEXT; case "CLASS" -> CLASS = PLAIN_TEXT; case "JSP" -> JSP = PLAIN_TEXT; case "JSPX" -> JSPX = PLAIN_TEXT; case "XML" -> XML = PLAIN_TEXT; case "DTD" -> DTD = PLAIN_TEXT; case "HTML" -> HTML = PLAIN_TEXT; case "XHTML" -> XHTML = PLAIN_TEXT; case "JavaScript" -> JS = PLAIN_TEXT; case "Properties" -> PROPERTIES = PLAIN_TEXT; case "GUI_DESIGNER_FORM" -> GUI_DESIGNER_FORM = PLAIN_TEXT; case "PATCH" -> {} } } }
fileTypesChanged
285,889
String () { return "Native"; }
getName
285,890
String () { return IdeCoreBundle.message("filetype.native.description"); }
getDescription
285,891
String () { return ""; }
getDefaultExtension
285,892
Icon () { return AllIcons.FileTypes.Custom; }
getIcon
285,893
boolean () { return true; }
isBinary
285,894
boolean (Project project, @NotNull VirtualFile file) { return openAssociatedApplication(file); }
openFileInAssociatedApplication
285,895
boolean () { return true; }
useNativeIcon
285,896
boolean (@NotNull VirtualFile file) { if (!file.isInLocalFileSystem()) { throw new IllegalArgumentException("Non-local file: " + file + "; FS=" + file.getFileSystem()); } List<String> commands = new ArrayList<>(); if (SystemInfo.isWindows) { //noinspection SpellCheckingInspection commands.add("rundll32.exe"); commands.add("url.dll,FileProtocolHandler"); } else if (SystemInfo.isMac) { commands.add("/usr/bin/open"); } else if (SystemInfo.hasXdgOpen()) { commands.add("xdg-open"); } else { return false; } commands.add(file.getPresentableUrl()); try { new GeneralCommandLine(commands).createProcess(); return true; } catch (Exception e) { return false; } }
openAssociatedApplication
285,897
UserFileType<T> () { try { //noinspection unchecked return (UserFileType<T>)super.clone(); } catch (CloneNotSupportedException e) { return null; //Can't be } }
clone
285,898
String () { return myName; }
getName
285,899
String () { return myDescription; }
getDescription