Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
49,100 | void () { incModificationCount(); if (!myTempCopy) { final ProjectView view = ProjectView.getInstance(myProject); if (view != null) { view.refresh(); } } } | touch |
49,101 | void (PsiFile file) { final VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile == null) return; for (VirtualFilePointer pointer : myAssociations.keySet()) { if (pointer.getUrl().equals(virtualFile.getUrl())) { myAssociations.remove(pointer); touch(); return; } } } | removeAssociations |
49,102 | void (PsiFile file, PsiFile assoc) { final VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile == null) return; if (assoc.getVirtualFile() == null) return; for (VirtualFilePointer pointer : myAssociations.keySet()) { if (pointer.getUrl().equals(virtualFile.getUrl())) { VirtualFilePointerContainer container... | removeAssociation |
49,103 | void (PsiFile file, PsiFile assoc) { final VirtualFile virtualFile = assoc.getVirtualFile(); if (virtualFile == null) { LOG.warn("No VirtualFile for " + file.getName()); return; } addAssociation(file, virtualFile); } | addAssociation |
49,104 | void (PsiFile file, VirtualFile assoc) { final VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile == null) { LOG.warn("No VirtualFile for " + file.getName()); return; } VirtualFilePointerManager filePointerManager = VirtualFilePointerManager.getInstance(); for (VirtualFilePointer pointer : myAssociations.... | addAssociation |
49,105 | PsiFile[] (PsiFile file) { return getAssociationsFor(file, FileType.EMPTY_ARRAY); } | getAssociationsFor |
49,106 | PsiFile[] (PsiFile file, FileType... fileTypes) { final VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile == null) return PsiFile.EMPTY_ARRAY; for (VirtualFilePointer pointer : myAssociations.keySet()) { if (pointer.isValid() && pointer.getUrl().equals(virtualFile.getUrl())) { final VirtualFilePointerCon... | getAssociationsFor |
49,107 | boolean (PsiFile psiFile, FileType... fileTypes) { for (FileType fileType : fileTypes) { if (psiFile.getFileType().equals(fileType)) return true; } return false; } | matchesFileType |
49,108 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
49,109 | void (@NotNull final AnActionEvent e) { final Project project = e.getProject(); if (project == null) return; final PsiFile file = e.getData(CommonDataKeys.PSI_FILE); FileAssociationsConfigurable.editAssociations(project, file); } | actionPerformed |
49,110 | void () { assert myImplModCount == myImpl.getModificationCount(); myImpl.copyFrom(myTmp); myImplModCount = myImpl.getModificationCount(); myStartModCount = myTmp.getModificationCount(); } | applyChanges |
49,111 | boolean () { assert myImplModCount == myImpl.getModificationCount(); return myStartModCount != myTmp.getModificationCount(); } | isModified |
49,112 | void () { assert myImplModCount == myImpl.getModificationCount(); myTmp.copyFrom(myImpl); myStartModCount = myTmp.getModificationCount(); } | reset |
49,113 | void () { Disposer.dispose(myTmp); } | dispose |
49,114 | void (PsiFile file) { myTmp.removeAssociations(file); } | removeAssociations |
49,115 | void (PsiFile file, PsiFile assoc) { myTmp.removeAssociation(file, assoc); } | removeAssociation |
49,116 | void (PsiFile file, PsiFile assoc) { myTmp.addAssociation(file, assoc); } | addAssociation |
49,117 | void (PsiFile file, VirtualFile assoc) { myTmp.addAssociation(file, assoc); } | addAssociation |
49,118 | PsiFile[] (PsiFile file) { return myTmp.getAssociationsFor(file); } | getAssociationsFor |
49,119 | PsiFile[] (PsiFile file, FileType... fileTypes) { return myTmp.getAssociationsFor(file, fileTypes); } | getAssociationsFor |
49,120 | boolean (VirtualFile file, boolean showHiddenFiles) { final FileType fileType = file.getFileType(); return file.isDirectory() || (super.isFileVisible(file, showHiddenFiles) && FileAssociationsManager.Holder.XML_FILES_LIST.contains(fileType)); } | isFileVisible |
49,121 | void (@NotNull AnActionEvent e) { e.getPresentation().setVisible(isVisible(e)); e.getPresentation().setEnabled(isEnabled(e)); } | update |
49,122 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
49,123 | boolean (@Nullable AnActionEvent e) { if (e == null) return false; final PsiFile psiFile = getPsiFile(e); if (psiFile == null) return false; if (!XsltSupport.isXsltFile(psiFile)) return false; final Project project = getEventProject(e); if (project == null) return false; return PsiManager.getInstance(project).isInProje... | isEnabled |
49,124 | boolean (@NotNull AnActionEvent e) { final PsiFile psiFile = getPsiFile(e); if (psiFile == null) return false; return XsltSupport.isXsltFile(psiFile); } | isVisible |
49,125 | PsiFile (@Nullable AnActionEvent e) { return e != null ? e.getData(CommonDataKeys.PSI_FILE) : null; } | getPsiFile |
49,126 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
49,127 | void (@NotNull AnActionEvent e) { final PsiFile psiFile = AssociationsGroup.getPsiFile(e); if (psiFile == null) return; addAssociation(psiFile); DaemonCodeAnalyzer.getInstance(psiFile.getProject()).restart(psiFile); } | actionPerformed |
49,128 | void (final PsiFile psiFile) { final VirtualFile virtualFile = psiFile.getVirtualFile(); assert virtualFile != null; final FileChooserDescriptor descriptor = new AnyXMLDescriptor(true) { @Override public boolean isFileSelectable(@Nullable VirtualFile file) { return super.isFileSelectable(file) && !file.equals(virtualFi... | addAssociation |
49,129 | boolean (@Nullable VirtualFile file) { return super.isFileSelectable(file) && !file.equals(virtualFile); } | isFileSelectable |
49,130 | JComponent () { myEditor = new AssociationsEditor(myProject, myState.state); return myEditor.getComponent(); } | createComponent |
49,131 | boolean () { return myEditor != null && myEditor.isModified(); } | isModified |
49,132 | void () { myEditor.apply(); DaemonCodeAnalyzer.getInstance(myProject).restart(); } | apply |
49,133 | void () { myEditor.reset(); } | reset |
49,134 | void () { if (myEditor != null) { myState.state = myEditor.getState(); Disposer.dispose(myEditor); myEditor = null; } } | disposeUIResources |
49,135 | void (@NotNull Project project, @Nullable PsiFile file) { FileAssociationsConfigurable instance = new FileAssociationsConfigurable(project); ShowSettingsUtil.getInstance().editConfigurable(project, instance, () -> { if (file != null) { instance.myEditor.select(file); } }); } | editAssociations |
49,136 | TreeState () { return state != null ? state : TreeState.createFrom(null); } | getState |
49,137 | void (@NotNull TreeState state) { this.state = state; } | loadState |
49,138 | String () { return getHelpTopic(); } | getId |
49,139 | void (ListDataEvent listDataEvent) { myTree.invalidate(); myTree.repaint(); } | intervalAdded |
49,140 | void (ListDataEvent listDataEvent) { myTree.invalidate(); myTree.repaint(); } | intervalRemoved |
49,141 | void (ListDataEvent listDataEvent) { } | contentsChanged |
49,142 | void () { myComponent = new JPanel(new BorderLayout()); JBSplitter splitter = new JBSplitter("AssociationsEditor.dividerProportion", 0.3f); myComponent.add(splitter, BorderLayout.CENTER); JPanel leftPanel = new JPanel(new BorderLayout()); leftPanel.setBorder(IdeBorderFactory.createTitledBorder(XPathBundle.message("bord... | initUI |
49,143 | void () { TreeNode rootNode = myModel.getRoot(); if (rootNode == null) return; MyProjectStructure treeStructure = myModel.getTreeStructure(); Object element = treeStructure.getRootElement(); myModel.expand(element, myTree, path -> { }); for (Object childElement : treeStructure.getChildElements(element)) { myModel.expan... | expandTree |
49,144 | TreeState () { return TreeState.createOn(myTree); } | getState |
49,145 | JPanel () { return myComponent; } | getComponent |
49,146 | Object (JTree tree) { final TreePath[] selectionPath = tree.getSelectionPaths(); if (selectionPath == null || selectionPath.length != 1) return null; final Object component = selectionPath[0].getLastPathComponent(); return getObject(component); } | getTreeSelection |
49,147 | Object (Object component) { if (!(component instanceof DefaultMutableTreeNode node)) return null; final Object userObject = node.getUserObject(); if (!(userObject instanceof ProjectViewNode)) return null; return ((ProjectViewNode<?>)userObject).getValue(); } | getObject |
49,148 | boolean () { return myManager.isModified(); } | isModified |
49,149 | void () { myManager.applyChanges(); } | apply |
49,150 | void () { myManager.reset(); final Object selection = getTreeSelection(myTree); myListModel.update(selection instanceof PsiFile ? ((PsiFile)selection) : null); } | reset |
49,151 | void () { myManager.dispose(); } | dispose |
49,152 | void (@NotNull PsiFile file) { myModel.select(file, myTree, path -> { }); } | select |
49,153 | void (@NotNull AnActionEvent e) { final PsiFile selection = (PsiFile)getTreeSelection(myTree); addAssociation(selection); myListModel.update(selection); } | actionPerformed |
49,154 | void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(getTreeSelection(myTree) instanceof PsiFile); } | update |
49,155 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
49,156 | void (@NotNull AnActionEvent e) { final PsiFile selection = (PsiFile)getTreeSelection(myTree); final PsiFile listSelection = (PsiFile)getListSelection(); myManager.removeAssociation(selection, listSelection); myListModel.update(selection); } | actionPerformed |
49,157 | void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(getListSelection() instanceof PsiFile); } | update |
49,158 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
49,159 | Object () { return myList.getSelectedValue(); } | getListSelection |
49,160 | NodeSortKey () { return NodeSortKey.BY_NAME; } | getSortKey |
49,161 | List () { return Collections.EMPTY_LIST; } | getProviders |
49,162 | Object[] (@NotNull Object obj) { final Object[] childElements = super.getChildElements(obj); List l = new ArrayList(childElements.length); for (Object o : childElements) { if (o instanceof ProjectViewNode) { final ProjectViewNode node = (ProjectViewNode)o; final Object element = node.getValue(); if (element instanceof ... | getChildElements |
49,163 | boolean () { return true; } | isFlattenPackages |
49,164 | boolean () { return true; } | isHideEmptyMiddlePackages |
49,165 | int () { return myFiles.length; } | getSize |
49,166 | PsiFile (int index) { return myFiles[index]; } | getElementAt |
49,167 | void (TreeSelectionEvent e) { final Object selection = getTreeSelection(myTree); if (selection instanceof PsiFile) { update((PsiFile)selection); } else { update(null); } } | valueChanged |
49,168 | void (@Nullable PsiFile selection) { final int oldSize = myFiles.length; myFiles = PsiFile.EMPTY_ARRAY; if (myFiles.length != oldSize) fireIntervalRemoved(this, 0, oldSize - 1); if (selection != null) { myFiles = myManager.getAssociationsFor(selection); if (myFiles.length > 0) fireIntervalAdded(this, 0, myFiles.length ... | update |
49,169 | void (@NotNull JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { final Object object = getObject(value); if (object instanceof PsiFile file) { final Object userObject = ((DefaultMutableTreeNode)value).getUserObject(); if (myManager.getAssociationsFor(file).length >... | customizeCellRenderer |
49,170 | boolean () { return false; } | update |
49,171 | PsiFileNode () { return myNode; } | getElement |
49,172 | String (PsiFile file) { return file.getName(); } | getElementText |
49,173 | String (PsiFile psiElement, String string) { return "(" + psiElement.getVirtualFile().getParent().getPresentableUrl() + ")"; } | getContainerText |
49,174 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
49,175 | String (PsiFile assoc, PsiFile psiFile) { final VirtualFile virtualFile = assoc.getVirtualFile(); assert virtualFile != null; final String path = VfsUtilCore.findRelativePath(psiFile.getVirtualFile(), virtualFile, File.separatorChar); final ProjectFileIndex index = ProjectRootManager.getInstance(assoc.getProject()).get... | getPath |
49,176 | boolean (@NotNull AnActionEvent e) { return true; } | isSelected |
49,177 | void (@NotNull AnActionEvent e, boolean state) { assert !state; myFileAssociationsManager.removeAssociation(myPsiFile, myAssoc); DaemonCodeAnalyzer.getInstance(AnAction.getEventProject(e)).restart(); } | setSelected |
49,178 | String () { return myLocation; } | getLocation |
49,179 | String () { return XPathBundle.message("intention.name.convert.to.entity", myToken.getText(), myValue); } | getText |
49,180 | String () { return XPathBundle.message("intention.family.name.convert.to.entity"); } | getFamilyName |
49,181 | boolean (@NotNull Project project, Editor editor, PsiFile file) { if (!myToken.isValid()) { return false; } final PsiFile psiFile = myToken.getContainingFile(); assert psiFile != null; final PsiElement context = psiFile.getContext(); return context != null && context.isValid(); } | isAvailableImpl |
49,182 | boolean () { return false; } | requiresEditor |
49,183 | boolean () { return true; } | startInWriteAction |
49,184 | void (Editor editor, XmlTag xmlTag) { editor.getCaretModel().moveToOffset(xmlTag.getTextRange().getStartOffset()); } | moveTo |
49,185 | TemplateBuilderImpl (XmlTag xmlTag) { final PsiFile psiFile = PsiFileFactory.getInstance(xmlTag.getProject()) .createFileFromText("dummy.xml", XmlFileType.INSTANCE, xmlTag.getText(), LocalTimeCounter.currentTime(), true, false); return new TemplateBuilderImpl(psiFile); } | createTemplateBuilder |
49,186 | boolean (@NotNull Project project, Editor editor, PsiFile file) { if (requiresEditor() && editor == null) return false; return isAvailableImpl(project, editor, file); } | isAvailable |
49,187 | LocalQuickFix (boolean isOnTheFly) { final boolean requiresEditor = requiresEditor(); if (requiresEditor && !isOnTheFly) return null; return new LocalQuickFix() { @Override @NotNull public String getName() { return AbstractFix.this.getText(); } @Override @NotNull public String getFamilyName() { return AbstractFix.this.... | createQuickFix |
49,188 | String () { return AbstractFix.this.getText(); } | getName |
49,189 | String () { return AbstractFix.this.getFamilyName(); } | getFamilyName |
49,190 | void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { Editor editor; if (requiresEditor) { final DataContext dataContext = DataManager.getInstance().getDataContext(); editor = CommonDataKeys.EDITOR.getData(dataContext); if (editor == null) { if ((editor = FileEditorManager.getInstance(project).getSel... | applyFix |
49,191 | String () { return XPathBundle.message("intention.family.name.download.external.resource"); } | getFamilyName |
49,192 | boolean () { return false; } | startInWriteAction |
49,193 | void (@NotNull final Project project, @NotNull ProblemDescriptor descriptor) { boolean tryAgain = true; final DownloadManager.DownloadException[] ex = new DownloadManager.DownloadException[1]; final Runnable runnable = () -> { final ProgressIndicator progress = ProgressManager.getInstance().getProgressIndicator(); fina... | applyFix |
49,194 | void (XmlTag[] subTags, Set<? super String> list) { for (XmlTag xmlTag : subTags) { final String href = xmlTag.getAttributeValue("href"); // TODO: Handle relative dependencies! if (href != null && href.startsWith("http://")) { list.add(href); } } } | processReferences |
49,195 | boolean (PsiFile psiFile) { return XsltSupport.isXsltFile(psiFile); } | isAccepted |
49,196 | Set<String> (PsiFile psiFile) { final XmlDocument document = ((XmlFile)psiFile).getDocument(); if (document != null) { final XmlTag rootTag = document.getRootTag(); if (rootTag != null) { final Set<String> list = new HashSet<>(); processReferences(rootTag.findSubTags("include", XsltSupport.XSLT_NS), list); processRefer... | getResourceDependencies |
49,197 | String () { return XPathBundle.message("intention.name.add.argument.for.x", myName); } | getText |
49,198 | String () { return XPathBundle.message("intention.family.name.add.argument"); } | getFamilyName |
49,199 | boolean (@NotNull Project project, Editor editor, PsiFile file) { return myTag.isValid(); } | isAvailableImpl |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.