Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
25,800 | void () { if (myListenerHighlighter != null && ArrayUtil.contains(myListenerHighlighter, (Object[])myEditor.getMarkupModel().getAllHighlighters())) { myListenerHighlighter.dispose(); myListenerHighlighter = null; } } | clearSelection |
25,801 | void (@NotNull KeyEvent e) {} | keyTyped |
25,802 | void (KeyEvent e) {} | keyReleased |
25,803 | void (@NotNull MouseEvent e) {} | mousePressed |
25,804 | void (@NotNull MouseEvent e) {} | mouseReleased |
25,805 | void (@NotNull MouseEvent e) {} | mouseEntered |
25,806 | void (@NotNull MouseEvent e) {} | mouseExited |
25,807 | void () { Object source = getSource(); String fileName = "Dummy." + (source instanceof FileType ? ((FileType)source).getDefaultExtension() : "txt"); LightVirtualFile lightFile; if (source instanceof PsiViewerExtension) { lightFile = new LightVirtualFile(fileName, ((PsiViewerExtension)source).getDefaultFileType(), ""); } else if (source instanceof LanguageFileType) { lightFile = new LightVirtualFile(fileName, ObjectUtils .chooseNotNull((Language)myDialectComboBox.getSelectedItem(), ((LanguageFileType)source).getLanguage()), ""); } else if (source instanceof FileType) { lightFile = new LightVirtualFile(fileName, (FileType)source, ""); } else { return; } EditorHighlighter highlighter = EditorHighlighterFactory.getInstance().createEditorHighlighter(myProject, lightFile); try { myEditor.setHighlighter(highlighter); } catch (Throwable e) { LOG.warn(e); } } | updateEditor |
25,808 | void (@NotNull PsiElement element) { myStructureTreeModel.select(element, myPsiTree, path -> {}); } | selectElement |
25,809 | void (@NotNull CaretEvent e) { if (!available() || myEditor.getSelectionModel().hasSelection()) return; PsiElement rootPsiElement = myTreeStructure.getRootPsiElement(); if (rootPsiElement == null) return; PsiElement rootElement = myTreeStructure.getRootPsiElement(); int baseOffset = rootPsiElement.getTextRange().getStartOffset(); int offset = myEditor.getCaretModel().getOffset() + baseOffset; String progressDialogTitle = DevPsiViewerBundle.message("psi.viewer.progress.dialog.get.element.at.offset"); Callable<@Nullable PsiElement> finder = () -> InjectedLanguageUtilBase.findElementAtNoCommit(rootElement.getContainingFile(), offset); PsiElement element = computeSlowOperationsSafeInBgThread(myProject, progressDialogTitle, finder); if (element != null) { myBlockTree.selectNodeFromEditor(element); myStubTree.selectNodeFromEditor(element); selectElement(element); } } | caretPositionChanged |
25,810 | void (@NotNull SelectionEvent e) { if (!available() || !myEditor.getSelectionModel().hasSelection()) return; PsiElement rootElement = myTreeStructure.getRootPsiElement(); if (rootElement == null) return; SelectionModel selection = myEditor.getSelectionModel(); TextRange textRange = rootElement.getTextRange(); int baseOffset = textRange != null ? textRange.getStartOffset() : 0; int start = selection.getSelectionStart() + baseOffset; int end = selection.getSelectionEnd() + baseOffset - 1; String progressDialogTitle = DevPsiViewerBundle.message("psi.viewer.progress.dialog.get.common.parent"); Callable<PsiElement> finder = () -> findCommonParent(InjectedLanguageUtilBase.findElementAtNoCommit(rootElement.getContainingFile(), start), InjectedLanguageUtilBase.findElementAtNoCommit(rootElement.getContainingFile(), end)); PsiElement element = computeSlowOperationsSafeInBgThread(myProject, progressDialogTitle, finder); if (element != null) { if (myEditor.getContentComponent().hasFocus()) { myBlockTree.selectNodeFromEditor(element); myStubTree.selectNodeFromEditor(element); } selectElement(element); } } | selectionChanged |
25,811 | PsiElement (PsiElement start, PsiElement end) { if (end == null || start == end) { return start; } TextRange endRange = end.getTextRange(); PsiElement parent = start.getContext(); while (parent != null && !parent.getTextRange().contains(endRange)) { parent = parent.getContext(); } return parent; } | findCommonParent |
25,812 | boolean () { return myLastParsedTextHashCode == myNewDocumentHashCode && myEditor.getContentComponent().hasFocus(); } | available |
25,813 | void (@NotNull DocumentEvent event) { myNewDocumentHashCode = event.getDocument().getText().hashCode(); } | documentChanged |
25,814 | void (@NotNull FocusEvent e) { Component from = e.getOppositeComponent(); if (!e.isTemporary() && from != null && !myComboBox.isPopupVisible() && isUnder(from, myParent)) { myComboBox.setPopupVisible(true); } } | focusGained |
25,815 | boolean (@NotNull Component component, Component parent) { while (component != null) { if (component == parent) return true; component = component.getParent(); } return false; } | isUnder |
25,816 | String () { return myStub.toString(); } | getName |
25,817 | void (@Nullable PsiElement rootRootElement, @NotNull String text) { resetStubTree(); buildStubTree(rootRootElement, text); } | reloadTree |
25,818 | void () { myStubTree.removeAll(); if (myTreeModel != null) { Disposer.dispose(myTreeModelDisposable); myTreeModel = null; myTreeModelDisposable = Disposer.newDisposable(); } myNodeToStubs = new BidirectionalMap<>(); ViewerPsiBasedTree.removeListenerOfClass(myStubTree, StubTreeSelectionListener.class); } | resetStubTree |
25,819 | JComponent () { if (myPanel != null) return myPanel; JBSplitter splitter = new JBSplitter("StubViewer.showPreviewDetails.proportion", 0.7f); splitter.setFirstComponent(ScrollPaneFactory.createScrollPane(myStubTree, true)); AnAction action = myStubDetailsViewer.addComponent(splitter); ActionToolbarImpl toolbar = new ActionToolbarImpl("Stub Viewer", new DefaultActionGroup(action), false); toolbar.setTargetComponent(splitter); BorderLayoutPanel panel = new BorderLayoutPanel(); panel.addToCenter(splitter).addToRight(toolbar).setBorder(IdeBorderFactory.createBorder()); initTree(myStubTree); myPanel = panel; return panel; } | getComponent |
25,820 | boolean () { return myStubTree.isFocusOwner(); } | isFocusOwner |
25,821 | void () { IdeFocusManager.getInstance(myProject).requestFocus(myStubTree, true); } | focusTree |
25,822 | void () { resetStubTree(); } | dispose |
25,823 | Stub (Project project, PsiElement rootElement, @NotNull String textToParse) { Stub stub = null; PsiFileWithStubSupport psiFile = (PsiFileWithStubSupport)rootElement; StubTree tree = psiFile.getStubTree(); if (tree != null) { stub = tree.getRoot(); } else if (rootElement instanceof PsiFileImpl) { StubBuilder stubBuilder = getStubBuilder((PsiFileImpl)rootElement); stub = stubBuilder == null ? null : stubBuilder.buildStubTree((PsiFile)rootElement); } if (stub == null) { LightVirtualFile file = new LightVirtualFile("stub", rootElement.getLanguage(), textToParse); final FileContent fc; try { fc = FileContentImpl.createByFile(file, project); fc.putUserData(IndexingDataKeys.PSI_FILE, psiFile); stub = StubTreeBuilder.buildStubTree(fc); } catch (IOException e) { LOG.warn(e.getMessage(), e); } } return stub; } | buildStubForElement |
25,824 | StubBuilder (@NotNull PsiFileImpl rootElement) { IStubFileElementType<?> builder = rootElement.getElementTypeForStubBuilder(); return builder == null ? null : builder.getBuilder(); } | getStubBuilder |
25,825 | void (@Nullable PsiElement element) { if (myTreeModel == null || element == null) return; final PsiFile file = element.getContainingFile(); if (!(file instanceof PsiFileWithStubSupport)) return; final DefaultMutableTreeNode rootNode = getRoot(); if (rootNode == null) return; StubElement<?> stubElement = myNodeToStubs.get(element.getNode()); if (stubElement != null) { selectStubElement(stubElement); } else { myStubTree.clearSelection(); } } | selectNodeFromPsi |
25,826 | void (StubElement<?> stubElement) { TreeNode node = TreeUtil.treeNodeTraverser(getRoot()).traverse().find( (treeNode) -> treeNode instanceof DefaultMutableTreeNode && ((StubTreeNode)((DefaultMutableTreeNode)treeNode).getUserObject()).getStub() == stubElement ); if (node != null) { TreePath path = TreePathUtil.pathToTreeNode(node); myStubTree.getSelectionModel().setSelectionPath(path); } } | selectStubElement |
25,827 | void (TreeSelectionEvent e) { if (myTreeModel == null) return; final StubTreeNode rootNode = (StubTreeNode)getRoot().getUserObject(); StubElement<?> topLevelStub = rootNode == null ? null : rootNode.getStub(); if (!(topLevelStub instanceof PsiFileStub)) return; StubElement<?> stub = getSelectedStub(); if (stub == null) return; PsiElement result = getPsiElementForStub(stub); if (result != null) { myUpdater.updatePsiTree(result, myStubTree.hasFocus() ? result.getTextRange() : null); myStubDetailsViewer.valueChanged(stub); } } | valueChanged |
25,828 | DefaultMutableTreeNode () { return (DefaultMutableTreeNode)myStubTree.getModel().getRoot(); } | getRoot |
25,829 | PsiElement (StubElement<?> stub) { Ref<PsiElement> result = Ref.create(); myNodeToStubs.forEach((key, value) -> { if (value == stub) { result.set(key.getPsi()); } }); return result.get(); } | getPsiElementForStub |
25,830 | void (@NotNull PsiFileWithStubSupport rootElement, @NotNull PsiFileStub<?> rootStub) { fillTreeForStub(rootElement, new StubTree(rootStub)); } | fillPsiToStubCache |
25,831 | void (@NotNull PsiFileWithStubSupport file, @NotNull StubTree tree) { StubBuilder builder = file instanceof PsiFileImpl ? getStubBuilder(((PsiFileImpl)file)) : null; if (builder == null) return; final Iterator<StubElement<?>> stubs = tree.getPlainList().iterator(); final StubElement<?> root = stubs.next(); final ASTNode ast = file.getNode(); myNodeToStubs.put(ast, root); findTreeForStub(builder, ast, stubs); if (stubs.hasNext()) { LOG.error("Stub mismatch, unprocessed stubs " + stubs.next()); } } | fillTreeForStub |
25,832 | void (StubBuilder builder, ASTNode tree, final Iterator<StubElement<?>> stubs) { final IElementType type = tree.getElementType(); if (type instanceof IStubElementType && ((IStubElementType<?, ?>)type).shouldCreateStub(tree)) { if (!stubs.hasNext()) { LOG.error("Stub mismatch, " + type); } final StubElement<?> curStub = stubs.next(); myNodeToStubs.put(tree, curStub); } for (ASTNode node : tree.getChildren(null)) { if (!builder.skipChildProcessingWhenBuildingStubs(tree, node)) { findTreeForStub(builder, node, stubs); } } } | findTreeForStub |
25,833 | AnAction (JBSplitter splitter) { updateStubDetailsTreeView(PropertiesComponent.getInstance().getBoolean(PROPERTY_NAME, DEFAULT_SHOW_STUB_DETAILS), splitter); return new ToggleAction(DevPsiViewerBundle.message("action.show.stub.details.text"), null, AllIcons.Actions.PreviewDetails) { @Override public boolean isSelected(@NotNull AnActionEvent e) { return PropertiesComponent.getInstance().getBoolean(PROPERTY_NAME, DEFAULT_SHOW_STUB_DETAILS); } @Override public void setSelected(@NotNull AnActionEvent e, boolean state) { PropertiesComponent.getInstance().setValue(PROPERTY_NAME, state, DEFAULT_SHOW_STUB_DETAILS); updateStubDetailsTreeView(state, splitter); if (state) { valueChanged(myStubViewerTree.getSelectedStub()); } } @Override public @NotNull ActionUpdateThread getActionUpdateThread() { return ActionUpdateThread.BGT; } }; } | addComponent |
25,834 | boolean (@NotNull AnActionEvent e) { return PropertiesComponent.getInstance().getBoolean(PROPERTY_NAME, DEFAULT_SHOW_STUB_DETAILS); } | isSelected |
25,835 | void (@NotNull AnActionEvent e, boolean state) { PropertiesComponent.getInstance().setValue(PROPERTY_NAME, state, DEFAULT_SHOW_STUB_DETAILS); updateStubDetailsTreeView(state, splitter); if (state) { valueChanged(myStubViewerTree.getSelectedStub()); } } | setSelected |
25,836 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
25,837 | void (boolean isShown, JBSplitter splitter) { myStubDetailsTree.setEnabled(isShown); splitter.setSecondComponent(isShown ? ScrollPaneFactory.createScrollPane(myStubDetailsTree, true) : null); } | updateStubDetailsTreeView |
25,838 | void (@Nullable StubElement<?> stub) { if (myStubDetailsTree.isEnabled()) { Disposable treeModelDisposable = myStubViewerTree.myTreeModelDisposable; StructureTreeModel<?> model = new StructureTreeModel<>( new StubDetailsTreeStructure(stub), null, Invoker.forEventDispatchThread(treeModelDisposable), treeModelDisposable ); myStubDetailsTree.setModel(model); myStubDetailsTree.expandRow(0); myStubDetailsTree.treeDidChange(); } } | valueChanged |
25,839 | Object () { return myRoot; } | getRootElement |
25,840 | String () { return s; } | getName |
25,841 | StubTreeNode () { return myRoot; } | getRootElement |
25,842 | BlockTreeNode () { return myRoot; } | getRootElement |
25,843 | void (BlockTreeNode root) { myRoot = root; } | setRoot |
25,844 | Block () { return myBlock; } | getBlock |
25,845 | void (@NotNull PresentationData presentation) { String name = myBlock.getDebugName(); if (name == null) name = myBlock.getClass().getSimpleName(); if (myBlock instanceof DataLanguageBlockWrapper) { name += " (" + ((DataLanguageBlockWrapper)myBlock).getOriginal().getClass().getSimpleName() + ")"; } presentation.addText(name, SimpleTextAttributes.REGULAR_ATTRIBUTES); if (myBlock.getIndent() != null) { presentation.addText(" " + String.valueOf(myBlock.getIndent()).replaceAll("[<>]", " "), SimpleTextAttributes.GRAY_ATTRIBUTES); } if (myBlock.getAlignment() != null) { float d = 1.f * System.identityHashCode(myBlock.getAlignment()) / Integer.MAX_VALUE; Color color = new JBColor(Color.HSBtoRGB(d, .3f, .7f), Color.HSBtoRGB(d, .3f, .8f)); presentation .addText(" " + myBlock.getAlignment(), new SimpleTextAttributes(SimpleTextAttributes.STYLE_BOLD, color)); } if (myBlock.getWrap() != null) { presentation .addText(" " + myBlock.getWrap(), new SimpleTextAttributes(SimpleTextAttributes.STYLE_ITALIC, PlatformColors.BLUE)); } } | update |
25,846 | boolean () { return myBlock.isLeaf() && myBlock.getSubBlocks().isEmpty(); } | isAlwaysLeaf |
25,847 | void (@Nullable PsiElement rootRootElement, @NotNull String text) { resetBlockTree(); buildBlockTree(rootRootElement); } | reloadTree |
25,848 | void (@Nullable PsiElement element) { if (myTreeModel != null && element != null) { BlockTreeNode currentBlockNode = findBlockNode(element); if (currentBlockNode != null) { selectBlockNode(currentBlockNode); } } } | selectNodeFromPsi |
25,849 | JComponent () { return myBlockStructurePanel; } | getComponent |
25,850 | boolean () { return myBlockTree.isFocusOwner(); } | isFocusOwner |
25,851 | void () { IdeFocusManager.getInstance(myProject).requestFocus(myBlockTree, true); } | focusTree |
25,852 | void () { resetBlockTree(); } | dispose |
25,853 | void () { myBlockTree.removeAll(); if (myTreeModel != null) { Disposer.dispose(myTreeModelDisposable); myTreeModel = null; myTreeModelDisposable = Disposer.newDisposable(); } myPsiToBlockMap = null; ViewerPsiBasedTree.removeListenerOfClass(myBlockTree, BlockTreeSelectionListener.class); } | resetBlockTree |
25,854 | void (@Nullable PsiElement rootElement) { Block rootBlock = rootElement == null ? null : buildBlocks(rootElement); if (rootBlock == null) { myTreeModel = null; myBlockTree.setRootVisible(false); myBlockTree.setVisible(false); return; } myBlockTree.setVisible(true); BlockTreeStructure blockTreeStructure = new BlockTreeStructure(); BlockTreeNode rootNode = new BlockTreeNode(rootBlock, null); StructureTreeModel treeModel = new StructureTreeModel<>(blockTreeStructure, myTreeModelDisposable); initMap(rootNode, rootElement); assert myPsiToBlockMap != null; PsiElement rootPsi = rootNode.getBlock() instanceof ASTBlock ? ((ASTBlock)rootNode.getBlock()).getNode().getPsi() : rootElement; BlockTreeNode blockNode = myPsiToBlockMap.get(rootPsi); if (blockNode == null) { PsiViewerDialog.LOG.error("PsiViewer: rootNode not found\nCurrent language: " + rootElement.getContainingFile().getLanguage(), (Throwable)null, CoreAttachmentFactory.createAttachment(rootElement.getContainingFile().getOriginalFile().getVirtualFile())); blockNode = findBlockNode(rootPsi); } blockTreeStructure.setRoot(blockNode); myTreeModel = new AsyncTreeModel(treeModel, myTreeModelDisposable); myBlockTree.setModel(myTreeModel); myBlockTree.addTreeSelectionListener(new BlockTreeSelectionListener(rootElement)); myBlockTree.setRootVisible(true); myBlockTree.expandRow(0); treeModel.invalidateAsync(); } | buildBlockTree |
25,855 | BlockTreeNode (PsiElement element) { HashMap<PsiElement, BlockTreeNode> psiToBlockMap = myPsiToBlockMap; BlockTreeNode result = psiToBlockMap == null ? null : psiToBlockMap.get(element); if (result == null) { TextRange rangeInHostFile = InjectedLanguageManager.getInstance(myProject).injectedToHost(element, element.getTextRange()); result = findBlockNode(rangeInHostFile); } return result; } | findBlockNode |
25,856 | TreeVisitor (@NotNull BlockTreeNode currentBlockNode) { Function<Object, BlockTreeNode> converter = el -> el instanceof DefaultMutableTreeNode ? (BlockTreeNode)((DefaultMutableTreeNode)el).getUserObject() : null; Set<SimpleNode> parents = new HashSet<>(); SimpleNode parent = currentBlockNode.getParent(); while (parent != null) { parents.add(parent); parent = parent.getParent(); } DefaultMutableTreeNode root = getRoot(); if (root != null) { parents.add((SimpleNode)root.getUserObject()); } return new TreeVisitor.ByComponent<>(currentBlockNode, converter) { @Override protected boolean contains(@NotNull BlockTreeNode pathComponent, @NotNull BlockTreeNode thisComponent) { return parents.contains(pathComponent); } }; } | createVisitor |
25,857 | boolean (@NotNull BlockTreeNode pathComponent, @NotNull BlockTreeNode thisComponent) { return parents.contains(pathComponent); } | contains |
25,858 | void (@Nullable BlockTreeNode currentBlockNode) { if (myTreeModel == null) return; if (currentBlockNode != null) { TreeUtil.promiseSelect(myBlockTree, createVisitor(currentBlockNode)); } else { myBlockTree.getSelectionModel().clearSelection(); } } | selectBlockNode |
25,859 | void (@NotNull TreeSelectionEvent e) { if (myTreeModel == null) { return; } TreePath path = myBlockTree.getSelectionModel().getSelectionPath(); if (path == null) return; DefaultMutableTreeNode component = (DefaultMutableTreeNode)path.getLastPathComponent(); if (component == null) return; Object item = component.getUserObject(); if (!(item instanceof BlockTreeNode descriptor)) return; int blockStart = descriptor.getBlock().getTextRange().getStartOffset(); PsiFile file = myRootElement.getContainingFile(); PsiElement currentPsiEl = InjectedLanguageUtil.findElementAtNoCommit(file, blockStart); if (currentPsiEl == null) currentPsiEl = file; int blockLength = descriptor.getBlock().getTextRange().getLength(); while (currentPsiEl.getParent() != null && currentPsiEl.getTextRange().getStartOffset() == blockStart && currentPsiEl.getTextLength() != blockLength) { currentPsiEl = currentPsiEl.getParent(); } BlockTreeNode rootBlockNode = (BlockTreeNode)getRoot().getUserObject(); int baseOffset = 0; if (rootBlockNode != null) { baseOffset = rootBlockNode.getBlock().getTextRange().getStartOffset(); } TextRange range = descriptor.getBlock().getTextRange(); range = range.shiftRight(-baseOffset); myUpdater.updatePsiTree(currentPsiEl, myBlockTree.hasFocus() ? range : null); } | valueChanged |
25,860 | BlockTreeNode (TextRange range) { if (myTreeModel == null || !myBlockStructurePanel.isVisible()) { return null; } DefaultMutableTreeNode root = getRoot(); if (root == null) return null; BlockTreeNode node = (BlockTreeNode)root.getUserObject(); main_loop: while (true) { if (node.getBlock().getTextRange().equals(range)) { return node; } for (BlockTreeNode child : node.getChildren()) { if (child.getBlock().getTextRange().contains(range)) { node = child; continue main_loop; } } return node; } } | findBlockNode |
25,861 | Block (@NotNull PsiElement rootElement) { FormattingModelBuilder formattingModelBuilder = LanguageFormatting.INSTANCE.forContext(rootElement); CodeStyleSettings settings = CodeStyle.getSettings(rootElement.getContainingFile()); if (formattingModelBuilder != null) { FormattingModel formattingModel = formattingModelBuilder.createModel( FormattingContext.create(rootElement, settings)); return formattingModel.getRootBlock(); } else { return null; } } | buildBlocks |
25,862 | void (BlockTreeNode rootBlockNode, PsiElement psiEl) { myPsiToBlockMap = new HashMap<>(); JBTreeTraverser<BlockTreeNode> traverser = JBTreeTraverser.of(BlockTreeNode::getChildren); for (BlockTreeNode block : traverser.withRoot(rootBlockNode)) { PsiElement currentElem = null; if (block.getBlock() instanceof ASTBlock) { ASTNode node = ((ASTBlock)block.getBlock()).getNode(); if (node != null) { currentElem = node.getPsi(); } } if (currentElem == null) { currentElem = InjectedLanguageUtil .findElementAtNoCommit(psiEl.getContainingFile(), block.getBlock().getTextRange().getStartOffset()); } myPsiToBlockMap.put(currentElem, block); //nested PSI elements with same ranges will be mapped to one blockNode // assert currentElem != null; //for Scala-language plugin etc it can be null, because formatterBlocks is not instance of ASTBlock TextRange curTextRange = currentElem.getTextRange(); PsiElement parentElem = currentElem.getParent(); while (parentElem != null && parentElem.getTextRange().equals(curTextRange)) { myPsiToBlockMap.put(parentElem, block); parentElem = parentElem.getParent(); } } } | initMap |
25,863 | DefaultMutableTreeNode () { return (DefaultMutableTreeNode)myBlockTree.getModel().getRoot(); } | getRoot |
25,864 | PsiElementVisitor (@NotNull ProblemsHolder holder) { if (!RegistryManager.getInstance().is("groovy.good.code.is.red")) { return PsiElementVisitor.EMPTY_VISITOR; } GroovyFileBase file = (GroovyFileBase)holder.getFile(); Project project = holder.getProject(); GrAccessibilityChecker accessibilityChecker = new GrAccessibilityChecker(file, project); GroovyElementVisitor typeCheckVisitor = new GroovyStaticTypeCheckVisitorBase() { @Override protected void registerError(@NotNull PsiElement location, @NotNull @InspectionMessage String description, @NotNull LocalQuickFix @Nullable [] fixes, @NotNull ProblemHighlightType highlightType) { if (highlightType == ProblemHighlightType.GENERIC_ERROR) { holder.registerProblem(location, description); } } }; return new GroovyPsiElementVisitor(new GroovyElementVisitor() { @Override public void visitElement(@NotNull GroovyPsiElement element) { super.visitElement(element); element.accept(typeCheckVisitor); } @Override public void visitReferenceExpression(@NotNull GrReferenceExpression referenceExpression) { super.visitReferenceExpression(referenceExpression); HighlightInfo info = accessibilityChecker.checkReferenceExpression(referenceExpression); if (info != null) { registerProblem(holder, info, referenceExpression); } } @Override public void visitCodeReferenceElement(@NotNull GrCodeReferenceElement refElement) { super.visitCodeReferenceElement(refElement); HighlightInfo info = accessibilityChecker.checkCodeReferenceElement(refElement); if (info != null) { registerProblem(holder, info, refElement); } } private static void registerProblem(ProblemsHolder holder, HighlightInfo info, PsiElement e) { if (info.getSeverity() == HighlightSeverity.ERROR) { holder.registerProblem(e, info.getDescription()); } } }); } | createVisitor |
25,865 | void (@NotNull PsiElement location, @NotNull @InspectionMessage String description, @NotNull LocalQuickFix @Nullable [] fixes, @NotNull ProblemHighlightType highlightType) { if (highlightType == ProblemHighlightType.GENERIC_ERROR) { holder.registerProblem(location, description); } } | registerError |
25,866 | void (@NotNull GroovyPsiElement element) { super.visitElement(element); element.accept(typeCheckVisitor); } | visitElement |
25,867 | void (@NotNull GrReferenceExpression referenceExpression) { super.visitReferenceExpression(referenceExpression); HighlightInfo info = accessibilityChecker.checkReferenceExpression(referenceExpression); if (info != null) { registerProblem(holder, info, referenceExpression); } } | visitReferenceExpression |
25,868 | void (@NotNull GrCodeReferenceElement refElement) { super.visitCodeReferenceElement(refElement); HighlightInfo info = accessibilityChecker.checkCodeReferenceElement(refElement); if (info != null) { registerProblem(holder, info, refElement); } } | visitCodeReferenceElement |
25,869 | void (ProblemsHolder holder, HighlightInfo info, PsiElement e) { if (info.getSeverity() == HighlightSeverity.ERROR) { holder.registerProblem(e, info.getDescription()); } } | registerProblem |
25,870 | Activator () { return plugin; } | getDefault |
25,871 | ImageDescriptor (String path) { return imageDescriptorFromPlugin(PLUGIN_ID, path); } | getImageDescriptor |
25,872 | void (IAction action) { MessageDialog.openInformation( window.getShell(), "4 Plug-in", "Hello, Eclipse world"); } | run |
25,873 | void (IAction action, ISelection selection) { } | selectionChanged |
25,874 | void () { } | dispose |
25,875 | void (IWorkbenchWindow window) { this.window = window; } | init |
25,876 | void () { } | elibMethod |
25,877 | void () { } | elibMethod |
25,878 | void () { } | elibMethod |
25,879 | void () { } | elibMethod |
25,880 | void () { SourceOne one = new SourceOne(); SourceTwo two = new SourceTwo(); SourceThree three = new SourceThree(); SourceFour four = new SourceFour(); SourceFive five = new SourceFive(); SourceSix six = new SourceSix(); SourceSeven seven = new SourceSeven(); SourceEight eight = new SourceEight(); SourceNine nine = new SourceNine(); SourceAlpha alpha = new SourceAlpha(); } | context |
25,881 | void () { } | elibMethod |
25,882 | void () { } | elibMethod |
25,883 | void () { } | elibMethod |
25,884 | void () { } | elibMethod |
25,885 | void () { } | elibMethod |
25,886 | void () { SourceOne one = new SourceOne(); SourceTwo two = new SourceTwo(); SourceThree three = new SourceThree(); SourceFour four = new SourceFour(); SourceFive five = new SourceFive(); SourceSix six = new SourceSix(); SourceSeven seven = new SourceSeven(); SourceEight eight = new SourceEight(); SourceNine nine = new SourceNine(); SourceAlpha alpha = new SourceAlpha(); } | context |
25,887 | void () { } | elibMethod |
25,888 | String () { return PluginPathManager.getPluginHomePath("eclipse") + "/testData/import/settings/"; } | getTestDataPath |
25,889 | VirtualFile (@NotNull String filename) { Path path = Path.of(getTestDataPath(), filename); VirtualFile found = VfsUtil.findFile(path, false); if (found == null) fail("File '" + path + "' not found." ); return found; } | findTestInputFile |
25,890 | String (String path) { return path.isEmpty() ? myRootPath : (myRootPath + "/" + path); } | getPathRelativeToRoot |
25,891 | String (Element element) { final Element attributes = element.getChild(EclipseXml.ATTRIBUTES_TAG); if (attributes != null) { for (Element attributeElement : attributes.getChildren(EclipseXml.ATTRIBUTE_TAG)) { if (EclipseXml.DLL_LINK.equals(attributeElement.getAttributeValue(EclipseXml.NAME_ATTR))) { return attributeElement.getAttributeValue(EclipseXml.VALUE_ATTR); } } } return null; } | getNativeLibraryRoot |
25,892 | int (String srcPath) { return srcPath.startsWith("/") ? 1 : 0; } | srcVarStart |
25,893 | String (@NotNull String path) { return getPresentableName(path, null); } | getPresentableName |
25,894 | String (@NotNull String path, Set<? super String> names) { String pathComponent = getLastPathComponent(path); if (pathComponent != null && names != null && !names.add(pathComponent)) { return path; } else { return pathComponent == null ? path : pathComponent; } } | getPresentableName |
25,895 | String (final String path) { final int idx = path.lastIndexOf('/'); return idx < 0 || idx == path.length() - 1 ? null : path.substring(idx + 1); } | getLastPathComponent |
25,896 | String (@NotNull String var, String path) { return "$" + var + "$" + (path == null ? "" : "/" + path); } | getVariableRelatedPath |
25,897 | EPathVariable (String pathAttr, int varStart) { int slash = pathAttr.indexOf("/", varStart); if (slash > 0) { return new EPathVariable(pathAttr.substring(varStart, slash), pathAttr.substring(slash + 1)); } else { return new EPathVariable(pathAttr.substring(varStart), null); } } | createEPathVariable |
25,898 | String (ExpandMacroToPathMap pathMap, String path, int varStart) { EPathVariable var = createEPathVariable(path, varStart); return prepareValidUrlInsideJar(pathMap.substitute(pathToUrl(getVariableRelatedPath(var.myVariable, var.myRelatedPath)), SystemInfo.isFileSystemCaseSensitive)); } | eclipseVariabledPath2Url |
25,899 | String (String rootPath, final ExpandMacroToPathMap macroMap, final String path) { final EclipseProjectFinder.LinkedResource linkedResource = EclipseProjectFinder.findLinkedResource(rootPath, path); if (linkedResource != null) { if (linkedResource.containsPathVariable()) { final String toPathVariableFormat = getVariableRelatedPath(linkedResource.getVariableName(), linkedResource.getRelativeToVariablePath()); return macroMap.substitute(toPathVariableFormat, SystemInfo.isFileSystemCaseSensitive); } return linkedResource.getLocation(); } return null; } | expandLinkedResourcesPath |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.