Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
289,400 | void () { CONTRIBUTING_REFERENCES.assertPassNotRunning(); } | assertNotContributingReferences |
289,401 | AccessToken () { return CONTRIBUTING_REFERENCES.suppressAssertInPass(); } | suppressAssertNotContributingReferences |
289,402 | IndentHelper () { return ApplicationManager.getApplication().getService(IndentHelper.class); } | getInstance |
289,403 | int (Project project, FileType fileType, ASTNode element, boolean includeNonSpace) { return getIndent(getFile(element), element, includeNonSpace); } | getIndent |
289,404 | PsiFile (ASTNode element) { return element.getPsi().getContainingFile(); } | getFile |
289,405 | void (@NotNull ClassLoader loader, @NotNull PluginDescriptor pluginDescriptor) { for (int i = 0; i < ourRegistry.length; i++) { IElementType type = ourRegistry[i]; if (type != null && type.getClass().getClassLoader() == loader) { ourRegistry[i] = TombstoneElementType.create(type, pluginDescriptor); } } } | unregisterElementTypes |
289,406 | void (@NotNull Language language, @NotNull PluginDescriptor pluginDescriptor) { if (language == Language.ANY) { throw new IllegalArgumentException("Trying to unregister Language.ANY"); } for (int i = 0; i < ourRegistry.length; i++) { IElementType type = ourRegistry[i]; if (type != null && type.getLanguage().equals(language)) { ourRegistry[i] = TombstoneElementType.create(type, pluginDescriptor); } } } | unregisterElementTypes |
289,407 | Language () { return myLanguage; } | getLanguage |
289,408 | short () { return myIndex; } | getIndex |
289,409 | int () { return myIndex >= 0 ? myIndex : super.hashCode(); } | hashCode |
289,410 | String () { return getDebugName(); } | toString |
289,411 | boolean () { return false; } | isLeftBound |
289,412 | IElementType (short idx) { // volatile read; array always grows, never shrinks, never overwritten IElementType type = ourRegistry[idx]; if (type instanceof TombstoneElementType) { throw new IllegalArgumentException("Trying to access element type from unloaded plugin: " + type); } return type; } | find |
289,413 | short () { synchronized (lock) { return size; } } | getAllocatedTypesCount |
289,414 | TombstoneElementType (@NotNull IElementType type, @NotNull PluginDescriptor pluginDescriptor) { return new TombstoneElementType("tombstone of " + type +" ("+type.getClass()+") belonged to unloaded "+pluginDescriptor); } | create |
289,415 | ASTNode (@NotNull ASTNode chameleon) { PsiElement parentElement = chameleon.getTreeParent().getPsi(); assert parentElement != null : "parent psi is null: " + chameleon; return doParseContents(chameleon, parentElement); } | parseContents |
289,416 | ASTNode (@NotNull ASTNode chameleon, @NotNull PsiElement psi) { Project project = psi.getProject(); Language languageForParser = getLanguageForParser(psi); PsiBuilder builder = PsiBuilderFactory.getInstance().createBuilder(project, chameleon, null, languageForParser, chameleon.getChars()); PsiParser parser = LanguageParserDefinitions.INSTANCE.forLanguage(languageForParser).createParser(project); long startTime = System.nanoTime(); ASTNode node = parser.parse(this, builder); ParsingDiagnostics.registerParse(builder, languageForParser, System.nanoTime() - startTime); return node.getFirstChildNode(); } | doParseContents |
289,417 | Language (@NotNull PsiElement psi) { return getLanguage(); } | getLanguageForParser |
289,418 | ASTNode (CharSequence text) { return null; } | createNode |
289,419 | List<CustomLanguageASTComparator> (@NotNull PsiFile file) { return EXTENSION_POINT_NAME.allForLanguage(file.getLanguage()); } | getMatchingComparators |
289,420 | boolean (@NotNull IElementType source, @NotNull TokenSet tokenSet) { if (tokenSet.contains(source)) { return true; } if (source instanceof ParentProviderElementType) { Set<IElementType> parents = ((ParentProviderElementType)source).getParents(); return ContainerUtil.exists(parents, parent -> parent != null && containsWithSourceParent(parent, tokenSet)); } return false; } | containsWithSourceParent |
289,421 | boolean (@Nullable IElementType iElementType) { if (iElementType == null) { return false; } return ParentProviderElementType.containsWithSourceParent(iElementType, myTokenSet); } | contains |
289,422 | ParentAwareTokenSet (@NotNull TokenSet set) { return new ParentAwareTokenSet(set); } | create |
289,423 | ParentAwareTokenSet (@NotNull Set<IElementType> set) { return new ParentAwareTokenSet(TokenSet.create(set.toArray(IElementType.EMPTY_ARRAY))); } | create |
289,424 | ParentAwareTokenSet (ParentAwareTokenSet... sets) { TokenSet tokenSet = TokenSet.orSet(Arrays.stream(sets).map(t -> t.myTokenSet).toArray(TokenSet[]::new)); return new ParentAwareTokenSet(tokenSet); } | orSet |
289,425 | ParentAwareTokenSet (IElementType... set) { TokenSet tokenSet = TokenSet.create(set); return new ParentAwareTokenSet(tokenSet); } | create |
289,426 | boolean (@NotNull CharSequence buffer, @NotNull Language fileLanguage, @NotNull Project project) { return false; } | isParsable |
289,427 | boolean (@Nullable ASTNode parent, @NotNull CharSequence buffer, @NotNull Language fileLanguage, @NotNull Project project) { return isParsable(buffer, fileLanguage, project); } | isParsable |
289,428 | boolean (int index) { final int wordIndex = (index >> 6) - myShift; return wordIndex >= 0 && wordIndex < myWords.length && (myWords[wordIndex] & (1L << index)) != 0; } | get |
289,429 | boolean (@Nullable IElementType t) { if (t == null) return false; final short i = t.getIndex(); return 0 <= i && i <= myMax && get(i) || myOrCondition != null && myOrCondition.matches(t); } | contains |
289,430 | String () { return Arrays.toString(getTypes()); } | toString |
289,431 | TokenSet (IElementType @NotNull ... types) { if (types.length == 0) return EMPTY; if (types.length == 1 && types[0] == TokenType.WHITE_SPACE) { return WHITE_SPACE; } return doCreate(types); } | create |
289,432 | TokenSet (IElementType @NotNull ... types) { short min = Short.MAX_VALUE; short max = 0; for (IElementType type : types) { if (type != null) { final short index = type.getIndex(); assert index >= 0 : "Unregistered elements are not allowed here: " + objectInfo(type); if (min > index) min = index; if (max < index) max = index; } } short shift = (short)(min >> 6); TokenSet set = new TokenSet(shift, max, null); for (IElementType type : types) { if (type != null) { final short index = type.getIndex(); final int wordIndex = (index >> 6) - shift; set.myWords[wordIndex] |= 1L << index; } } return set; } | doCreate |
289,433 | TokenSet (@NotNull IElementType.Predicate condition) { return new TokenSet(Short.MAX_VALUE, (short)0, condition); } | forAllMatching |
289,434 | TokenSet (TokenSet @NotNull ... sets) { if (sets.length == 0) return EMPTY; List<IElementType.Predicate> orConditions = new ArrayList<>(); ContainerUtil.addIfNotNull(orConditions, sets[0].myOrCondition); short shift = sets[0].myShift; short max = sets[0].myMax; for (int i = 1; i < sets.length; i++) { if (shift > sets[i].myShift) shift = sets[i].myShift; if (max < sets[i].myMax) max = sets[i].myMax; ContainerUtil.addIfNotNull(orConditions, sets[i].myOrCondition); } IElementType.Predicate disjunction = orConditions.isEmpty() ? null : orConditions.size() == 1 ? orConditions.get(0) : new OrPredicate(orConditions); TokenSet newSet = new TokenSet(shift, max, disjunction); for (TokenSet set : sets) { final int shiftDiff = set.myShift - newSet.myShift; for (int i = 0; i < set.myWords.length; i++) { newSet.myWords[i + shiftDiff] |= set.myWords[i]; } } return newSet; } | orSet |
289,435 | TokenSet (@NotNull TokenSet a, @NotNull TokenSet b) { List<IElementType.Predicate> orConditions = new ArrayList<>(); ContainerUtil.addIfNotNull(orConditions, a.myOrCondition); ContainerUtil.addIfNotNull(orConditions, b.myOrCondition); IElementType.Predicate conjunction = orConditions.isEmpty() ? null : orConditions.size() == 1 ? orConditions.get(0) : t -> Objects.requireNonNull(a.myOrCondition).matches(t) && Objects.requireNonNull(b.myOrCondition).matches(t); TokenSet newSet = new TokenSet((short)Math.min(a.myShift, b.myShift), (short)Math.max(a.myMax, b.myMax), conjunction); for (int i = 0; i < newSet.myWords.length; i++) { final int ai = newSet.myShift - a.myShift + i; final int bi = newSet.myShift - b.myShift + i; newSet.myWords[i] = (0 <= ai && ai < a.myWords.length ? a.myWords[ai] : 0L) & (0 <= bi && bi < b.myWords.length ? b.myWords[bi] : 0L); } return newSet; } | andSet |
289,436 | TokenSet (@NotNull TokenSet a, @NotNull TokenSet b) { IElementType.Predicate difference = a.myOrCondition == null ? null : e -> !b.contains(e) && a.myOrCondition.matches(e); TokenSet newSet = new TokenSet((short)Math.min(a.myShift, b.myShift), (short)Math.max(a.myMax, b.myMax), difference); for (int i = 0; i < newSet.myWords.length; i++) { final int ai = newSet.myShift - a.myShift + i; final int bi = newSet.myShift - b.myShift + i; newSet.myWords[i] = (0 <= ai && ai < a.myWords.length ? a.myWords[ai] : 0L) & ~(0 <= bi && bi < b.myWords.length ? b.myWords[bi] : 0L); } return newSet; } | andNot |
289,437 | boolean (@NotNull IElementType t) { for (IElementType.Predicate component : myComponents) { if (component.matches(t)) return true; } return false; } | matches |
289,438 | void (String name) { } | nameChosen |
289,439 | void (final String name) { myDelegate.nameChosen(name); } | nameChosen |
289,440 | CodeStyleManager (@NotNull Project project) { return project.getService(CodeStyleManager.class); } | getInstance |
289,441 | CodeStyleManager (@NotNull PsiManager manager) { return getInstance(manager.getProject()); } | getInstance |
289,442 | void (@NotNull Document document, int offset) {} | scheduleIndentAdjustment |
289,443 | int (@NotNull PsiFile file, int offset) { return -1; } | getSpacing |
289,444 | int (@NotNull PsiFile file, int offset) { return -1; } | getMinLineFeeds |
289,445 | FormattingMode (@NotNull Project project) { if (!project.isDisposed()) { CodeStyleManager instance = getInstance(project); if (instance instanceof FormattingModeAwareIndentAdjuster) { return ((FormattingModeAwareIndentAdjuster)instance).getCurrentFormattingMode(); } } return FormattingMode.REFORMAT; } | getCurrentFormattingMode |
289,446 | void (@NotNull PsiFile file, @NotNull Runnable runnable) { runnable.run(); } | runWithDocCommentFormattingDisabled |
289,447 | DocCommentSettings (@NotNull PsiFile file) { return DocCommentSettings.DEFAULTS; } | getDocCommentSettings |
289,448 | void (final @NotNull PsiFile file) { throw new UnsupportedOperationException(); } | scheduleReformatWhenSettingsComputed |
289,449 | boolean () { return true; } | isDocFormattingEnabled |
289,450 | void (boolean formattingEnabled) { } | setDocFormattingEnabled |
289,451 | boolean () { return true; } | isLeadingAsteriskEnabled |
289,452 | boolean () { return false; } | isRemoveEmptyTags |
289,453 | void (boolean removeEmptyTags) { } | setRemoveEmptyTags |
289,454 | String () { String message = super.getMessage(); // do not add suffix with plugin id if plugin info is already in message if (myPluginId == null || (message != null && message.contains("PluginDescriptor("))) { return message; } else { return (message != null ? message : "null") + " [Plugin: " + myPluginId + "]"; } } | getMessage |
289,455 | PluginException (@NotNull String errorMessage, @Nullable Throwable cause, @NotNull Class<?> pluginClass) { return PluginProblemReporter.getInstance().createPluginExceptionByClass(errorMessage, cause, pluginClass); } | createByClass |
289,456 | PluginException (@NotNull Throwable cause, @NotNull Class<?> pluginClass) { String message = cause.getMessage(); return PluginProblemReporter.getInstance().createPluginExceptionByClass(message != null ? message : "", cause, pluginClass); } | createByClass |
289,457 | void (@NotNull Logger logger, @NotNull String errorMessage, @Nullable Throwable cause, @NotNull Class<?> pluginClass) { logger.error(createByClass(errorMessage, cause, pluginClass)); } | logPluginError |
289,458 | void (@NotNull String signature, @NotNull String details) { String message = "'" + signature + "' is deprecated and going to be removed soon. " + details; Logger.getInstance(PluginException.class).error(message); } | reportDeprecatedUsage |
289,459 | void (@NotNull Class<?> violator, @NotNull String methodName, @NotNull String details) { String message = "The default implementation of method '" + methodName + "' is deprecated, " + "you need to override it in '" + violator + "'. " + details; Logger.getInstance(violator).error(createByClass(message, null, violator)); } | reportDeprecatedDefault |
289,460 | Set<PluginId> (Object @NotNull ... implementationObjects) { Set<PluginId> myConflictingPluginIds = new HashSet<>(); for (Object object : implementationObjects) { final ClassLoader classLoader = object.getClass().getClassLoader(); if (classLoader instanceof PluginAwareClassLoader) { myConflictingPluginIds.add(((PluginAwareClassLoader)classLoader).getPluginId()); } else { myConflictingPluginIds.add(CORE_PLUGIN_ID); } } return myConflictingPluginIds; } | calculateConflicts |
289,461 | Set<PluginId> () { return new HashSet<>(ContainerUtil.subtract(myConflictingPluginIds, Collections.singleton(CORE_PLUGIN_ID))); } | getConflictingPluginIds |
289,462 | boolean () { return myConflictingPluginIds.contains(CORE_PLUGIN_ID); } | isConflictWithPlatform |
289,463 | PluginProblemReporter () { if (ApplicationManager.getApplication() == null) { //if the application isn't initialized yet return silly implementation which reports all plugins problems as platform ones return new PluginProblemReporter() { @Override public @NotNull PluginException createPluginExceptionByClass(@NotNull String errorMessage, @Nullable Throwable cause, @NotNull Class pluginClass) { return new PluginException(errorMessage, cause, null); } }; } return ApplicationManager.getApplication().getService(PluginProblemReporter.class); } | getInstance |
289,464 | PluginException (@NotNull String errorMessage, @Nullable Throwable cause, @NotNull Class pluginClass) { return new PluginException(errorMessage, cause, null); } | createPluginExceptionByClass |
289,465 | boolean () { return isEnabledDetailed; } | isDetailedWatcherEnabled |
289,466 | boolean () { return isEnabledAggregated; } | isAggregatedWatcherEnabled |
289,467 | void (final @NotNull Runnable runnable, final long waitedInQueueNs, final int queueSize, final long executionDurationNs, final boolean wasInSkippedItems) { for (EventWatcher watcher : watchers) { watcher.runnableTaskFinished(runnable, waitedInQueueNs, queueSize, executionDurationNs, wasInSkippedItems); } } | runnableTaskFinished |
289,468 | void (final @NotNull AWTEvent event, final long startedAtMs) { for (EventWatcher watcher : watchers) { watcher.edtEventStarted(event, startedAtMs); } } | edtEventStarted |
289,469 | void (final @NotNull AWTEvent event, final long finishedAtMs) { for (EventWatcher watcher : watchers) { watcher.edtEventFinished(event, finishedAtMs); } } | edtEventFinished |
289,470 | void (final @NotNull String processId, final long startedAtMs, final @NotNull Class<? extends Runnable> runnableClass) { for (EventWatcher watcher : watchers) { watcher.logTimeMillis(processId, startedAtMs, runnableClass); } } | logTimeMillis |
289,471 | void () { for (EventWatcher watcher : watchers) { watcher.reset(); } } | reset |
289,472 | void () { //for (EventWatcher watcher : watchers) { // if (watcher instanceof Disposable) { // final Disposable disposable = (Disposable)watcher; // Disposer.dispose(disposable); // } //} } | dispose |
289,473 | SmartPsiFileRange () { return myPsiFileRange; } | getPsiFileRange |
289,474 | boolean () { return isNonCodeUsage; } | isNonCodeUsage |
289,475 | void (boolean dynamicUsage) { myDynamicUsage = dynamicUsage; } | setDynamicUsage |
289,476 | int () { if (myPsiFileRange != null) { final Segment range = myPsiFileRange.getRange(); if (range != null) { return range.getStartOffset(); } } PsiElement element = getElement(); if (element == null) return -1; PsiFile psiFile = getFile(); boolean isNullOrBinary = psiFile == null || psiFile.getFileType().isBinary(); if (isNullOrBinary) return 0; TextRange range = element.getTextRange(); TextRange rangeInElement = getRangeInElement(); if (rangeInElement == null) return -1; return range.getStartOffset() + rangeInElement.getStartOffset(); } | getNavigationOffset |
289,477 | Segment () { if (myPsiFileRange != null) { final Segment range = myPsiFileRange.getRange(); if (range != null) { return range; } } PsiElement element = getElement(); if (element == null) return null; TextRange range = element.getTextRange(); TextRange rangeInElement = getRangeInElement(); if (rangeInElement == null) return null; return rangeInElement.shiftRight(range.getStartOffset()); } | getNavigationRange |
289,478 | boolean () { if (isFileOrBinary()) { return true; // in case of binary file } return getSegment() != null; } | isValid |
289,479 | boolean () { PsiElement element = getElement(); if (myPsiFileRange == null && element instanceof PsiFile) return true; PsiFile psiFile = getFile(); return psiFile != null && psiFile.getFileType().isBinary(); } | isFileOrBinary |
289,480 | FileWithOffset () { VirtualFile containingFile0 = getVirtualFile(); int shift0 = 0; if (containingFile0 instanceof VirtualFileWindow) { shift0 = ((VirtualFileWindow)containingFile0).getDocumentWindow().injectedToHost(0); containingFile0 = ((VirtualFileWindow)containingFile0).getDelegate(); } Segment range = myPsiFileRange == null ? mySmartPointer.getPsiRange() : myPsiFileRange.getPsiRange(); if (range == null) return null; return new FileWithOffset(containingFile0, range.getStartOffset() + shift0); } | offset |
289,481 | int (@NotNull UsageInfo info) { FileWithOffset offset0 = offset(); FileWithOffset offset1 = info.offset(); if (offset0 == null || offset1 == null) { return (offset0 == null ? 0 : 1) - (offset1 == null ? 0 : 1); } VirtualFile file0 = offset0.myFile; VirtualFile file1 = offset1.myFile; if (file0 == null || file1 == null) { return (file0 == null ? 0 : 1) - (file1 == null ? 0 : 1); } if (file0.equals(file1)) { return Integer.compare(offset0.myOffset, offset1.myOffset); } return file0.getPath().compareTo(file1.getPath()); } | compareToByStartOffset |
289,482 | Project () { return mySmartPointer.getProject(); } | getProject |
289,483 | boolean () { PsiElement element = getElement(); return element == null || element.isWritable(); } | isWritable |
289,484 | boolean (Object o) { if (this == o) return true; if (o == null || !getClass().equals(o.getClass())) return false; final UsageInfo usageInfo = (UsageInfo)o; if (isNonCodeUsage != usageInfo.isNonCodeUsage) return false; SmartPointerManager smartPointerManager = SmartPointerManager.getInstance(getProject()); return smartPointerManager.pointToTheSameElement(mySmartPointer, usageInfo.mySmartPointer) && (myPsiFileRange == null || usageInfo.myPsiFileRange != null && smartPointerManager.pointToTheSameElement(myPsiFileRange, usageInfo.myPsiFileRange)); } | equals |
289,485 | int () { int result = mySmartPointer != null ? mySmartPointer.hashCode() : 0; result = 29 * result + (myPsiFileRange == null ? 0 : myPsiFileRange.hashCode()); result = 29 * result + (isNonCodeUsage ? 1 : 0); return result; } | hashCode |
289,486 | String () { PsiReference reference = getReference(); if (reference == null) { return super.toString(); } return reference.getCanonicalText() + " (" + reference.getClass() + ")"; } | toString |
289,487 | boolean () { return myDynamicUsage; } | isDynamicUsage |
289,488 | ScheduledExecutorService () { return AppExecutorUtil.getAppScheduledExecutorService(); } | getScheduler |
289,489 | AsyncFuture<Boolean> (final boolean result) { return new AsyncFuture<Boolean>() { @Override public void addConsumer(@NotNull Executor executor, @NotNull ResultConsumer<? super Boolean> consumer) { consumer.onSuccess(result); } @Override public boolean cancel(boolean mayInterruptIfRunning) { return false; } @Override public boolean isCancelled() { return false; } @Override public boolean isDone() { return true; } @Override public Boolean get() { return result; } @Override public Boolean get(long timeout, @NotNull TimeUnit unit) { return result; } }; } | createConst |
289,490 | void (@NotNull Executor executor, @NotNull ResultConsumer<? super Boolean> consumer) { consumer.onSuccess(result); } | addConsumer |
289,491 | boolean (boolean mayInterruptIfRunning) { return false; } | cancel |
289,492 | boolean () { return false; } | isCancelled |
289,493 | boolean () { return true; } | isDone |
289,494 | Boolean () { return result; } | get |
289,495 | Boolean (long timeout, @NotNull TimeUnit unit) { return result; } | get |
289,496 | AsyncFuture<Boolean> (boolean result) { return result ? TRUE : FALSE; } | wrapBoolean |
289,497 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DelegatingPointerEq<?, ?> base = (DelegatingPointerEq<?, ?>)o; return myKey.equals(base.myKey) && myUnderlyingPointer.equals(base.myUnderlyingPointer); } | equals |
289,498 | int () { return Objects.hash(myKey, myUnderlyingPointer); } | hashCode |
289,499 | T (@NotNull U underlyingValue) { return myRestoration.apply(underlyingValue); } | dereference |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.