Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
6,700
int () { return getTokenStart() + yylength(); }
getTokenEnd
6,701
void (CharSequence buffer, int start, int end, int initialState) { zzBuffer = buffer; zzCurrentPos = zzMarkedPos = zzStartRead = start; zzAtEOF = false; zzAtBOL = true; zzEndRead = end; yybegin(initialState); }
reset
6,702
int () { return zzLexicalState; }
yystate
6,703
void (int newState) { zzLexicalState = newState; }
yybegin
6,704
CharSequence () { return zzBuffer.subSequence(zzStartRead, zzMarkedPos); }
yytext
6,705
char (int pos) { return zzBuffer.charAt(zzStartRead+pos); }
yycharat
6,706
int () { return zzMarkedPos-zzStartRead; }
yylength
6,707
void (int errorCode) { String message; try { message = ZZ_ERROR_MSG[errorCode]; } catch (ArrayIndexOutOfBoundsException e) { message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } throw new Error(message); }
zzScanError
6,708
void (int number) { if ( number > yylength() ) zzScanError(ZZ_PUSHBACK_2BIG); zzMarkedPos -= number; }
yypushback
6,709
Status () { switch (myRealEvent.result.getStatus()) { case PASSED: return Status.PASSED; case PENDING: return Status.PENDING; case SKIPPED: return Status.SKIPPED; default: return Status.FAILED; } }
getResult
6,710
Long () { return myRealEvent.result.getDuration() != null ? myRealEvent.result.getDuration() / 1000000: 0; }
getDuration
6,711
String () { return myRealEvent.result.getErrorMessage(); }
getErrorMessage
6,712
boolean () { PickleEvent pickleEvent = getPickleEvent(myRealTestCase); return pickleEvent != null && pickleEvent.pickle.getLocations().size() > 1; }
isScenarioOutline
6,713
String () { return myRealTestCase.getUri(); }
getUri
6,714
int () { PickleEvent pickleEvent = getPickleEvent(myRealTestCase); if (pickleEvent != null) { return pickleEvent.pickle.getLocations().get(pickleEvent.pickle.getLocations().size() - 1).getLine(); } return 0; }
getScenarioOutlineLine
6,715
int () { return myRealTestCase.getLine(); }
getLine
6,716
String () { return myRealTestCase.getName(); }
getScenarioName
6,717
String () { if (myRealStep instanceof HookTestStep) { try { Field definitionMatchField = myRealStep.getClass().getSuperclass().getDeclaredField("stepDefinitionMatch"); definitionMatchField.setAccessible(true); Object definitionMatchFieldValue = definitionMatchField.get(myRealStep); Field hookDefinitionField = definitio...
getLocation
6,718
String () { String stepName; if (myRealStep instanceof HookTestStep) { stepName = "Hook: " + ((HookTestStep)myRealStep).getHookType().toString(); } else { stepName = getStepKeyword() + " " + ((PickleStepTestStep) myRealStep).getPickleStep().getText(); } return stepName; }
getStepName
6,719
String () { try { PickleStepTestStep pickleStep = (PickleStepTestStep) myRealStep; String location = pickleStep.getStepLocation(); if (location.startsWith("file://")) { location = location.substring("file://".length()); } else if (location.startsWith("file:")) { location = location.substring("file:".length()); } int la...
getStepKeyword
6,720
PickleEvent (TestCase testCase) { try { Field pickleEventField = testCase.getClass().getDeclaredField("pickleEvent"); pickleEventField.setAccessible(true); return (PickleEvent)pickleEventField.get(testCase); } catch (Exception ignored) { } return null; }
getPickleEvent
6,721
void (TestCaseStarted event) { CucumberJvm3SMFormatter.this.handleTestCaseStarted(new CucumberJvm3Adapter.CucumberJvmTestCase(event.testCase)); }
receive
6,722
void (TestCaseFinished event) { handleTestCaseFinished(new CucumberJvm3Adapter.CucumberJvmTestCase(event.testCase)); }
receive
6,723
void (TestRunFinished event) { CucumberJvm3SMFormatter.this.handleTestRunFinished(); }
receive
6,724
void (WriteEvent event) { CucumberJvm3SMFormatter.this.handleWriteEvent(new CucumberJvmWriteEvent(event.text)); }
receive
6,725
void (TestStepStarted event) { handleTestStepStarted(new CucumberJvm3Adapter.CucumberJvmTestStep(event.testStep)); }
receive
6,726
void (TestStepFinished event) { handleTestStepFinished(new CucumberJvm3Adapter.CucumberJvmTestStepFinishedEvent(event)); }
receive
6,727
void (TestSourceRead event) { CucumberJvm3SMFormatter.this.handleTestSourceRead(new CucumberJvmTestSourceReadEvent(event.uri, event.source)); }
receive
6,728
void (EventPublisher publisher) { publisher.registerHandlerFor(TestCaseStarted.class, this.testCaseStartedHandler); publisher.registerHandlerFor(TestCaseFinished.class, this.testCaseFinishedHandler); publisher.registerHandlerFor(TestStepStarted.class, this.testStepStartedHandler); publisher.registerHandlerFor(TestStepF...
setEventPublisher
6,729
boolean (@NotNull IndexedFile file) { return file.getFile().isInLocalFileSystem(); }
slowPathIfFileTypeHintUnsure
6,730
ThreeState (@NotNull FileType fileType) { if (fileType == HtmlFileType.INSTANCE) { return ThreeState.UNSURE; // check if a file is in local filesystem. } if (fileType instanceof LanguageFileType && ((LanguageFileType)fileType).getLanguage() instanceof TemplateLanguage) { return ThreeState.UNSURE; // check if a file is ...
acceptFileType
6,731
void (Map<String, Integer> result, PsiFile file) { if (file instanceof HtmlCompatibleFile) { new XmlRecursiveElementWalkingVisitor() { @Override public void visitXmlAttribute(@NotNull XmlAttribute attribute) { super.visitXmlAttribute(attribute); if ("id".equals(attribute.getName())) { String value = attribute.getValue(...
processPsiFile
6,732
void (@NotNull XmlAttribute attribute) { super.visitXmlAttribute(attribute); if ("id".equals(attribute.getName())) { String value = attribute.getValue(); XmlAttributeValue valueElement = attribute.getValueElement(); if (valueElement != null && StringUtil.isNotEmpty(value)) { result.put(value, valueElement.getTextRange(...
visitXmlAttribute
6,733
int () { return 3; }
getVersion
6,734
DataExternalizer<Integer> () { return new DataExternalizer<>() { @Override public void save(@NotNull DataOutput out, Integer value) throws IOException { DataInputOutputUtil.writeINT(out, value); } @Override public Integer read(@NotNull DataInput in) throws IOException { return DataInputOutputUtil.readINT(in); } }; }
getValueExternalizer
6,735
void (@NotNull Processor<? super String> processor, @NotNull GlobalSearchScope scope, @Nullable IdFilter filter) { FileBasedIndex.getInstance().processAllKeys(HtmlTagIdIndex.INDEX, (name) -> processor.process(name) && processor.process("#" + name), scope, filter); }
processNames
6,736
void (@NotNull String name, @NotNull Processor<? super NavigationItem> processor, @NotNull FindSymbolParameters parameters) { String idName = StringUtil.trimStart(name, "#"); FileBasedIndex.getInstance().processValues(HtmlTagIdIndex.INDEX, idName, null, (file, value) -> processor.process( new OffsetNavigationItem(param...
processElementsWithName
6,737
void (boolean requestFocus) { new OpenFileDescriptor(myProject, myFile, myValue).navigate(requestFocus); }
navigate
6,738
boolean () { return true; }
canNavigate
6,739
boolean () { return true; }
canNavigateToSource
6,740
String () { return myName; }
getName
6,741
ItemPresentation () { return new ItemPresentation() { @Override public String getPresentableText() { return myName; } @Override public @Nullable String getLocationString() { PsiFile psiFile = PsiManager.getInstance(myProject).findFile(myFile); return psiFile != null ? "(" + SymbolPresentationUtil.getFilePathPresentatio...
getPresentation
6,742
String () { return myName; }
getPresentableText
6,743
Icon (boolean unused) { return AllIcons.Xml.Html_id; }
getIcon
6,744
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; OffsetNavigationItem item = (OffsetNavigationItem)o; return myFile.equals(item.myFile) && myValue.equals(item.myValue); }
equals
6,745
int () { return Objects.hash(myFile, myValue); }
hashCode
6,746
boolean (final Editor editor, final PsiFile file) { return isInsideTag(editor, file, new String[] {TD, TH}); }
isActionAvailable
6,747
boolean (List<TableRow> table, int row, int column) { return row >= 0 && row < table.size() && column >= 0 && column < table.get(row).size(); }
isInsideTable
6,748
void (final @NotNull Project project, final @NotNull Editor editor, final PsiFile file, int[] direction) { PsiElement element = getCurrentPsiElement(editor, file); element = getParentWithName(element, new String[]{TD, TH}); assert element != null; PsiElement root = getTablePsiElement(element); if (root != null) { Pair<...
moveCaret
6,749
boolean (final Editor editor, final PsiFile file) { return isInsideTag(editor, file, new String[] {TD, TH}); }
isActionAvailable
6,750
void (final @NotNull Project project, List<TableRow> table, int columnNumber) { for (int i = 0; i < table.size(); i++) { TableRow row = table.get(i); if (row.isEmpty()) { XmlTag element = createTableCellXmlTag(project, row.insideHeader); row.rowTag.add(element); } else if (columnNumber < 0) { TableCell cell = null; for...
addColumnToTable
6,751
XmlTag (@NotNull final Project project, boolean inHeader) { final String filetext = "<root>" + (inHeader ? "<th></th>" : "<td></td>") + "</root"; final XmlFile xmlFile = (XmlFile)PsiFileFactory.getInstance(project).createFileFromText("dummy.xml", XMLLanguage.INSTANCE, filetext); XmlTag tag = xmlFile.getDocument().getRo...
createTableCellXmlTag
6,752
boolean (@NotNull Editor editor, PsiElement element) { if (element instanceof XmlTag && (TD.equals(StringUtil.toLowerCase(((XmlTag)element).getName())) || TH.equals( StringUtil.toLowerCase(((XmlTag)element).getName())))) { if ("<td></td>".equals(element.getText()) || "<th></th>".equals(element.getText())) { PsiElement ...
moveCaretToFirstEmptyCell
6,753
boolean (final Editor editor, final PsiFile file, String[] tagNames) { if (isHtmlTagContainingFile(editor, file)) { final int offset = editor.getCaretModel().getOffset(); PsiElement element = getParentWithName(file.findElementAt(offset), tagNames); return element != null; } return false; }
isInsideTag
6,754
int (XmlTag tag) { XmlAttribute[] attributes = tag.getAttributes(); for (XmlAttribute attribute : attributes) { if (COLSPAN.equals(attribute.getLocalName())) { try { return Integer.parseInt(attribute.getValue()); } catch (NumberFormatException e) { return 1; } } } return 1; }
getColumnsNumber
6,755
int (XmlTag tag) { XmlAttribute[] attributes = tag.getAttributes(); for (XmlAttribute attribute : attributes) { if (ROWSPAN.equals(attribute.getLocalName())) { try { return Integer.parseInt(attribute.getValue()); } catch (NumberFormatException e) { return 1; } } } return 1; }
getRowsNumber
6,756
void (PsiElement element, boolean isInsideHeader, List<? super Pair<Boolean, List<Integer>>> list, List<? super XmlTag> tags) { if (element instanceof XmlTag tag) { final String name = StringUtil.toLowerCase(tag.getLocalName()); if (THEAD.equals(name)) { isInsideHeader = true; } if (TD.equals(name) || TH.equals(name) |...
generateTableList
6,757
void (final @NotNull Editor editor, final PsiElement element) { editor.getCaretModel().moveToOffset(element.getTextOffset()); editor.getScrollingModel().scrollToCaret(ScrollType.MAKE_VISIBLE); }
moveCaretTo
6,758
boolean (final Editor editor, final PsiFile file) { if (editor == null || !(file instanceof XmlFile)) { return false; } final int offset = editor.getCaretModel().getOffset(); final PsiElement element = file.findElementAt(offset); return HtmlUtil.isHtmlTagContainingFile(element); }
isHtmlTagContainingFile
6,759
int (int currentColumn) { return cols + startColumn - currentColumn; }
getRemainingColumnsNumber
6,760
int (int currentRow) { return rows + startRow - currentRow; }
getRemainingRowsNumber
6,761
void (TableCell cell) { list.add(cell); }
add
6,762
TableCell (int index) { return list.get(index); }
get
6,763
int () { return list.size(); }
size
6,764
boolean () { return list.isEmpty(); }
isEmpty
6,765
String () { return "html"; }
getId
6,766
boolean (@NotNull VirtualFile file) { return HtmlUtil.isHtmlFile(file); }
acceptFile
6,767
void (@NotNull Consumer<? super FileType> fileTypeSink) { fileTypeSink.consume(HtmlFileType.INSTANCE); fileTypeSink.consume(XHtmlFileType.INSTANCE); }
registerFileTypesUsedForIndexing
6,768
FileIncludeInfo[] (XmlFile xmlFile) { return HtmlUtil.getIncludedPathsElements(xmlFile).stream() .filter(el -> el != null && !StringUtil.isEmptyOrSpaces(el.getValue())) .map(el -> new FileIncludeInfo(el.getValue())).toArray(FileIncludeInfo[]::new); }
getIncludeInfos
6,769
boolean (@NotNull Transferable t, @Nullable Editor editor) { if (editor == null) return false; final VirtualFile file = getDroppedFile(t); if (file == null) return false; final FileType type = file.getFileType(); return isImage(type) || isCSS(type) || isJS(type); }
canHandle
6,770
boolean (@NotNull Transferable t, @Nullable Editor editor, Project project) { assert editor != null; final Document document = editor.getDocument(); final PsiFile target = PsiDocumentManager.getInstance(project).getPsiFile(document); if (!(target instanceof HtmlFileImpl)) return false; final VirtualFile file = getDropp...
handleDrop
6,771
boolean (HtmlFileImpl target, VirtualFile droppedFile, Editor editor, String tagTemplate) { final String relativePath = getRelativePath(target, droppedFile); final String tagText = prepareTagText(target, tagTemplate, relativePath); final XmlDocument document = target.getDocument(); if (document == null || tagText == nu...
insertTagInHead
6,772
boolean (Editor editor, String tagTemplate, String relativePath, PsiElement parent) { for (PsiElement element : parent.getChildren()) { if (element instanceof XmlTag tag) { if (tagTemplate.startsWith("<" + tag.getName() + " ")) { final String attrName = HtmlUtil.SCRIPT_TAG_NAME.equals(tag.getName()) ? "src" : "href"; S...
checkIfPresent
6,773
LogicalPosition (Editor editor, XmlTag tag, String attrName) { final XmlAttributeValue element = tag.getAttribute(attrName).getValueElement(); return editor.offsetToLogicalPosition(element.getTextRange().getStartOffset() + element.getTextRange().getLength() / 2); }
getPosition
6,774
boolean (HtmlFileImpl target, VirtualFile droppedFile, Editor editor, String tagTemplate) { final String tagText = prepareTagText(target, tagTemplate, getRelativePath(target, droppedFile)); final int offset = editor.getCaretModel().getOffset(); PsiElement element = target.findElementAt(offset); if (element == null || t...
insertImageTag
6,775
String (HtmlFileImpl target, VirtualFile droppedFile) { final VirtualFile targetFile = target.getVirtualFile(); return FileUtil.getRelativePath(targetFile.getParent().getPath(), droppedFile.getPath(), '/'); }
getRelativePath
6,776
boolean (FileType type) { return type instanceof LanguageFileType && ((LanguageFileType)type).getLanguage().isKindOf(Language.findLanguageByID("JavaScript")); }
isJS
6,777
boolean (FileType type) { return type instanceof LanguageFileType && ((LanguageFileType)type).getLanguage().isKindOf(Language.findLanguageByID("CSS")); }
isCSS
6,778
boolean (FileType type) { return type == ImageFileTypeManager.getInstance().getImageFileType(); }
isImage
6,779
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
6,780
void (final @NotNull AnActionEvent e) { DataContext dataContext = e.getDataContext(); ActionGroup group = getGroup(); ListPopup popup = JBPopupFactory.getInstance() .createActionGroupPopup(HtmlToolsBundle.message("html.action.open_in.list.popup.title"), group, dataContext, JBPopupFactory.ActionSelectionAid.MNEMONICS, f...
actionPerformed
6,781
void (@NotNull AnActionEvent event) { Presentation presentation = event.getPresentation(); AnAction onlyAction = ActionGroupUtil.getSingleActiveAction(getGroup(), event); presentation.setText(onlyAction != null ? HtmlToolsBundle.message("html.action.open_in.list.prefix") + " " + onlyAction.getTemplatePresentation().get...
update
6,782
ActionGroup () { return (ActionGroup)ActionManager.getInstance().getAction("OpenInBrowserEditorContextBarGroupAction"); }
getGroup
6,783
void (@NotNull PsiElement element) { super.visitElement(element); if (!(element instanceof XmlAttributeValue)) { return; } final WebReference webReference = lookForWebReference(element); if (webReference != null) { result.add(webReference); } }
visitElement
6,784
HighlightDisplayLevel (@NotNull PsiElement context) { final InspectionProfile inspectionProfile = InspectionProjectProfileManager.getInstance(context.getProject()).getCurrentProfile(); final HighlightDisplayKey displayKey = HighlightDisplayKey.find(HtmlNonExistentInternetResourceInspection.SHORT_NAME); return inspectio...
getHighlightDisplayLevel
6,785
String (@NotNull String url) { return HtmlToolsBundle.message("html.inspections.non.existent.internet.resource.message", url); }
getErrorMessage
6,786
String () { return HtmlToolsBundle.message("html.intention.disable.validation.web.links"); }
getText
6,787
String () { return getText(); }
getFamilyName
6,788
boolean (@NotNull Project project, Editor editor, PsiFile file) { return true; }
isAvailable
6,789
boolean () { return myDisableInspectionToolAction.startInWriteAction(); }
startInWriteAction
6,790
String () { return HtmlToolsBundle.message("html.intention.create.sub.element.text", myName); }
getText
6,791
String () { return HtmlToolsBundle.message("html.intention.create.sub.element.family", myName); }
getFamilyName
6,792
void (@NotNull Project project, @NotNull PsiFile file, @Nullable Editor editor, @NotNull PsiElement startElement, @NotNull PsiElement endElement) { XmlTag tag = ((XmlTag)startElement); XmlTag title = tag.createChildTag(myName, tag.getNamespace(), "", false); XmlTag createdTag = tag.addSubTag(title, false); //Fix all su...
invoke
6,793
String () { return "HtmlPresentationalElement"; }
getShortName
6,794
void (final @NotNull XmlTag tag, final @NotNull ProblemsHolder holder, final boolean isOnTheFly) { final String name = StringUtil.toLowerCase(tag.getName()); if (HtmlUtil.isHtmlTagContainingFile(tag)) { if (HtmlUtil.isHtml5Context(tag) && !ourHtmlReplaceableTagsHtml5.contains(tag.getName())) { return; } LocalQuickFix[]...
checkTag
6,795
void (@NotNull XmlTag tag, @NotNull String message, @NotNull ProblemsHolder holder, LocalQuickFix[] fixes, @NotNull ProblemHighlightType type) { if (fixes == null) { return; } final PsiElement startTagNameElement = XmlTagUtil.getStartTagNameElement(tag); String description = GlobalInspectionUtil.createInspectionMessage...
registerTag
6,796
void (final @NotNull XmlTag tag, final @NotNull ProblemsHolder holder, final boolean isOnTheFly) { if (HtmlUtil.isHtmlTagContainingFile(tag)) { XmlElementDescriptor descriptor = tag.getDescriptor(); if (!(descriptor instanceof HtmlElementDescriptorImpl) || !((HtmlElementDescriptorImpl)descriptor).isDeprecated()) { retu...
checkTag
6,797
CachedValue<HtmlLabelsHolder> (final XmlFile file, final Object p) { return CachedValuesManager.getManager(file.getProject()).createCachedValue(() -> { final HtmlLabelsHolder holder = new HtmlLabelsHolder(); final Language language = file.getViewProvider().getBaseLanguage(); final PsiFile psiFile = file.getViewProvider...
compute
6,798
HtmlLabelsHolder (final XmlFile file) { return CACHE.get(htmlLabelsHolderKey, file, null).getValue(); }
getInstance
6,799
void (@NotNull String forValue) { myForValuesOfLabels.add(forValue); }
registerForValue