Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
44,000 | File () { return file(myStashReflogPath); } | getStashReflogFile |
44,001 | File () { return file(myWorktreesDirPath); } | getWorktreesDirFile |
44,002 | File (@NotNull String filePath) { return file(ObjectUtils.chooseNotNull(myCustomHooksDirPath, myHooksDirPath) + slash(filePath)); } | hook |
44,003 | File (@NotNull String filePath) { return new File(FileUtil.toSystemDependentName(filePath)); } | file |
44,004 | boolean (String filePath) { return filePath.equals(myConfigFilePath); } | isConfigFile |
44,005 | boolean (String filePath) { return filePath.equals(myIndexFilePath); } | isIndexFile |
44,006 | boolean (String file) { return file.equals(myHeadFilePath); } | isHeadFile |
44,007 | boolean (@NotNull String file) { return file.equals(myOrigHeadPath); } | isOrigHeadFile |
44,008 | boolean (String filePath) { return filePath.startsWith(myRefsHeadsDirPath); } | isBranchFile |
44,009 | boolean (@NotNull String filePath, @NotNull String fullBranchName) { return FileUtil.pathsEqual(filePath, myMainDir.getPath() + slash(fullBranchName)); } | isBranchFile |
44,010 | boolean (String filePath) { return filePath.startsWith(myRefsRemotesDirPath); } | isRemoteBranchFile |
44,011 | boolean (@NotNull String path) { return path.startsWith(myRefsTagsPath); } | isTagFile |
44,012 | boolean (String path) { return path.equals(myRebaseApplyPath) || path.equals(myRebaseMergePath); } | isRebaseFile |
44,013 | boolean (String file) { return file.equals(myMergeHeadPath); } | isMergeFile |
44,014 | boolean (String file) { return file.equals(myPackedRefsPath); } | isPackedRefs |
44,015 | boolean (@NotNull String file) { return file.equals(myCommitMessagePath); } | isCommitMessageFile |
44,016 | boolean (@NotNull String path) { return path.equals(myExcludePath); } | isExclude |
44,017 | boolean (@NotNull String path) { return path.equals(myStashReflogPath); } | isStashReflogFile |
44,018 | void () { VfsUtil.markDirtyAndRefresh(true, true, false, myMainDir, myWorktreeDir); } | refresh |
44,019 | void () { VirtualFile indexFilePath = LocalFileSystem.getInstance().refreshAndFindFileByPath(myIndexFilePath); VfsUtil.markDirtyAndRefresh(true, false, false, indexFilePath); } | refreshIndexFile |
44,020 | void () { VirtualFile tagsDir = LocalFileSystem.getInstance().refreshAndFindFileByPath(myRefsTagsPath); VirtualFile packedRefsFile = LocalFileSystem.getInstance().refreshAndFindFileByPath(myPackedRefsPath); VfsUtil.markDirtyAndRefresh(true, true, false, tagsDir, packedRefsFile); } | refreshTagsFiles |
44,021 | VcsKey () { return GitVcs.getKey(); } | getVcsKey |
44,022 | void () { synchronized (LOCK) { myUntrackedFiles.clear(); myIgnoredFiles.clear(); myDirtyFiles.clear(); } } | dispose |
44,023 | void (@NotNull FilePath file) { addUntracked(Collections.singletonList(file)); } | addUntracked |
44,024 | void (@NotNull Collection<? extends FilePath> files) { synchronized (LOCK) { myUntrackedFiles.addAll(files); if (!myEverythingDirty) myDirtyFiles.addAll(files); } ChangeListManagerImpl.getInstanceImpl(myProject).notifyUnchangedFileStatusChanged(); scheduleUpdate(); } | addUntracked |
44,025 | void (@NotNull Collection<? extends FilePath> files) { synchronized (LOCK) { files.forEach(myUntrackedFiles::remove); if (!myEverythingDirty) myDirtyFiles.addAll(files); } ChangeListManagerImpl.getInstanceImpl(myProject).notifyUnchangedFileStatusChanged(); scheduleUpdate(); } | removeUntracked |
44,026 | void (@NotNull Collection<? extends FilePath> files) { synchronized (LOCK) { files.forEach(myIgnoredFiles::remove); if (!myEverythingDirty) { // break parent ignored directory into separate ignored files if (ContainerUtil.exists(files, myIgnoredFiles::hasAncestor)) { myEverythingDirty = true; } else { myDirtyFiles.addA... | removeIgnored |
44,027 | void (@NotNull Collection<? extends FilePath> files) { synchronized (LOCK) { if (myEverythingDirty) return; for (FilePath filePath : files) { if (myIgnoredFiles.contains(filePath) || !myIgnoredFiles.hasAncestor(filePath)) { myDirtyFiles.add(filePath); } } } scheduleUpdate(); } | markPossiblyUntracked |
44,028 | void () { synchronized (LOCK) { myEverythingDirty = true; myDirtyFiles.clear(); } scheduleUpdate(); } | invalidate |
44,029 | boolean () { synchronized (LOCK) { return myInUpdate; } } | isInUpdateMode |
44,030 | Collection<FilePath> () { synchronized (LOCK) { return new ArrayList<>(myUntrackedFiles); } } | getUntrackedFilePaths |
44,031 | Collection<FilePath> () { synchronized (LOCK) { return new ArrayList<>(myIgnoredFiles.filePaths()); } } | getIgnoredFilePaths |
44,032 | boolean (@NotNull FilePath filePath) { synchronized (LOCK) { return myUntrackedFiles.contains(filePath); } } | containsUntrackedFile |
44,033 | boolean (@NotNull FilePath filePath) { synchronized (LOCK) { return myIgnoredFiles.hasAncestor(filePath); } } | containsIgnoredFile |
44,034 | Collection<FilePath> () { VcsIgnoreManagerImpl.getInstanceImpl(myProject).awaitRefreshQueue(); return getIgnoredFilePaths(); } | retrieveIgnoredFilePaths |
44,035 | boolean () { synchronized (LOCK) { return myEverythingDirty || !myDirtyFiles.isEmpty(); } } | isDirty |
44,036 | void () { synchronized (LOCK) { if (!isDirty()) return; myInUpdate = true; } BackgroundTaskUtil.syncPublisher(myProject, VcsManagedFilesHolder.TOPIC).updatingModeChanged(); myQueue.queue(DisposableUpdate.createDisposable(this, new ComparableObject.Impl(this, "update"), this::update)); } | scheduleUpdate |
44,037 | void () { boolean nothingToDo; @Nullable List<FilePath> dirtyFiles; synchronized (LOCK) { nothingToDo = !isDirty(); if (nothingToDo) myInUpdate = false; dirtyFiles = myEverythingDirty ? null : new ArrayList<>(myDirtyFiles); myDirtyFiles.clear(); myEverythingDirty = false; } if (nothingToDo) { BackgroundTaskUtil.syncPub... | update |
44,038 | void (@NotNull RefreshResult result, @Nullable RecursiveFilePathSet dirtyScope, @NotNull Set<FilePath> oldIgnored) { if (dirtyScope != null) { myUntrackedFiles.removeIf(filePath -> dirtyScope.hasAncestor(filePath)); myUntrackedFiles.addAll(result.untracked); myIgnoredFiles.clear(); for (FilePath filePath : oldIgnored) ... | applyRefreshResult |
44,039 | void (@NotNull Set<FilePath> oldIgnored, @NotNull List<FilePath> newIgnored) { List<FilePath> addedIgnored = new ArrayList<>(); for (FilePath filePath : newIgnored) { if (!oldIgnored.contains(filePath)) { addedIgnored.add(filePath); } } if (!addedIgnored.isEmpty()) { myProject.getService(IgnoredToExcludedSynchronizer.c... | notifyExcludedSynchronizer |
44,040 | void (@NotNull Collection<FilePath> untrackedFiles, @NonNls String type) { ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(myProject); int removedFiles = 0; int maxFilesToReport = 10; Iterator<FilePath> it = untrackedFiles.iterator(); while (it.hasNext()) { FilePath filePath = it.next(); VirtualF... | removePathsUnderOtherRoots |
44,041 | RefreshResult (@Nullable List<FilePath> dirty) { try { boolean withIgnored = AdvancedSettings.getBoolean("vcs.process.ignored"); List<StatusRecord> fileStatuses = GitIndexStatusUtilKt.getFileStatus(myProject, myRoot, ContainerUtil.notNullize(dirty), false, true, withIgnored); RefreshResult result = new RefreshResult();... | refreshFiles |
44,042 | FilePath (@NotNull VirtualFile root, @NotNull StatusRecord status) { String path = status.getPath(); return GitContentRevision.createPath(root, path, path.endsWith("/")); } | getFilePath |
44,043 | Waiter () { assert ApplicationManager.getApplication().isUnitTestMode(); return new Waiter(myQueue); } | createWaiter |
44,044 | void () { CountDownLatch waiter = new CountDownLatch(1); myQueue.queue(Update.create(waiter, () -> waiter.countDown())); ProgressIndicatorUtils.awaitWithCheckCanceled(waiter); try { myQueue.waitForAllExecuted(10, TimeUnit.SECONDS); } catch (ExecutionException | InterruptedException | TimeoutException e) { throw new Run... | waitFor |
44,045 | Icon (@NotNull String path, int cacheKey, int flags) { return IconManager.getInstance().loadRasterizedIcon(path, GitIcons.class.getClassLoader(), cacheKey, flags); } | load |
44,046 | void (String[] args) { try { if (args.length < 1) { throw new IllegalArgumentException("No arguments specified!"); } String handlerId = ExternalAppUtil.getEnv(GitAskPassAppHandler.IJ_ASK_PASS_HANDLER_ENV); int xmlRpcPort = ExternalAppUtil.getEnvInt(GitAskPassAppHandler.IJ_ASK_PASS_PORT_ENV); String description = args[0... | main |
44,047 | void (String[] args) { try { if (args.length != 1) { System.err.println("Invalid arguments: " + Arrays.asList(args)); System.exit(ERROR_EXIT_CODE); return; } String handlerId = ExternalAppUtil.getEnv(GitRebaseEditorAppHandler.IJ_EDITOR_HANDLER_ENV); int idePort = ExternalAppUtil.getEnvInt(GitRebaseEditorAppHandler.IJ_E... | main |
44,048 | Icon (@NotNull String path, int cacheKey, int flags) { return IconManager.getInstance().loadRasterizedIcon(path, GitFeaturesTrainerIcons.class.getClassLoader(), cacheKey, flags); } | load |
44,049 | boolean (PsiClass psiClass) { return !psiClass.isInterface(); } | canGenerateToString |
44,050 | PsiElementClassMember[] (PsiField[] filteredFields, PsiMethod[] filteredMethods) { PsiElementClassMember[] members = new PsiElementClassMember[filteredFields.length + filteredMethods.length]; // first add fields for (int i = 0; i < filteredFields.length; i++) { members[i] = new PsiFieldMember(filteredFields[i]); } // t... | combineToClassMemberList |
44,051 | List<PsiMember> (@Nullable List<? extends PsiElementClassMember> classMemberList) { if (classMemberList == null || classMemberList.isEmpty()) { return Collections.emptyList(); } List<PsiMember> psiMemberList = new ArrayList<>(); for (PsiElementClassMember classMember : classMemberList) { psiMemberList.add(classMember.g... | convertClassMembersToPsiMembers |
44,052 | void (PsiMethod newMethod, String existingJavaDoc, String newJavaDoc) { String text = newJavaDoc != null ? newJavaDoc : existingJavaDoc; // prefer to use new javadoc PsiAdapter.addOrReplaceJavadoc(newMethod, text, true); } | applyJavaDoc |
44,053 | String () { return JavaBundle.message("configurable.GenerateToStringConfigurable.display.name"); } | getDisplayName |
44,054 | String () { return "editing.altInsert.tostring.settings"; } | getHelpTopic |
44,055 | JComponent () { return configUI = new ConfigUI(GenerateToStringContext.getConfig(), myProject); } | createComponent |
44,056 | boolean () { return ! GenerateToStringContext.getConfig().equals(configUI.getConfig()); } | isModified |
44,057 | void () { configUI.setConfig(GenerateToStringContext.getConfig()); } | reset |
44,058 | void () { configUI = null; } | disposeUIResources |
44,059 | PsiMethod (Collection<PsiMember> selectedMembers, Map<String, String> params, TemplateResource template) { // generate code using velocity String evaluatedText = GenerationUtil .velocityGenerateCode(clazz, selectedMembers, params, template.getTemplate(), config.getSortElements(), config.isUseFullyQualifiedName()); // c... | getMethodPrototype |
44,060 | InsertNewMethodStrategy (InsertWhere option) { return switch (option) { case AFTER_EQUALS_AND_HASHCODE -> InsertAfterEqualsHashCodeStrategy.getInstance(); case AT_CARET -> InsertAtCaretStrategy.getInstance(); case AT_THE_END_OF_A_CLASS -> InsertLastStrategy.getInstance(); }; } | getStrategy |
44,061 | ConflictResolutionPolicy (TemplateResource template) { final DuplicationPolicy dupPolicy = config.getReplaceDialogInitialOption(); if (dupPolicy == DuplicationPolicy.ASK) { PsiMethod targetMethod = getMethodPrototype(Collections.emptyList(), Collections.emptyMap(), template); PsiMethod existingMethod = targetMethod != ... | exitsMethodDialog |
44,062 | void (Map<String, String> params, TemplateResource template) { PsiMethod targetMethod = getMethodPrototype(Collections.emptyList(), Collections.emptyMap(), template); if (targetMethod == null) return; PsiMethod existingMethod = clazz.findMethodBySignature(targetMethod, false); // find the existing method if (existingMe... | beforeCreateToStringMethod |
44,063 | void (PsiMethod method, Map<String, String> params, TemplateResource template) { PsiFile containingFile = clazz.getContainingFile(); if (containingFile instanceof PsiJavaFile javaFile) { if (params.get("autoImportPackages") != null) { // keep this for old user templates autoImportPackages(javaFile, params.get("autoImpo... | afterCreateToStringMethod |
44,064 | boolean () { return false; } | startInWriteAction |
44,065 | void (@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { PsiClass clazz = getSubjectClass(editor, file); if (clazz == null) return; doExecuteAction(project, clazz, editor); } | invoke |
44,066 | void (final Project project, final PsiClass clazz) { doExecuteAction(project, clazz, null); } | executeActionQuickFix |
44,067 | void (@NotNull final Project project, @NotNull final PsiClass clazz, final Editor editor) { if (!FileModificationService.getInstance().preparePsiElementsForWrite(clazz)) { return; } LOG.debug("+++ doExecuteAction - START +++"); if (LOG.isDebugEnabled()) { LOG.debug("Current project " + project.getName()); } final PsiEl... | doExecuteAction |
44,068 | String () { return "editing.altInsert.tostring"; } | getHelpId |
44,069 | boolean () { return JavaCodeStyleSettings.getInstance(clazz.getContainingFile()).INSERT_OVERRIDE_ANNOTATION; } | isInsertOverrideAnnotationSelected |
44,070 | PsiElementClassMember[] (@NotNull PsiClass clazz, PsiElementClassMember[] dialogMembers) { return Arrays.stream(dialogMembers) .filter(member -> member.getElement().getContainingClass() == clazz) .toArray(PsiElementClassMember[]::new); } | getPreselection |
44,071 | void (PsiClass clazz, MemberChooser<? super PsiElementClassMember> dialog) { final PsiElementClassMember[] members = buildMembersToShow(clazz); dialog.resetElements(members); dialog.selectElements(getPreselection(clazz, members)); } | updateDialog |
44,072 | PsiElementClassMember[] (PsiClass clazz) { Config config = GenerateToStringContext.getConfig(); PsiField[] filteredFields = GenerateToStringUtils.filterAvailableFields(clazz, true, config.getFilterPattern()); if (LOG.isDebugEnabled()) LOG.debug("Number of fields after filtering: " + filteredFields.length); PsiMethod[] ... | buildMembersToShow |
44,073 | PsiClass (Editor editor, final PsiFile file) { if (file == null) return null; int offset = editor.getCaretModel().getOffset(); PsiElement context = file.findElementAt(offset); if (context == null) return null; PsiClass clazz = PsiTreeUtil.getParentOfType(context, PsiClass.class, false); if (clazz == null) { return null... | getSubjectClass |
44,074 | void (MemberChooser chooser) { this.chooser = chooser; } | setChooser |
44,075 | void (ActionEvent e) { final TemplatesPanel ui = new TemplatesPanel(clazz.getProject()); Configurable composite = new TabbedConfigurable() { @Override @NotNull protected List<Configurable> createConfigurables() { List<Configurable> res = new ArrayList<>(); res.add(new GenerateToStringConfigurable(clazz.getProject())); ... | actionPerformed |
44,076 | List<Configurable> () { List<Configurable> res = new ArrayList<>(); res.add(new GenerateToStringConfigurable(clazz.getProject())); res.add(ui); return res; } | createConfigurables |
44,077 | String () { return JavaBundle.message("generate.tostring.tab.title"); } | getDisplayName |
44,078 | String () { return "editing.altInsert.tostring.settings"; } | getHelpTopic |
44,079 | TemplateResource () { return (TemplateResource) comboBox.getSelectedItem(); } | getSelectedTemplate |
44,080 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TemplatesState state = (TemplatesState)o; return Comparing.strEqual(defaultTemplateName, state.defaultTemplateName) && Objects.equals(templates, state.templates); } | equals |
44,081 | int () { return Objects.hash(StringUtil.nullize(defaultTemplateName), templates); } | hashCode |
44,082 | TemplatesState () { return myState; } | getState |
44,083 | void (@NotNull TemplatesState state) { if (StringUtil.isEmpty(state.defaultTemplateName) && !StringUtil.isEmpty(state.oldDefaultTemplateName)) { state.defaultTemplateName = state.oldDefaultTemplateName; } state.oldDefaultTemplateName = null; myState = state; } | loadState |
44,084 | void (@NotNull TemplateResource template) { myState.templates.add(template); } | addTemplate |
44,085 | Collection<TemplateResource> () { Set<String> names = new HashSet<>(); Collection<TemplateResource> templates = new LinkedHashSet<>(getDefaultTemplates()); for (TemplateResource template : myState.templates) { if (names.add(template.getFileName())) { templates.add(template); } } return templates; } | getAllTemplates |
44,086 | TemplateResource () { TemplateResource resource = findTemplateByName(myState.defaultTemplateName); if (resource != null) { return resource; } String initialTemplateName = getInitialTemplateName(); resource = initialTemplateName != null ? findTemplateByName(initialTemplateName) : null; if (resource == null) { return get... | getDefaultTemplate |
44,087 | String () { return null; } | getInitialTemplateName |
44,088 | void (@NotNull TemplateResource resource) { myState.defaultTemplateName = resource.getFileName(); } | setDefaultTemplate |
44,089 | void (@NotNull List<? extends TemplateResource> items) { myState.templates.clear(); for (TemplateResource item : items) { if (!item.isDefault()) { myState.templates.add(item); } } } | setTemplates |
44,090 | PsiType (@NotNull Project project) { final PsiType classType = createElementType(project, FieldElement.class); PsiClass[] classes = JavaPsiFacade.getInstance(project).findClasses(CommonClassNames.JAVA_UTIL_LIST, GlobalSearchScope.allScope(project)); for (PsiClass listClass : classes) { if (listClass.getTypeParameters()... | createFieldListElementType |
44,091 | PsiType (Project project, Class<?> elementClass) { final List<String> methodNames = ContainerUtil.mapNotNull(elementClass.getMethods(), method -> { final String methodName = method.getName(); if (methodName.startsWith("set") || method.isSynthetic() || method.isBridge()) { //hide setters from completion list return null... | createElementType |
44,092 | String (String s, String token) { if (s == null) { return null; } int i = s.indexOf(token); if (i == -1) { return s; } return s.substring(i + token.length()); } | after |
44,093 | String (String s, String token) { if (s == null) { return null; } int i = s.lastIndexOf(token); if (i == -1) { return s; } return s.substring(0, i); } | before |
44,094 | String () { return template; } | getTemplate |
44,095 | void (String template) { this.template = template; } | setTemplate |
44,096 | void (String fileName) { this.fileName = fileName; } | setFileName |
44,097 | boolean () { return isDefault; } | isDefault |
44,098 | String () { return getMethodBody(template); } | getMethodBody |
44,099 | String () { return getMethodSignature(template); } | getMethodSignature |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.