Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
71,500
boolean () { return DEPRECATED_ENTRY_POINT; }
isSelected
71,501
void (boolean selected) { DEPRECATED_ENTRY_POINT = selected; }
setSelected
71,502
void (@NotNull StringBuilder buf, RefEntity refEntity) { compose(buf, refEntity, true); }
compose
71,503
void (@NotNull StringBuilder buf, RefEntity refEntity, boolean toExternalHtml) { if (toExternalHtml) { genPageHeader(buf, refEntity); } if (refEntity instanceof RefElementImpl refElement) { if (refElement.isSuspicious() && !refElement.isEntry()) { appendHeading(buf, AnalysisBundle.message("inspection.problem.synopsis")...
compose
71,504
void (final RefElement refElement, @NotNull StringBuilder buf) { refElement.accept(new RefJavaVisitor() { @Override public void visitField(@NotNull RefField field) { if (field.isUsedForReading() && !field.isUsedForWriting()) { buf.append(AnalysisBundle.message("inspection.dead.code.problem.synopsis")); return; } if (!f...
appendProblemSynopsis
71,505
void (@NotNull StringBuilder buf, RefElement refElement) { if (refElement instanceof RefImplicitConstructor) { refElement = ((RefImplicitConstructor)refElement).getOwnerClass(); } buf.append("<br>"); if (refElement instanceof RefClassImpl refClass) { if (refClass.isSuspicious()) { if (refClass.isUtilityClass()) { // Ap...
appendAdditionalListItemInfo
71,506
int (RefMethod refMethod) { int count = 0; for (RefMethod refDerived : refMethod.getDerivedMethods()) { count += refDerived.getInReferences().size() + getDerivedRefsCount(refDerived); } return count; }
getDerivedRefsCount
71,507
int (RefMethod refMethod) { int count = 0; for (RefMethod refSuper : refMethod.getSuperMethods()) { count += refSuper.getInReferences().size() + getSuperRefsCount(refSuper); } return count; }
getSuperRefsCount
71,508
int (RefClass aClass) { if (!aClass.isAnonymous()) { int count = 0; for (RefMethod refConstructor : aClass.getConstructors()) { count += refConstructor.getInReferences().size(); } for (RefClass subClass : aClass.getSubClasses()) { count += getInstantiationsCount(subClass); count -= subClass.getConstructors().size(); } ...
getInstantiationsCount
71,509
int (RefOverridable refClass) { int count = 0; for (RefOverridable reference : refClass.getDerivedReferences()) { if (reference instanceof RefClass) { if (!((RefClass)reference).isInterface() && !((RefClass)reference).isAbstract()) { count++; } count += getImplementationsCount(reference); } else if (reference instanceo...
getImplementationsCount
71,510
void (@NotNull StringBuilder buf, RefClass refClass) { if (!refClass.isInterface() && !refClass.isAbstract() && !refClass.isUtilityClass()) { boolean found = false; appendHeading(buf, AnalysisBundle.message("inspection.dead.code.export.results.instantiated.from.heading")); startList(buf); for (RefMethod refMethod : ref...
appendClassInstantiations
71,511
void (RefElement element, @NotNull StringBuilder buf, Set<? super RefElement> mentionedElements, boolean appendCallees) { final Set<RefElement> possibleChildren = getPossibleChildren(element); if (!possibleChildren.isEmpty()) { if (appendCallees){ appendHeading(buf, JavaBundle.message("inspection.export.results.callees...
appendCallersList
71,512
Set<RefElement> (RefElement refElement) { if (!refElement.isValid()) return Collections.emptySet(); final HashSet<RefElement> newChildren = new HashSet<>(); for (RefElement refCallee : refElement.getOutReferences()) { if (((RefElementImpl)refCallee).isSuspicious()) { newChildren.add(refCallee); } } if (refElement insta...
getPossibleChildren
71,513
EventLogGroup () { return GROUP; }
getGroup
71,514
Set<MetricEvent> (@NotNull Project project) { EntryPointsManagerBase entryPointManager = EntryPointsManagerBase.getInstance(project); Set<MetricEvent> result = new LinkedHashSet<>(); addAdditionalAnnotationsMetric(result, entryPointManager.getCustomAdditionalAnnotations()); result.add(WRITE_ANNOTATIONS.metric(!entryPoi...
getMetrics
71,515
void (@NotNull Set<MetricEvent> metrics, @NotNull List<String> annotations) { if (annotations.isEmpty()) { metrics.add(ADDITIONAL_ANNOTATIONS.metric(false, false)); return; } int patternsAmount = ContainerUtil.count(annotations, fqn -> fqn.endsWith("*")); int fqnAmount = annotations.size() - patternsAmount; MetricEvent...
addAdditionalAnnotationsMetric
71,516
InspectionProfileEntry () { return new DummyEntryPointsTool(); }
instantiateTool
71,517
void (RefClass refClass, UsagesProcessor p) { LOG.assertTrue(!refClass.isAnonymous()); if (myClassUsagesRequests == null) myClassUsagesRequests = new HashMap<>(); enqueueRequestImpl(refClass, myClassUsagesRequests, p); }
enqueueClassUsagesProcessor
71,518
void (RefClass refClass, DerivedClassesProcessor p) { LOG.assertTrue(!refClass.isAnonymous()); if (myDerivedClassesRequests == null) myDerivedClassesRequests = new HashMap<>(); enqueueRequestImpl(refClass, myDerivedClassesRequests, p); }
enqueueDerivedClassesProcessor
71,519
void (RefMethod refMethod, DerivedMethodsProcessor p) { if (refMethod.isConstructor() || refMethod.isStatic()) return; if (myDerivedMethodsRequests == null) myDerivedMethodsRequests = new HashMap<>(); enqueueRequestImpl(refMethod, myDerivedMethodsRequests, p); }
enqueueDerivedMethodsProcessor
71,520
void (RefField refField, UsagesProcessor p) { if (myFieldUsagesRequests == null) myFieldUsagesRequests = new HashMap<>(); enqueueRequestImpl(refField, myFieldUsagesRequests, p); }
enqueueFieldUsagesProcessor
71,521
void (RefMethod refMethod, UsagesProcessor p) { if (myMethodUsagesRequests == null) myMethodUsagesRequests = new HashMap<>(); enqueueRequestImpl(refMethod, myMethodUsagesRequests, p); }
enqueueMethodUsagesProcessor
71,522
void (RefClass refClass, Runnable c) { if (myQNameUsagesRequests == null) myQNameUsagesRequests = new HashMap<>(); enqueueRequestImpl(refClass, myQNameUsagesRequests, c); }
enqueueQualifiedNameOccurrencesProcessor
71,523
EntryPointsManager (RefManager manager) { return manager.getExtension(RefJavaManager.MANAGER).getEntryPointsManager(); }
getEntryPointsManager
71,524
boolean (boolean online, @NotNull Project project, @NotNull Runnable rerunAction) { Module[] modules = ModuleManager.getInstance(project).getModules(); if (online) { if (modules.length == 0) { Messages.showMessageDialog(project, JavaBundle.message("inspection.no.modules.error.message"), CommonBundle.getErrorTitle(), Me...
isInspectionsEnabled
71,525
boolean (Project project, Module[] modules) { return ProgressManager.getInstance().run(new Task.WithResult<Boolean, RuntimeException>(project, JavaBundle.message("dialog.title.check.configuration"), true) { @Override protected Boolean compute(@NotNull ProgressIndicator indicator) throws RuntimeException { boolean anyMo...
isBadSdk
71,526
void () { myDerivedMethodsRequests = null; myDerivedClassesRequests = null; myMethodUsagesRequests = null; myFieldUsagesRequests = null; myClassUsagesRequests = null; }
cleanup
71,527
void (@NotNull GlobalInspectionContext context) { RefManager refManager = context.getRefManager(); AnalysisScope scope = refManager.getScope(); SearchScope searchScope = new GlobalSearchScope(refManager.getProject()) { private final boolean processedReferences = Registry.is("batch.inspections.process.external.elements"...
processSearchRequests
71,528
boolean (@NotNull VirtualFile file) { if (scope != null && !scope.contains(file)) { return true; } //e.g. xml files were not included in the graph, so usages there should be processed as external boolean inGraph = processedReferences ? refManager.isInGraph(file) : FileTypeRegistry.getInstance().isFileOfType(file, JavaF...
contains
71,529
boolean (@NotNull Module aModule) { return true; }
isSearchInModuleContent
71,530
boolean () { return false; }
isSearchInLibraries
71,531
boolean (@NotNull VirtualFile file) { return !fileTypes.contains(file.getFileType()) && super.contains(file); }
contains
71,532
String (@NotNull UClass uClass) { return ReadAction.compute(() -> { String qualifiedName = uClass.getQualifiedName(); if (qualifiedName != null) { return qualifiedName; } return Objects.requireNonNull(uClass.getName(), uClass.getClass().getName()); }); }
getClassPresentableName
71,533
PsiElement (@NotNull SmartPsiElementPointer<?> sortedID) { return ReadAction.compute(() -> sortedID.getElement()); }
dereferenceInReadAction
71,534
int () { int sum = 0; sum += getRequestListSize(myClassUsagesRequests); sum += getRequestListSize(myDerivedClassesRequests); sum += getRequestListSize(myDerivedMethodsRequests); sum += getRequestListSize(myFieldUsagesRequests); sum += getRequestListSize(myMethodUsagesRequests); return sum; }
getRequestCount
71,535
int (Map<?,?> list) { return list == null ? 0 : list.size(); }
getRequestListSize
71,536
PsiReferenceProcessor (@NotNull List<UsagesProcessor> processors, @NotNull GlobalInspectionContext context) { return reference -> { AnalysisScope scope = context.getRefManager().getScope(); if (scope != null && scope.contains(reference.getElement()) && reference.getElement().getLanguage() == JavaLanguage.INSTANCE || Ps...
createReferenceProcessor
71,537
void (@NotNull List<Tools> globalTools, @NotNull List<Tools> localTools, @NotNull GlobalInspectionContext context) { if (globalTools.stream().anyMatch(tools -> { InspectionProfileEntry tool = tools.getTool().getTool(); return tool instanceof GlobalInspectionTool && ((GlobalInspectionTool)tool).isGraphNeeded(); })) { ge...
performPreRunActivities
71,538
void (@NotNull List<InspectionToolWrapper<?, ?>> needRepeatSearchRequest, @NotNull GlobalInspectionContext context) { long timestamp = System.currentTimeMillis(); JobDescriptor progress = context.getStdJobDescriptors().FIND_EXTERNAL_USAGES; progress.setTotalAmount(getRequestCount()); do { processSearchRequests(context)...
performPostRunActivities
71,539
void (@NotNull StringBuilder buf, @NotNull RefClass refClass, boolean capitalizeFirstLetter) { if (refClass.isInterface()) { buf.append(capitalizeFirstLetter ? AnalysisBundle.message("inspection.export.results.capitalized.interface") : AnalysisBundle.message("inspection.export.results.interface")); } else if (refClass....
appendClassOrInterface
71,540
void (@NotNull StringBuilder buf, @NotNull RefClass refClass) { if (refClass.getBaseClasses().size() > 0) { HTMLComposer.appendHeading(buf, AnalysisBundle.message("inspection.export.results.extends.implements")); myComposer.startList(buf); for (RefClass refBase : refClass.getBaseClasses()) { myComposer.appendListItem(b...
appendClassExtendsImplements
71,541
void (@NotNull StringBuilder buf, @NotNull RefClass refClass) { if (refClass.getSubClasses().size() > 0) { if (refClass.isInterface()) { HTMLComposer.appendHeading(buf, AnalysisBundle.message("inspection.export.results.extended.implemented")); } else { HTMLComposer.appendHeading(buf, AnalysisBundle.message("inspection....
appendDerivedClasses
71,542
void (@NotNull StringBuilder buf, @NotNull RefClass refClass) { if (refClass.getLibraryMethods().size() > 0) { HTMLComposer.appendHeading(buf, JavaBundle.message("inspection.export.results.overrides.library.methods")); myComposer.startList(buf); for (RefMethod refMethod : refClass.getLibraryMethods()) { myComposer.appe...
appendLibraryMethods
71,543
void (@NotNull StringBuilder buf, @NotNull RefMethod refMethod) { if (refMethod.getSuperMethods().size() > 0) { HTMLComposer.appendHeading(buf, AnalysisBundle.message("inspection.export.results.overrides.implements")); myComposer.startList(buf); for (RefMethod refSuper : refMethod.getSuperMethods()) { myComposer.append...
appendSuperMethods
71,544
void (@NotNull StringBuilder buf, @NotNull RefMethod refMethod) { if (refMethod.getDerivedMethods().size() > 0) { HTMLComposer.appendHeading(buf, AnalysisBundle.message("inspection.export.results.derived.methods")); myComposer.startList(buf); for (RefMethod refDerived : refMethod.getDerivedMethods()) { myComposer.appen...
appendDerivedMethods
71,545
void (@NotNull StringBuilder buf, @NotNull RefMethod refMethod) { List<RefFunctionalExpression> functionalExpressions = ContainerUtil.filterIsInstance(refMethod.getDerivedReferences(), RefFunctionalExpression.class); if (!functionalExpressions.isEmpty()) { HTMLComposer.appendHeading(buf, "Derived lambdas and method ref...
appendDerivedFunctionalExpressions
71,546
void (@NotNull StringBuilder buf, @NotNull RefClass refClass) { if (refClass.getInTypeReferences().size() > 0) { HTMLComposer.appendHeading(buf, JavaBundle.message("inspection.export.results.type.references")); myComposer.startList(buf); for (final RefElement refElement : refClass.getInTypeReferences()) { myComposer.ap...
appendTypeReferences
71,547
void (final RefEntity refElement, @NotNull StringBuilder buf) { if (refElement instanceof RefJavaElement) { String modifier = ((RefJavaElement)refElement).getAccessModifier(); if (!modifier.equals(PsiModifier.PACKAGE_LOCAL)) { buf.append(modifier); buf.append(HTMLComposerImpl.NBSP); } } refElement.accept(new RefJavaVis...
appendShortName
71,548
void (@NotNull RefClass refClass) { if (refClass.isStatic()) { buf.append(AnalysisBundle.message("inspection.export.results.static")); buf.append(HTMLComposerImpl.NBSP); } appendClassOrInterface(buf, refClass, false); buf.append(HTMLComposerImpl.NBSP).append(HTMLComposerImpl.B_OPENING).append(HTMLComposerImpl.CODE_OPEN...
visitClass
71,549
void (@NotNull RefField field) { PsiField psiField = (PsiField)field.getUastElement().getJavaPsi(); if (psiField != null) { if (field.isStatic()) { buf.append(AnalysisBundle.message("inspection.export.results.static")); buf.append(HTMLComposerImpl.NBSP); } buf.append(AnalysisBundle.message("inspection.export.results.fi...
visitField
71,550
void (@NotNull RefMethod method) { UMethod uMethod = method.getUastElement(); if (uMethod == null) return; PsiMethod psiMethod = uMethod.getJavaPsi(); PsiType returnType = psiMethod.getReturnType(); if (method.isStatic()) { buf.append(AnalysisBundle.message("inspection.export.results.static")); buf.append(HTMLComposerI...
visitMethod
71,551
void (@NotNull RefFile file) { final PsiFile psiFile = file.getPsiElement(); buf.append(HTMLComposerImpl.B_OPENING); buf.append(psiFile.getName()); buf.append(HTMLComposerImpl.B_CLOSING); }
visitFile
71,552
void (final RefEntity entity, @NotNull StringBuilder buf) { RefEntity owner = entity.getOwner(); if (owner instanceof RefPackage) { buf.append(JavaBundle.message("inspection.export.results.package")); buf.append(HTMLComposerImpl.NBSP).append(HTMLComposerImpl.CODE_OPENING); buf.append(RefJavaUtil.getInstance().getPackag...
appendLocation
71,553
String (final RefEntity refEntity) { if (refEntity instanceof RefJavaElement && ((RefJavaElement)refEntity).isSyntheticJSP()) { return XmlStringUtil.escapeString(refEntity.getName()); } else if (refEntity instanceof RefMethod refMethod) { UMethod uMethod = refMethod.getUastElement(); if (uMethod != null) { return uMeth...
getQualifiedName
71,554
void (RefEntity refElement, @NotNull StringBuilder buf, final boolean isPackageIncluded) { if (refElement instanceof RefImplicitConstructor) { buf.append(JavaBundle.message("inspection.export.results.implicit.constructor")); buf.append("&nbsp;"); refElement = ((RefImplicitConstructor)refElement).getOwnerClass(); } buf....
appendReferencePresentation
71,555
void (@NotNull StringBuilder buf, PsiMethod method, boolean showNames) { PsiParameter[] params = method.getParameterList().getParameters(); buf.append('('); for (int i = 0; i < params.length; i++) { if (i != 0) buf.append(", "); PsiParameter param = params[i]; buf.append(XmlStringUtil.escapeString(param.getType().getPr...
appendMethodParameters
71,556
RefactoringElementListener (final PsiElement psiElement) { if (!(psiElement instanceof PsiClass)) return null; final String oldName = ((PsiClass)psiElement).getQualifiedName(); if (oldName == null) return null; final EntryPointsManagerBase entryPointsManager = EntryPointsManagerBase.getInstance(psiElement.getProject())...
getListener
71,557
void (@NotNull PsiElement element, @Nullable String oldQualifiedName) { if (element instanceof PsiClass) { final String newQualifiedName = ((PsiClass)element).getQualifiedName(); if (newQualifiedName != null) { final int idx = entryPointsManager.ADDITIONAL_ANNOTATIONS.indexOf(oldQualifiedName != null ? newQualifiedName...
refactored
71,558
GlobalInspectionContextExtension () { return new GlobalJavaInspectionContextImpl(); }
createGlobalInspectionContextExtension
71,559
RefManagerExtension (final RefManager refManager) { return new RefJavaManagerImpl((RefManagerImpl)refManager); }
createRefManagerExtension
71,560
HTMLComposerExtension (final HTMLComposer composer) { return new HTMLJavaHTMLComposerImpl((HTMLComposerImpl)composer); }
createHTMLComposerExtension
71,561
boolean (@NotNull final PsiElement element, @NotNull final String id) { return SuppressManager.getInstance().getElementToolSuppressedIn(element, id) == null; }
isToCheckMember
71,562
String (@NotNull final PsiElement element) { return SuppressManager.getInstance().getSuppressedInspectionIdsIn(element); }
getSuppressedInspectionIdsIn
71,563
boolean (@NotNull final Project project, final boolean online, @NotNull Runnable rerunAction) { return GlobalJavaInspectionContextImpl.isInspectionsEnabled(online, project, rerunAction); }
isProjectConfiguredToRunInspections
71,564
void () { configureAnnotations(false); }
configureAnnotations
71,565
void (boolean implicitWritesOnly) { List<String> list = new ArrayList<>(ADDITIONAL_ANNOTATIONS); List<String> writeList = new ArrayList<>(myWriteAnnotations); JPanel listPanel; if (implicitWritesOnly) { listPanel = null; } else { listPanel = SpecialAnnotationsUtil.createSpecialAnnotationsListControl( list, JavaBundle.m...
configureAnnotations
71,566
JComponent () { JPanel panel = new JPanel(new GridBagLayout()); var constraints = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, JBInsets.emptyInsets(), 0, 0); if (listPanel != null) { panel.add(listPanel, constraints); constraints.insets.top = ...
createCenterPanel
71,567
void () { ADDITIONAL_ANNOTATIONS.clear(); ADDITIONAL_ANNOTATIONS.addAll(list); myWriteAnnotations.clear(); myWriteAnnotations.addAll(writeList); DaemonCodeAnalyzer.getInstance(myProject).restart(); super.doOKAction(); }
doOKAction
71,568
JButton (Project project, boolean implicitWritesOnly) { JButton configureAnnotations = new JButton(JavaBundle.message("button.annotations")); configureAnnotations.addActionListener(__ -> getInstance(project).configureAnnotations(implicitWritesOnly)); return configureAnnotations; }
createConfigureAnnotationsButton
71,569
JButton (Project project) { JButton configureClassPatterns = new JButton(JavaBundle.message("button.code.patterns")); configureClassPatterns.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { EntryPointsManagerBase entryPointsManagerBase = getInstance(project); ArrayList<Cla...
createConfigureClassPatternsButton
71,570
void (ActionEvent e) { EntryPointsManagerBase entryPointsManagerBase = getInstance(project); ArrayList<ClassPattern> list = new ArrayList<>(); for (ClassPattern pattern : entryPointsManagerBase.getPatterns()) { list.add(new ClassPattern(pattern)); } ClassPatternsPanel panel = new ClassPatternsPanel(list); new DialogWra...
actionPerformed
71,571
JComponent () { return panel; }
createCenterPanel
71,572
void () { String error = panel.getValidationError(project); if (error != null) { Messages.showErrorDialog(panel, error); return; } Set<ClassPattern> patterns = entryPointsManagerBase.getPatterns(); patterns.clear(); patterns.addAll(list); DaemonCodeAnalyzer.getInstance(entryPointsManagerBase.myProject).restart(); super...
doOKAction
71,573
boolean () { return true; }
isEnabledByDefault
71,574
void (String pattern) { EntryPointsManagerBase.ClassPattern classPattern = new EntryPointsManagerBase.ClassPattern(); classPattern.pattern = pattern; myModifiedPatterns.add(classPattern); AbstractTableModel model = (AbstractTableModel)myTable.getModel(); final int row = myModifiedPatterns.size() - 1; model.fireTableRow...
insertRow
71,575
JBTable () { TableModel dataModel = new MyTableModel(); final JBTable result = new JBTable(dataModel); result.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); result.getColumnModel().getColumn(2).setCellRenderer(new DefaultTableCellRenderer() { @Override public Component getTableCellRendererCo...
createTableForPatterns
71,576
Component (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { final Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); if (value instanceof String && ((String)value).isEmpty()) { setText(JavaBundle.message("table.cell.constru...
getTableCellRendererComponent
71,577
String (String inputString) { String errorMessage = JavaBundle.message("class.patterns.error.class.pattern.0.must.be.a.valid.java.qualifier"); if (inputString.startsWith(".")) return errorMessage; final String qName = inputString.replace("*", "").replace(".", ""); return !StringUtil.isEmpty(qName) && !myNameHelper.isQu...
getErrorText
71,578
boolean (String inputString) { return getErrorText(inputString) == null; }
canClose
71,579
int () { return 3; }
getColumnCount
71,580
int () { return myModifiedPatterns.size(); }
getRowCount
71,581
Object (int row, int col) { if (row < 0 || row > myModifiedPatterns.size() - 1) return null; final EntryPointsManagerBase.ClassPattern classPattern = myModifiedPatterns.get(row); if (classPattern == null) return null; if (col == 0) { return classPattern.hierarchically; } if (col == 1) { return classPattern.pattern; } r...
getValueAt
71,582
Class (int col) { if (col == 0) { return Boolean.class; } if (col == 1) { return String.class; } if (col == 2) { return String.class; } throw new IllegalArgumentException(String.valueOf(col)); }
getColumnClass
71,583
boolean (int row, int col) { return true; }
isCellEditable
71,584
void (Object aValue, int row, int col) { EntryPointsManagerBase.ClassPattern classPattern = myModifiedPatterns.get(row); if (classPattern == null) return; if (col == 0) { classPattern.hierarchically = (boolean)aValue; } else if (col == 1){ classPattern.pattern = (String)aValue; } else { classPattern.method = (String)aV...
setValueAt
71,585
void (int idx) { myModifiedPatterns.remove(idx); fireTableRowsDeleted(idx, idx); }
removeRow
71,586
boolean () { return false; }
availableInBatchMode
71,587
String () { return JavaBundle.message("quickfix.family.find.cause"); }
getFamilyName
71,588
ModCommand (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiExpression element = myAnchor.getElement(); if (element == null) return ModCommand.nop(); TrackingRunner.CauseItem item = TrackingRunner.findProblemCause(myIgnoreAssertStatements, element, myProblemType); PsiFile file = element.getContain...
perform
71,589
IntentionPreviewInfo (@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor) { return new IntentionPreviewInfo.Html(JavaBundle.message("quickfix.find.cause.description")); }
generatePreview
71,590
ModCommand (@NotNull PsiFile file, @Nullable TrackingRunner.CauseItem root) { Project project = file.getProject(); PsiFile topLevelFile = InjectedLanguageManager.getInstance(project).getTopLevelFile(file); Document document = topLevelFile.getViewProvider().getDocument(); List<CauseWithDepth> causes; if (root == null) {...
displayProblemCause
71,591
String () { return LangBundle.message("command.name.navigate"); }
getFamilyName
71,592
Presentation (@NotNull ActionContext context) { Presentation presentation = Presentation.of(myCauseWithDepth.toString()); Segment segment = myCauseWithDepth.myCauseItem.getTargetSegment(); if (segment != null) { presentation = presentation.withHighlighting(TextRange.create(segment)); } return presentation; }
getPresentation
71,593
ModCommand (@NotNull ActionContext context) { TrackingRunner.CauseItem item = myCauseWithDepth.myCauseItem; Segment range = item.getTargetSegment(); if (range == null) return ModCommand.nop(); PsiFile targetFile = item.getFile(); if (targetFile == null) return ModCommand.nop(); VirtualFile virtualFile = targetFile.getV...
perform
71,594
PsiConditionalExpression (@NotNull PsiExpression expression) { PsiElement parent = PsiUtil.skipParenthesizedExprUp(expression.getParent()); if (!(parent instanceof PsiConditionalExpression conditional)) return null; PsiType type = conditional.getType(); if (type == null) return null; PsiExpression thenExpression = cond...
getParentConditional
71,595
String () { return JavaBundle.message("intention.family.name.box.primitive.in.conditional.branch"); }
getFamilyName
71,596
void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { PsiExpression expression = myPointer.getElement(); if (expression == null) return; expression = updater.getWritable(expression); PsiConditionalExpression conditional = getParentConditional(expression); if (conditional == null...
applyFix
71,597
boolean (PsiSwitchLabelStatementBase label) { if (label instanceof PsiSwitchLabeledRuleStatement) return true; PsiStatement nextStatement = PsiTreeUtil.getNextSiblingOfType(label, PsiStatement.class); if (nextStatement instanceof PsiSwitchLabelStatement) { return false; } PsiStatement prevStatement = PsiTreeUtil.getPre...
shouldRemoveBranch
71,598
Presentation (@NotNull ActionContext context, @NotNull PsiCaseLabelElement element) { return Presentation.of(myBranch ? JavaAnalysisBundle.message("remove.switch.branch.0", myName) : JavaAnalysisBundle.message("remove.switch.label.0", myName)); }
getPresentation
71,599
String () { return JavaAnalysisBundle.message("remove.switch.label"); }
getFamilyName