Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
41,300 | boolean (UExpression expression) { final UElement parent = UastUtils.skipParenthesizedExprUp(expression.getUastParent()); if (parent == null || !UastExpressionUtils.isMethodCall(parent)) { return false; } @NonNls final String methodName = ((UCallExpression)parent).getMethodName(); if (methodName == null) { return false... | isArgOfJUnitAssertion |
41,301 | boolean (UExpression expression, String[] specifiedExceptions) { if (specifiedExceptions.length == 0) return false; UCallExpression parent = UastUtils.getParentOfType(expression, UCallExpression.class, true, UClass.class); if (parent == null || !UastExpressionUtils.isConstructorCall(parent)) { return false; } final Psi... | isArgOfSpecifiedExceptionConstructor |
41,302 | boolean (UExpression expression) { UCallExpression parent = UastUtils.getParentOfType(expression, UCallExpression.class); return parent != null && "assert".equals(parent.getMethodName()); } | isArgOfAssertStatement |
41,303 | boolean (@NotNull UExpression expression) { final UCallExpression newExpression = UastUtils.getParentOfType(expression, UCallExpression.class, true, UBlockExpression.class, UClass.class); if (newExpression != null) { if (UastExpressionUtils.isConstructorCall(newExpression)) { UReferenceExpression classReference = newEx... | isExceptionArgument |
41,304 | String () { return JavaI18nBundle.message("intention.family.name.mark.as.nlssafe"); } | getFamilyName |
41,305 | void (@NotNull Project project, CommonProblemDescriptor @NotNull [] descriptors, @NotNull List<PsiElement> psiElementsToIgnore, @Nullable Runnable refreshViews) { final Map<String, I18nizedPropertyData<HardcodedStringContextData>> keyValuePairs = new LinkedHashMap<>(); final Set<PsiFile> contextFiles = new LinkedHashSe... | applyFix |
41,306 | void (@NotNull Project project, CommonProblemDescriptor @NotNull [] descriptors, @NotNull Set<PsiFile> contextFiles, @NotNull Map<String, I18nizedPropertyData<HardcodedStringContextData>> keyValuePairs) { final Set<PsiElement> distinct = new HashSet<>(); final UniqueNameGenerator uniqueNameGenerator = new UniqueNameGen... | fillI18nizedPropertyDataMap |
41,307 | void (@NotNull Project project, @NotNull Map<String, I18nizedPropertyData<HardcodedStringContextData>> keyValuePairs, @NotNull Set<PsiFile> contextFiles, @Nullable ResourceBundleManager bundleManager) { ArrayList<I18nizedPropertyData<HardcodedStringContextData>> replacements = new ArrayList<>(keyValuePairs.values()); I... | showI18nizeMultipleStringsDialog |
41,308 | String (String value, @NotNull UExpression expression) { List<UExpression> usages = I18nInspection.findIndirectUsages(expression, true); if (usages.isEmpty()) { usages = Collections.singletonList(expression); } for (UExpression usage : usages) { NlsInfo nlsInfo = NlsInfo.forExpression(usage); if (nlsInfo instanceof Nls... | suggestKeyByPlace |
41,309 | List<UExpression> () { return myExpressions; } | getExpressions |
41,310 | List<PsiElement> () { return myPsiElements; } | getPsiElements |
41,311 | List<UExpression> () { return myArgs; } | getArgs |
41,312 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
41,313 | void (@NotNull AnActionEvent e) { boolean active = getHandler(e) != null; if (ActionPlaces.isPopupPlace(e.getPlace())) { e.getPresentation().setVisible(active); } else { e.getPresentation().setEnabled(active); } } | update |
41,314 | UInjectionHost (final PsiFile psiFile, final Editor editor) { PsiElement psiElement = psiFile.findElementAt(editor.getCaretModel().getOffset()); return getEnclosingStringLiteral(psiElement); } | getEnclosingStringLiteral |
41,315 | UInjectionHost (PsiElement psiElement) { while (psiElement != null) { UInjectionHost uastStringLiteral = UastContextKt.toUElement(psiElement, UInjectionHost.class); if (uastStringLiteral != null && uastStringLiteral.isString()) { return uastStringLiteral; } psiElement = psiElement.getParent(); } return null; } | getEnclosingStringLiteral |
41,316 | Editor (final AnActionEvent e) { return e.getData(CommonDataKeys.EDITOR); } | getEditor |
41,317 | void (@NotNull AnActionEvent e) { final Editor editor = getEditor(e); final Project project = editor.getProject(); assert project != null; final PsiFile psiFile = e.getData(CommonDataKeys.PSI_FILE); if (psiFile == null) return; final I18nQuickFixHandler<?> handler = getHandler(e); if (handler == null) return; doI18nSel... | actionPerformed |
41,318 | UCallExpression (PsiElement foldedPsiElement) { UCallExpression expression = UastContextKt.toUElement(foldedPsiElement, UCallExpression.class); if (expression != null) return expression; for (PsiElement child = foldedPsiElement.getFirstChild(); child != null; child = child.getNextSibling()) { UCallExpression e = UastCo... | findCallExpression |
41,319 | boolean () { return myProperty != null && myProperty.getPsiElement().isValid() && (myCallExpression == null || myCallExpression.isPsiValid()); } | isValid |
41,320 | VirtualFile () { PsiFile file = getPsiFile(); return file == null ? null : file.getVirtualFile(); } | getFile |
41,321 | PsiFile () { return myProperty.getPsiElement().getContainingFile(); } | getPsiFile |
41,322 | String () { return myProperty.getKey(); } | getKey |
41,323 | String () { return myProperty.getValue(); } | getValue |
41,324 | String () { return myCallExpression == null ? '"' + getValue() + '"' : PropertyFoldingBuilder.format(myCallExpression).first; } | getPlaceholder |
41,325 | void (String newValue) { myProperty.setValue(newValue); } | setValue |
41,326 | int (int offset) { if (myCallExpression == null) return offset - 1; List<Couple<Integer>> replacements = PropertyFoldingBuilder.format(myCallExpression).second; if (replacements == null) return offset - 1; Iterator<Couple<Integer>> it = replacements.iterator(); int diff = 0; while (it.hasNext()) { Couple<Integer> start... | placeholderToValueOffset |
41,327 | int (int offset) { offset++; if (myCallExpression == null) return offset; Pair<String, List<Couple<Integer>>> info = PropertyFoldingBuilder.format(myCallExpression); List<Couple<Integer>> replacements = info.second; if (replacements == null) return offset; Iterator<Couple<Integer>> it = replacements.iterator(); int dif... | valueToPlaceholderOffset |
41,328 | void (@NotNull Document document) { EditorFactory.getInstance().editors(document).forEach(EditPropertyValueTooltipManager::initializeForEditor); } | initializeForDocument |
41,329 | void (@NotNull Editor editor) { if (editor.getUserData(INITIALIZED) != null) return; editor.putUserData(INITIALIZED, Boolean.TRUE); new EditPropertyValueTooltipManager(editor); } | initializeForEditor |
41,330 | void (@NotNull EditorMouseEvent event) { Editor editor = event.getEditor(); if (event.getArea() == EditorMouseEventArea.EDITING_AREA && shouldShowTooltip(editor)) { event.consume(); myAlarm.cancelAllRequests(); showTooltip(editor); } } | mouseReleased |
41,331 | void (@NotNull CaretEvent event) { myAlarm.cancelAllRequests(); Editor editor = event.getEditor(); if (shouldShowTooltip(editor)) myAlarm.addRequest(() -> showTooltip(editor), TOOLTIP_DELAY_MS); } | caretPositionChanged |
41,332 | boolean (@NotNull Editor editor) { return EditPropertyValueAction.isEnabled(editor); } | shouldShowTooltip |
41,333 | void (@NotNull Editor editor) { String hintText = StringUtil.join(Arrays.asList(createActionText(ACTION_EXPAND_REGION, "expand"), createActionText(ACTION_EDIT_PROPERTY_VALUE, "edit")), " "); if (hintText.isEmpty()) return; JComponent component = HintUtil.createInformationLabel("<html>" + hintText... | showTooltip |
41,334 | void (HyperlinkEvent e) { if (e.getEventType() != HyperlinkEvent.EventType.ACTIVATED) return; String actionId = switch (e.getDescription()) { case "expand" -> ACTION_EXPAND_REGION; case "edit" -> ACTION_EDIT_PROPERTY_VALUE; default -> null; }; if (actionId != null) { AnAction action = ActionManager.getInstance().getAct... | hyperlinkUpdate |
41,335 | String (@NotNull String actionId, @NotNull String href) { AnAction action = ActionManager.getInstance().getAction(actionId); if (action == null) return null; String text = action.getTemplateText(); if (text == null) return null; HtmlChunk.Element shortcut = HtmlChunk.span("color:" + ColorUtil.toHtmlColor(UIUtil.getCont... | createActionText |
41,336 | LightweightHint (@NotNull Editor editor, @NotNull JComponent component, boolean tenacious) { if (editor.isDisposed()) return null; FoldRegion foldRegion = editor.getFoldingModel().getCollapsedRegionAtOffset(editor.getCaretModel().getOffset()); if (foldRegion == null) return null; JComponent editorComponent = editor.get... | showTooltip |
41,337 | PsiElement (@Nullable PsiElement element, Editor editor) { if (!(element instanceof LeafPsiElement)) return null; FoldRegion region = editor.getFoldingModel().getCollapsedRegionAtOffset(element.getTextRange().getStartOffset()); if (region == null) return null; PsiElement editableElement = EditPropertyValueAction.getEdi... | getGotoDeclarationTarget |
41,338 | boolean () { return true; } | isAvailableInEditorOnly |
41,339 | boolean (PsiElement @NotNull [] elements) { return false; } | isEnabledOnElements |
41,340 | RefactoringActionHandler (@NotNull DataContext dataContext) { return new Handler(); } | getHandler |
41,341 | boolean (@NotNull PsiElement element, @NotNull Editor editor, @NotNull PsiFile file, @NotNull DataContext context) { return isEnabled(editor); } | isAvailableOnElementInEditorAndFile |
41,342 | void (@NotNull Project project, Editor editor, PsiFile file, DataContext dataContext) { doEdit(editor); } | invoke |
41,343 | void (@NotNull Project project, PsiElement @NotNull [] elements, DataContext dataContext) {} | invoke |
41,344 | boolean (@NotNull Editor editor) { if (!(editor instanceof EditorImpl) || editor.getProject() == null) { return false; } FoldRegion region = editor.getFoldingModel().getCollapsedRegionAtOffset(editor.getCaretModel().getOffset()); if (region == null) return false; return getEditableElement(region) != null; } | isEnabled |
41,345 | PsiElement (@NotNull FoldRegion region) { PsiElement psiElement = EditorFoldingInfo.get(region.getEditor()).getPsiElement(region); return psiElement == null || psiElement.getUserData(EDITABLE_PROPERTY_VALUE) == null ? null : psiElement; } | getEditableElement |
41,346 | void (@NotNull Editor editor) { if (!(editor instanceof EditorImpl) || editor.getProject() == null) { return; } FoldRegion region = editor.getFoldingModel().getCollapsedRegionAtOffset(editor.getCaretModel().getOffset()); if (region == null) return; PsiElement psiElement = getEditableElement(region); PropertyFoldingEdit... | doEdit |
41,347 | EditorEx () { EditorEx e = super.createEditor(); e.getCaretModel().moveToOffset(Math.max(0, Math.min(e.getDocument().getTextLength(), unescaped.second))); e.setHorizontalScrollbarVisible(true); e.getDocument().addDocumentListener(new DocumentListener() { @Override public void documentChanged(@NotNull DocumentEvent even... | createEditor |
41,348 | void (@NotNull DocumentEvent event) { if (manuallyResized.isNull()) { popupRef.get().pack(true, true); } } | documentChanged |
41,349 | boolean () { return false; } | shouldHaveBorder |
41,350 | Dimension () { int MIN_WIDTH = JBUI.scale(350); int MAX_WIDTH = JBUI.scale(550); Dimension size = super.getPreferredSize(); int width = size.width; int height = size.height; if (width > MAX_WIDTH) { setSize(MAX_WIDTH, height); validate(); size = super.getPreferredSize(); width = size.width; height = size.height; } retu... | getPreferredSize |
41,351 | void (@NotNull LightweightWindowEvent event) { hint.hide(); } | onClosed |
41,352 | int (StringBuilder b, int midOffset, String replacement, int[] offsetToKeep) { b.replace(midOffset - 1, midOffset + 1, replacement); int shift = replacement.length() - 2; if (offsetToKeep[0] > midOffset) offsetToKeep[0] += shift; return midOffset + shift; } | replaceEscapePair |
41,353 | JComponent (EditorTextField textField, int minSize, AnAction shiftEnterAction) { Presentation presentation = shiftEnterAction.getTemplatePresentation(); int size = Math.max(JBUI.scale(16), minSize); Dimension d = new JBDimension(size, size, true); ActionButton button = new ActionButton(shiftEnterAction, presentation, A... | createNewLineButton |
41,354 | DataContext () { return DataManager.getInstance().getDataContext(textField); } | getDataContext |
41,355 | Insets () { return JBInsets.emptyInsets(); } | getInsets |
41,356 | LightweightHint (@NotNull Editor editor, @Nullable VirtualFile file, @Nullable @NlsSafe String key) { if (file == null && key == null) return null; JPanel panel = new JPanel(); panel.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0)); if (file != null) { panel.add(new JLabel(file.getPresentableName() + (key == null ? "... | showTooltip |
41,357 | void (@NotNull PsiElement element, @NotNull Document document) { element.putUserData(EDITABLE_PROPERTY_VALUE, Boolean.TRUE); EditPropertyValueTooltipManager.initializeForDocument(document); } | registerFoldedElement |
41,358 | void (@NotNull AnActionEvent e) { PsiFile targetPsiFile = handler.getPsiFile(); if (targetPsiFile == null) return; Project project = field.getProject(); String newValue = field.getText(); Editor fieldEditor = field.getEditor(); if (fieldEditor == null) return; int valueOffset = fieldEditor.getCaretModel().getOffset(); ... | actionPerformed |
41,359 | void () { if (foldRegion.isValid()) { editor.getFoldingModel().runBatchFoldingOperation(() -> foldRegion.setPlaceholderText(oldPlaceholder)); } } | undo |
41,360 | void () { if (foldRegion.isValid()) { editor.getFoldingModel().runBatchFoldingOperation(() -> foldRegion.setPlaceholderText(newPlaceholder)); } } | redo |
41,361 | boolean () { return false; } | isGlobal |
41,362 | void (@NotNull Component component, @NotNull Runnable runnable) { component.requestFocus(); if (KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner() == component) { runnable.run(); } else { component.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { component.remov... | focusAndRun |
41,363 | void (FocusEvent e) { component.removeFocusListener(this); runnable.run(); } | focusGained |
41,364 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
41,365 | void (@NotNull Editor editor, @Nullable Caret caret, DataContext dataContext) { EditorActionManager.getInstance().getActionHandler(IdeActions.ACTION_EDITOR_ENTER).execute(editor, caret, dataContext); } | executeWriteAction |
41,366 | String () { return JavaI18nBundle.message("intention.text.edit.property.value"); } | getText |
41,367 | String () { return getText(); } | getFamilyName |
41,368 | boolean (@NotNull Project project, Editor editor, PsiFile file) { return EditPropertyValueAction.isEnabled(editor); } | isAvailable |
41,369 | boolean () { return false; } | startInWriteAction |
41,370 | void (@NotNull PsiLiteralExpression expression) { ProgressManager.checkCanceled(); ULiteralExpression uLiteralExpression = UastContextKt.toUElement(expression, ULiteralExpression.class); if (uLiteralExpression != null) { checkLiteral(document, uLiteralExpression, result); } } | visitLiteralExpression |
41,371 | void (@NotNull PsiElement element) { ProgressManager.checkCanceled(); ULiteralExpression uLiteralExpression = UastContextKt.toUElement(element, ULiteralExpression.class); if (uLiteralExpression != null) { checkLiteral(document, uLiteralExpression, result); } super.visitElement(element); } | visitElement |
41,372 | boolean () { return JavaCodeFoldingSettings.getInstance().isCollapseI18nMessages(); } | isFoldingsOn |
41,373 | void (Document document, ULiteralExpression expression, List<? super FoldingDescriptor> result) { PsiElement sourcePsi = expression.getSourcePsi(); if (sourcePsi == null) return; if (!isI18nProperty(expression)) return; final IProperty property = getI18nProperty(expression); final HashSet<Object> set = new HashSet<>();... | checkLiteral |
41,374 | String (@NotNull ASTNode node) { return null; } | getPlaceholderText |
41,375 | String (@NotNull UCallExpression methodCallExpression) { return format(methodCallExpression).first; } | formatMethodCallExpression |
41,376 | String (String text, String placeholder, String replacement, List<Couple<Integer>> replacementPositions) { int curPos = 0; do { int placeholderPos = text.indexOf(placeholder, curPos); if (placeholderPos < 0) break; text = text.substring(0, placeholderPos) + replacement + text.substring(placeholderPos + placeholder.leng... | replacePlaceholder |
41,377 | String (@NotNull ULiteralExpression literal) { final IProperty property = getI18nProperty(literal); return property == null ? UastLiteralUtils.getValueIfStringLiteral(literal) : formatI18nProperty(literal, property); } | getI18nMessage |
41,378 | IProperty (@NotNull ULiteralExpression literal) { PsiElement sourcePsi = literal.getSourcePsi(); if (sourcePsi == null) return null; final Property property = (Property)sourcePsi.getUserData(CACHE); if (property == NULL) return null; if (property != null && isValid(property, literal)) return property; if (isI18nPropert... | getI18nProperty |
41,379 | boolean (Property property, ULiteralExpression literal) { if (literal == null || property == null || !property.isValid()) return false; Object result = literal.evaluate(); if (!(result instanceof String)) return false; return StringUtil.unquoteString(((String)result)).equals(property.getKey()); } | isValid |
41,380 | String (@NotNull ULiteralExpression literal, IProperty property) { Object evaluated = literal.evaluate(); return property == null ? evaluated != null ? evaluated.toString() : "null" : "\"" + property.getValue() + "\""; } | formatI18nProperty |
41,381 | boolean (@NotNull ASTNode node) { return isFoldingsOn(); } | isCollapsedByDefault |
41,382 | boolean (@NotNull PsiLiteralExpression expr) { ULiteralExpression uLiteralExpression = UastContextKt.toUElement(expr, ULiteralExpression.class); if (uLiteralExpression == null) return false; return isI18nProperty(uLiteralExpression); } | isI18nProperty |
41,383 | boolean (@NotNull ULiteralExpression expr) { if (!expr.isString()) return false; PsiElement sourcePsi = expr.getSourcePsi(); if (sourcePsi == null) return false; final IProperty property = sourcePsi.getUserData(CACHE); if (property == NULL) return false; if (property != null) return true; final boolean isI18n = JavaI18... | isI18nProperty |
41,384 | String () { return "REPORT_DUPLICATED_PROPERTIES"; } | getName |
41,385 | String () { return JavaI18nBundle.message("inconsistent.bundle.report.duplicate.properties.values"); } | getPresentableName |
41,386 | void (BidirectionalMap<PropertiesFile, PropertiesFile> parents, List<? extends PropertiesFile> files, Map<PropertiesFile, Set<String>> keysUpToParent, Map<PropertiesFile, Map<String, String>> propertiesFilesNamesMaps, InspectionManager manager, RefManager refManager, ProblemDescriptionsProcessor processor) { for (Prope... | check |
41,387 | String () { return "InconsistentResourceBundle"; } | getShortName |
41,388 | OptPane () { return new OptPane(ContainerUtil.map( myInspectionProviders.getValue(), provider -> OptPane.checkbox(provider.getName(), provider.getPresentableName()))); } | getOptionsPane |
41,389 | OptionController () { return OptionController.of(this::isProviderEnabled, (bindId, value) -> { boolean boolValue = (Boolean)value; if (boolValue) { mySettings.remove(bindId); } else { mySettings.put(bindId, false); } }); } | getOptionController |
41,390 | void (@NotNull InspectionManager manager, @NotNull GlobalInspectionContext globalContext, @NotNull ProblemDescriptionsProcessor problemDescriptionsProcessor) { globalContext.putUserData(VISITED_BUNDLES_KEY, ConcurrentCollectionFactory.createConcurrentSet()); } | inspectionStarted |
41,391 | void (@NotNull PsiFile file, @NotNull InspectionManager manager, @NotNull ProblemsHolder problemsHolder, @NotNull GlobalInspectionContext globalContext, @NotNull ProblemDescriptionsProcessor problemDescriptionsProcessor) { Set<ResourceBundle> visitedBundles = globalContext.getUserData(VISITED_BUNDLES_KEY); if (!(file i... | checkFile |
41,392 | boolean (final String providerName) { return mySettings.getOrDefault(providerName, true); } | isProviderEnabled |
41,393 | void (final Class<? extends InconsistentResourceBundleInspectionProvider>... providerClasses) { Set<Class<? extends InconsistentResourceBundleInspectionProvider>> providersToEnable = ContainerUtil.newHashSet(providerClasses); for (InconsistentResourceBundleInspectionProvider inspectionProvider : myInspectionProviders.g... | enableProviders |
41,394 | void () { for (InconsistentResourceBundleInspectionProvider inspectionProvider : myInspectionProviders.getValue()) { mySettings.put(inspectionProvider.getName(), false); } } | disableAllProviders |
41,395 | void () { mySettings.clear(); } | clearSettings |
41,396 | String () { return "REPORT_INCONSISTENT_PROPERTIES"; } | getName |
41,397 | String () { return JavaI18nBundle.message("inconsistent.bundle.report.inconsistent.properties"); } | getPresentableName |
41,398 | void (BidirectionalMap<PropertiesFile, PropertiesFile> parents, List<? extends PropertiesFile> files, Map<PropertiesFile, Set<String>> keysUpToParent, Map<PropertiesFile, Map<String, String>> propertiesFilesNamesMaps, InspectionManager manager, RefManager refManager, ProblemDescriptionsProcessor processor) { for (Prope... | check |
41,399 | String () { return "REPORT_INCONSISTENT_PROPERTIES_ENDS"; } | getName |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.