Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
50,300 | void (TransformerException exception, String type) { final String message = getMessage(exception); if (!myMessages.contains(message)) { System.err.println("[" + type + "]: " + message); myMessages.add(message); } } | handleException |
50,301 | String (TransformerException exception) { final SourceLocator[] locators = new SourceLocator[]{ exception.getLocator() }; final String[] messages = new String[1]; findLocator(exception, locators, messages); final SourceLocator locator = locators[0]; if (locator != null) { final String systemId = locator.getSystemId(); ... | getMessage |
50,302 | void (Throwable exception, SourceLocator[] locators, String[] messages) { if (exception instanceof TransformerException) { final TransformerException t = (TransformerException)exception; if (t.getLocator() != null) { messages[0] = t.getMessage(); locators[0] = t.getLocator(); } else if (exception.getCause() != null) { ... | findLocator |
50,303 | int () { return sae.getColumnNumber(); } | getColumnNumber |
50,304 | int () { return sae.getLineNumber(); } | getLineNumber |
50,305 | String () { return null; } | getPublicId |
50,306 | String () { return sae.getSystemId(); } | getSystemId |
50,307 | String () { return XPathBundle.message("configurable.XPathConfigurable.display.name"); } | getDisplayName |
50,308 | String () { return "xpath.settings"; } | getHelpTopic |
50,309 | String () { return getHelpTopic(); } | getId |
50,310 | JComponent () { configUI = new ConfigUI(XPathAppComponent.getInstance().getConfig()); return configUI; } | createComponent |
50,311 | boolean () { return scrollToFirst; } | isScrollToFirst |
50,312 | TextAttributes () { return attributes; } | getAttributes |
50,313 | TextAttributes () { return contextAttributes; } | getContextAttributes |
50,314 | void (boolean b) { scrollToFirst = b; } | setScrollToFirst |
50,315 | boolean () { return bUseContextAtCursor; } | isUseContextAtCursor |
50,316 | void (boolean b) { bUseContextAtCursor = b; } | setUseContextAtCursor |
50,317 | boolean () { return bHighlightStartTagOnly; } | isHighlightStartTagOnly |
50,318 | void (boolean b) { bHighlightStartTagOnly = b; } | setHighlightStartTagOnly |
50,319 | boolean () { return bAddErrorStripe; } | isAddErrorStripe |
50,320 | void (boolean b) { bAddErrorStripe = b; } | setAddErrorStripe |
50,321 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final Config config = (Config)o; if (HIGHLIGHT_RESULTS != config.HIGHLIGHT_RESULTS) return false; if (OPEN_NEW_TAB != config.OPEN_NEW_TAB) return false; if (SHOW_USAGE_VIEW != config.SHOW_USAGE_VIEW) return false... | equals |
50,322 | int () { int result = (OPEN_NEW_TAB ? 1 : 0); result = 29 * result + (HIGHLIGHT_RESULTS ? 1 : 0); result = 29 * result + (SHOW_USAGE_VIEW ? 1 : 0); result = 29 * result + attributes.hashCode(); result = 29 * result + contextAttributes.hashCode(); result = 29 * result + (scrollToFirst ? 1 : 0); result = 29 * result + (b... | hashCode |
50,323 | Config () { return configuration; } | getState |
50,324 | void (@NotNull Config state) { configuration = state; } | loadState |
50,325 | Config () { return configuration; } | getConfig |
50,326 | void (@NotNull Config configuration) { this.configuration = configuration; } | setConfig |
50,327 | XPathAppComponent () { return ApplicationManager.getApplication().getService(XPathAppComponent.class); } | getInstance |
50,328 | void (@NotNull Editor editor, @Nullable Caret caret, DataContext dataContext) { if (HighlighterUtil.hasHighlighters(editor)) { final int offset = editor.getCaretModel().getOffset(); final List<RangeHighlighter> hl = HighlighterUtil.getHighlighters(editor); int diff = Integer.MAX_VALUE; RangeHighlighter next = null; for... | doExecute |
50,329 | void (final @NlsContexts.HintText String info, final Editor editor) { final JLabel label = new JLabel(info); label.setBorder(BorderFactory.createCompoundBorder( BorderFactory.createBevelBorder(BevelBorder.RAISED, JBColor.WHITE, Gray._128), BorderFactory.createEmptyBorder(3, 5, 3, 5))); label.setForeground(JBColor.foreg... | showEditorHint |
50,330 | void (AnActionEvent event) { super.updateToolbar(event); event.getPresentation().setIcon(XpathIcons.Xml); } | updateToolbar |
50,331 | boolean (XmlFile xmlFile, int offset) { return true; } | isEnabledAt |
50,332 | void (@NotNull AnActionEvent event) { final Project project = event.getProject(); if (project == null) { // no active project LOG.debug("No project"); return; } Editor editor = event.getData(CommonDataKeys.EDITOR); if (editor == null) { FileEditorManager fem = FileEditorManager.getInstance(project); editor = fem.getSel... | actionPerformed |
50,333 | void (Editor editor) { final Project project = editor.getProject(); final PsiFile psiFile = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument()); if (psiFile == null) { return; } InputExpressionDialog.Context input; XmlElement contextNode = null; final Config cfg = XPathAppComponent.getInstance().ge... | execute |
50,334 | boolean (EvalExpressionDialog.Context context, XmlElement contextNode, Editor editor, Config cfg) { final Project project = editor.getProject(); try { final XPathSupport support = XPathSupport.getInstance(); final XPath xpath = support.createXPath((XmlFile)contextNode.getContainingFile(), context.input.expression, cont... | evaluateExpression |
50,335 | void (final Editor editor, final XPath xPath, final XmlElement contextNode, final List<?> result) { final Project project = editor.getProject(); //noinspection unchecked final List<?> _result = new ArrayList(result); final Factory<UsageSearcher> searcherFactory = () -> new MyUsageSearcher(_result, xPath, contextNode); ... | showUsageView |
50,336 | void () { XPathEvalAction.this.execute(editor); } | execute |
50,337 | void (@NotNull final Project project, MyUsageTarget usageTarget, Factory<UsageSearcher> searcherFactory, final EditExpressionAction editAction) { final UsageViewPresentation presentation = new UsageViewPresentation(); presentation.setTargetsNodeText(XPathBundle.message("list.item.xpath.expression")); presentation.setCo... | showUsageView |
50,338 | void (@NotNull UsageView usageView) { usageView.addButtonToLowerPane(editAction, XPathBundle.message("button.edit.expression.with.mnemonic")); } | usageViewCreated |
50,339 | void (UsageView usageView) { } | findingUsagesFinished |
50,340 | void (XmlElement contextNode, @NotNull final Editor editor, final List<?> list) { final Config cfg = XPathAppComponent.getInstance().getConfig(); int lowestOffset = Integer.MAX_VALUE; for (final Object o : list) { LOG.assertTrue(o != null, "null element?"); if (o instanceof PsiElement element) { if (element.getContaini... | highlightResult |
50,341 | int (Editor editor, PsiElement element, Config cfg, int offset) { final RangeHighlighter highlighter = HighlighterUtil.highlightNode(editor, element, cfg.getAttributes(), cfg); HighlighterUtil.addHighlighter(editor, highlighter); return Math.min(highlighter.getStartOffset(), offset); } | highlightElement |
50,342 | void () { throw new IllegalArgumentException(); } | findUsages |
50,343 | boolean () { // re-run will become unavailable if the context node is invalid return myContextNode == null || myContextNode.isValid(); } | isValid |
50,344 | String () { return "Expression"; } | getName |
50,345 | ItemPresentation () { return myItemPresentation; } | getPresentation |
50,346 | void (@NotNull final Processor<? super Usage> processor) { Runnable runnable = () -> { final List<?> list; if (myResult.isEmpty()) { try { list = (List<?>)myXPath.selectNodes(myContextNode); } catch (JaxenException e) { LOG.debug(e); Messages.showMessageDialog(myContextNode.getProject(), e.getMessage(), XPathBundle.mes... | generate |
50,347 | void () { execute(); } | run |
50,348 | String (XmlElement element, XmlTag context) { final PathVisitor visitor = new PathVisitor(context); element.accept(visitor); return visitor.getUniquePath(); } | getUniquePath |
50,349 | String (XmlElement element, XmlTag context) { final PathVisitor visitor = new PathVisitor(context); element.accept(visitor); return visitor.getPath(); } | getPath |
50,350 | PsiElement (PsiElement contextNode) { PsiElement element = contextNode; while (element != null) { if (MyPsiUtil.isNameElement(element)) { return element.getParent(); } else if (MyPsiUtil.isStartTag(contextNode) || MyPsiUtil.isEndTag(contextNode)) { return element.getParent(); } else if (element instanceof XmlAttribute)... | transformToValidShowPathNode |
50,351 | String (XmlTag tag) { return tag.getName(); } | getXPathNameStep |
50,352 | void (@NotNull PsiElement element) { if (element instanceof XmlProcessingInstruction) { visitProcessingInstruction(((XmlProcessingInstruction)element)); } else { super.visitElement(element); } } | visitElement |
50,353 | void (@NotNull XmlAttribute attribute) { uniquePath = getUniquePath(attribute); path = getPath(attribute); } | visitXmlAttribute |
50,354 | String (XmlAttribute attribute) { StringBuilder result = new StringBuilder(); XmlTag parent = attribute.getParent(); if ((parent != null) && (parent != context)) { result.append(getPath(parent)); result.append("/"); } result.append("@"); String uri = attribute.getNamespace(); String prefix = MyPsiUtil.getAttributePrefi... | getPath |
50,355 | String (XmlAttribute attribute) { StringBuilder result = new StringBuilder(); XmlTag parent = attribute.getParent(); if ((parent != null) && (parent != context)) { result.append(getUniquePath(parent)); result.append("/"); } result.append("@"); String uri = attribute.getNamespace(); String prefix = MyPsiUtil.getAttribut... | getUniquePath |
50,356 | void (@NotNull XmlTag tag) { uniquePath = getUniquePath(tag); path = getPath(tag); } | visitXmlTag |
50,357 | String (XmlTag tag) { XmlTag parent = tag.getParentTag(); if (parent == null) { return "/" + getXPathNameStep(tag); } final StringBuilder buffer = new StringBuilder(); if (parent != context) { buffer.append(getUniquePath(parent)); buffer.append("/"); } buffer.append(getXPathNameStep(tag)); return makeUnique(buffer.toSt... | getUniquePath |
50,358 | String (XmlTag tag) { if (tag == context) { return "."; } XmlTag parent = tag.getParentTag(); if (parent == null) { return "/" + getXPathNameStep(tag); } else if (parent == context) { return getXPathNameStep(tag); } return getPath(parent) + "/" + getXPathNameStep(tag); } | getPath |
50,359 | void (@NotNull XmlComment comment) { uniquePath = getUniquePath(comment); path = getPath(comment); } | visitXmlComment |
50,360 | String (XmlComment comment) { XmlTag parent = PsiTreeUtil.getParentOfType(comment, XmlTag.class); return ((parent != null) && (parent != context)) ? (getPath(parent) + "/comment()") : "comment()"; } | getPath |
50,361 | String (XmlComment comment) { XmlTag parent = PsiTreeUtil.getParentOfType(comment, XmlTag.class); return makeUnique(((parent != null) && (parent != context)) ? (getUniquePath(parent) + "/comment()") : "comment()", comment); } | getUniquePath |
50,362 | void (@NotNull XmlText text) { uniquePath = getUniquePath(text); path = getPath(text); } | visitXmlText |
50,363 | String (XmlText text) { XmlTag parent = PsiTreeUtil.getParentOfType(text, XmlTag.class); return ((parent != null) && (parent != context)) ? (getPath(parent) + "/text()") : "text()"; } | getPath |
50,364 | String (XmlText text) { XmlTag parent = PsiTreeUtil.getParentOfType(text, XmlTag.class); return makeUnique(((parent != null) && (parent != context)) ? (getUniquePath(parent) + "/text()") : "text()", text); } | getUniquePath |
50,365 | void (XmlProcessingInstruction processingInstruction) { uniquePath = getUniquePath(processingInstruction); path = getPath(processingInstruction); } | visitProcessingInstruction |
50,366 | String (XmlProcessingInstruction processingInstruction) { XmlTag parent = processingInstruction.getParentTag(); return ((parent != null) && (parent != context)) ? (getPath(parent) + "/processing-instruction()") : "processing-instruction()"; } | getPath |
50,367 | String (XmlProcessingInstruction processingInstruction) { XmlTag parent = processingInstruction.getParentTag(); final String target = PsiDocumentNavigator.getProcessingInstructionTarget(processingInstruction); final String s = "'" + target + "'"; return makeUnique(((parent != null) && (parent != context)) ? (getUniqueP... | getUniquePath |
50,368 | String () { return uniquePath; } | getUniquePath |
50,369 | String () { return path; } | getPath |
50,370 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final HistoryElement that = (HistoryElement)o; return !(expression != null ? !expression.equals(that.expression) : that.expression != null); } | equals |
50,371 | int () { return (expression != null ? expression.hashCode() : 0); } | hashCode |
50,372 | HistoryElement () { return new HistoryElement(expression, Copyable.Util.copy(this.variables), Copyable.Util.copy(namespaces)); } | copy |
50,373 | HistoryElement (Collection<Namespace> namespaces, Collection<Variable> variables) { return new HistoryElement(expression, variables, namespaces); } | changeContext |
50,374 | HistoryElement (String expression) { return new HistoryElement(expression, variables, namespaces); } | changeExpression |
50,375 | String () { return expression; } | toString |
50,376 | void (@NotNull Element state) { readHistory(state, HISTORY, history); readHistory(state, FIND_HISTORY, findHistory); } | loadState |
50,377 | void (Element element, String s, LinkedHashMap<String, HistoryElement> hst) { final Element historyElement = element.getChild(s); if (historyElement != null) { final List<Element> entries = historyElement.getChildren(HISTORY_ELEMENT); for (final Element entry : entries) { final String expression = entry.getAttributeVal... | readHistory |
50,378 | Element () { Element element = new Element("xpathview"); writeHistory(element, HISTORY, history); writeHistory(element, FIND_HISTORY, findHistory); return element; } | getState |
50,379 | void (Element element, String s, LinkedHashMap<String, HistoryElement> hst) { final Element historyElement = new Element(s); element.addContent(historyElement); for (String key : hst.keySet()) { final Element entryElement = new Element(HISTORY_ELEMENT); entryElement.setAttribute(EXPRESSION, key); historyElement.addCont... | writeHistory |
50,380 | void (HistoryElement element) { String expression = element.expression; history.remove(expression); history.put(expression, element); } | addHistory |
50,381 | void (HistoryElement element) { String expression = element.expression; findHistory.remove(expression); findHistory.put(expression, element); } | addFindHistory |
50,382 | HistoryElement[] () { return history.values().toArray(new HistoryElement[0]); } | getHistory |
50,383 | HistoryElement[] () { return findHistory.values().toArray(new HistoryElement[0]); } | getFindHistory |
50,384 | XPathProjectComponent (Project project) { return project.getService(XPathProjectComponent.class); } | getInstance |
50,385 | void (@NotNull AnActionEvent event) { super.update(event); final Presentation presentation = event.getPresentation(); String presentationText = presentation.getText(); if (presentationText != null && ActionPlaces.isMainMenuOrActionSearch(event.getPlace()) && presentationText.startsWith("Show ")) { final String text = p... | update |
50,386 | boolean (XmlFile xmlFile, int offset) { final PsiElement element = xmlFile.findElementAt(offset); if (!(element instanceof XmlElement || element instanceof PsiWhiteSpace)) { return false; } final PsiElement node = XPathExpressionGenerator.transformToValidShowPathNode(element); return node != null; } | isEnabledAt |
50,387 | void (@NotNull AnActionEvent e) { final Editor editor = e.getData(CommonDataKeys.EDITOR); if (editor == null) { return; } final Project project = editor.getProject(); if (project == null) { return; } final PsiDocumentManager docmgr = PsiDocumentManager.getInstance(project); final Document document = editor.getDocument(... | actionPerformed |
50,388 | void (ActionEvent e) { CopyPasteManager.getInstance().setContents(new StringSelection(path)); Balloon balloon = JBPopupFactory.getInstance().getParentBalloonFor(p); if (balloon != null) { balloon.hide(true); } } | actionPerformed |
50,389 | void () { super.hide(); HighlighterUtil.removeHighlighter(editor, h); } | hide |
50,390 | boolean (TooltipEvent event) { InputEvent inputEvent = event.getInputEvent(); return ((inputEvent instanceof MouseEvent)) && ((MouseEvent)inputEvent).getButton() != 0; } | canAutoHideOn |
50,391 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
50,392 | void (@NotNull AnActionEvent event) { final Presentation presentation = event.getPresentation(); // keep track of enabled status presentation.setEnabled(isEnabled(event, true)); // provide icon for toolbar if (ActionPlaces.MAIN_TOOLBAR.equals(event.getPlace())) { updateToolbar(event); } else if (ActionPlaces.isMainMenu... | update |
50,393 | void (AnActionEvent event) { event.getPresentation().setVisible(isEnabled(event, false)); } | updateMainMenu |
50,394 | void (AnActionEvent event) { event.getPresentation().setVisible(true); } | updateToolbar |
50,395 | boolean (AnActionEvent event, boolean checkAvailable) { final Project project = event.getProject(); if (project == null) { // no active project return false; } Editor editor = event.getData(CommonDataKeys.EDITOR); if (editor == null) { return false; } // do we have an xml file? final PsiDocumentManager cem = PsiDocumen... | isEnabled |
50,396 | String () { return myName != null ? myName : ""; } | getName |
50,397 | Variable () { try { return (Variable)clone(); } catch (CloneNotSupportedException e) { throw new Error(); } } | copy |
50,398 | String () { return myExpression != null ? myExpression : ""; } | getExpression |
50,399 | void (String s) { myName = s; } | setName |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.