Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
54,200
JComponent () { return contentPane; }
createContentPane
54,201
IntroduceTypeAliasDescriptor () { return originalDescriptor.copy( originalDescriptor.getOriginalData(), getAliasName(), getVisibility(), parameterTablePanel != null ? parameterTablePanel.getSelectedTypeParameters() : Collections.emptyList() ); }
createDescriptor
54,202
IntroduceTypeAliasDescriptor () { return currentDescriptor; }
getCurrentDescriptor
54,203
Boolean () { return true; }
invoke
54,204
boolean () { return condition.invoke(); }
isAvailable
54,205
void () { initializer.accept(getComponent()); }
initialize
54,206
JComponent () { if (component == null) { component = factory.invoke(); } return component; }
getComponent
54,207
String () { return null; }
getAdvertisementActionId
54,208
JPanel () { if (contentPanel == null) { contentPanel = new JPanel(new GridBagLayout()); contentPanel.setBorder(null); } return contentPanel; }
getContentPanel
54,209
void (@NotNull ControlWrapper panelControl) { panelControls.add(panelControl); }
addPanelControl
54,210
void (@Nullable Function0<JComponent> initializer) { if (initializer != null) { addPanelControl(new ControlWrapper(initializer)); } }
addPanelControl
54,211
void () { addPanelControl(getCreateVarCheckBox()); addPanelControl(getCreateExplicitTypeCheckBox()); }
initPanelControls
54,212
void () { JPanel panel = getContentPanel(); panel.removeAll(); int count = 1; for (ControlWrapper panelControl : panelControls) { if (!panelControl.isAvailable()) continue; panelControl.initialize(); panel.add(panelControl.getComponent(), new GridBagConstraints(0, count, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBa...
updatePanelControls
54,213
JComponent () { panelControls.clear(); initPanelControls(); updatePanelControls(); return getContentPanel(); }
getComponent
54,214
Function0<JComponent> () { if (myExprType == null || noTypeInference) return null; return new Function0<>() { @Override public JComponent invoke() { final JCheckBox exprTypeCheckbox = new NonFocusableCheckBox( KotlinBundle.message("checkbox.text.specify.type.explicitly")); exprTypeCheckbox.setSelected(false); exprTypeC...
getCreateExplicitTypeCheckBox
54,215
JComponent () { final JCheckBox exprTypeCheckbox = new NonFocusableCheckBox( KotlinBundle.message("checkbox.text.specify.type.explicitly")); exprTypeCheckbox.setSelected(false); exprTypeCheckbox.addActionListener(new ActionListener() { @Override public void actionPerformed(@NotNull ActionEvent e) { runWriteActionAndRes...
invoke
54,216
void (@NotNull ActionEvent e) { runWriteActionAndRestartRefactoring( () -> { if (exprTypeCheckbox.isSelected()) { String renderedType = IdeDescriptorRenderers.SOURCE_CODE_SHORT_NAMES_NO_ANNOTATIONS.renderType(myExprType); myDeclaration.setTypeReference(new KtPsiFactory(myProject).createType(renderedType)); } else { myD...
actionPerformed
54,217
Function0<JComponent> () { if (myDoNotChangeVar) return null; return new Function0<>() { @Override public JComponent invoke() { final JCheckBox varCheckbox = new NonFocusableCheckBox(KotlinBundle.message("checkbox.text.declare.with.var")); varCheckbox.setSelected(isVar); varCheckbox.addActionListener(new ActionListener...
getCreateVarCheckBox
54,218
JComponent () { final JCheckBox varCheckbox = new NonFocusableCheckBox(KotlinBundle.message("checkbox.text.declare.with.var")); varCheckbox.setSelected(isVar); varCheckbox.addActionListener(new ActionListener() { @Override public void actionPerformed(@NotNull ActionEvent e) { runWriteCommandAction(myProject, getCommand...
invoke
54,219
void (@NotNull ActionEvent e) { runWriteCommandAction(myProject, getCommandName(), getCommandName(), () -> { PsiDocumentManager.getInstance(myProject).commitDocument(myEditor.getDocument()); KtPsiFactory psiFactory = new KtPsiFactory(myProject); PsiElement keyword = varCheckbox.isSelected() ? psiFactory.createVarKeywor...
actionPerformed
54,220
void (final Runnable runnable) { final Ref<Boolean> greedyToRight = new Ref<>(); runWriteCommandAction(myProject, getCommandName(), getCommandName(), () -> { PsiDocumentManager.getInstance(myProject).commitDocument(myEditor.getDocument()); ASTNode identifier = myDeclaration.getNode().findChildByType(KtTokens.IDENTIFIER...
runWriteActionAndRestartRefactoring
54,221
LinkedHashSet<String> () { LinkedHashSet<String> nameSuggestions; String currentName = myDeclaration.getName(); if (myNameSuggestions.contains(currentName)) { nameSuggestions = myNameSuggestions; } else { nameSuggestions = new LinkedHashSet<>(); nameSuggestions.add(currentName); nameSuggestions.addAll(myNameSuggestions...
getSuggestionsForNextRun
54,222
void () { getContentPanel().revalidate(); if (myTarget != null) { myBalloon.revalidate(new PositionTracker.Static<>(myTarget)); } }
revalidate
54,223
void (TemplateBuilderImpl builder) { KtTypeReference typeReference = myDeclaration.getTypeReference(); Expression expression = SpecifyTypeExplicitlyIntention.Companion.createTypeExpressionForTemplate(myExprType, myDeclaration, false); if (typeReference != null && expression != null) { builder.replaceElement(typeReferen...
addTypeReferenceVariable
54,224
void (TemplateBuilderImpl builder) { addTypeReferenceVariable(builder); }
addAdditionalVariables
54,225
boolean ( @NotNull Collection<PsiReference> refs, @NotNull Collection<Pair<PsiElement, TextRange>> stringUsages, @NotNull PsiElement scope, @NotNull PsiFile containingFile ) { myEditor.putUserData(INTRODUCE_RESTART, false); //noinspection ConstantConditions myEditor.getCaretModel().moveToOffset(getNameIdentifier().getT...
buildTemplateAndStart
54,226
Collection<PsiReference> (SearchScope referencesSearchScope) { return CollectionsKt.map( ArraysKt.filterIsInstance(getOccurrences(), KtSimpleNameExpression.class), new Function1<>() { @Override public PsiReference invoke(KtSimpleNameExpression expression) { return ReferenceUtilsKt.getMainReference(expression); } } ); }
collectRefs
54,227
PsiReference (KtSimpleNameExpression expression) { return ReferenceUtilsKt.getMainReference(expression); }
invoke
54,228
boolean (LinkedHashSet<String> nameSuggestions) { if (super.performInplaceRefactoring(nameSuggestions)) { myEditor.putUserData(ACTIVE_INTRODUCER, this); return true; } return false; }
performInplaceRefactoring
54,229
void (boolean success) { super.finish(success); myEditor.putUserData(ACTIVE_INTRODUCER, null); }
finish
54,230
void (boolean success) { if (!myReplaceOccurrence || myExprMarker == null) { myEditor.getCaretModel().moveToOffset(myDeclaration.getTextRange().getEndOffset()); } else { int startOffset = myExprMarker.getStartOffset(); PsiFile file = myDeclaration.getContainingFile(); PsiElement elementAt = file.findElementAt(startOffs...
moveOffsetAfter
54,231
void () { final TemplateState templateState = TemplateManagerImpl.getTemplateState(myEditor); if (templateState != null) { Runnable runnable = () -> templateState.gotoEnd(true); CommandProcessor.getInstance().executeCommand(myProject, runnable, getCommandName(), getCommandName()); } }
stopIntroduce
54,232
KotlinInplaceVariableIntroducer (@NotNull Editor editor) { return editor.getUserData(ACTIVE_INTRODUCER); }
getActiveInstance
54,233
String () { return "#org.jetbrains.kotlin.idea.refactoring.safeDelete.KotlinOverridingDialog"; }
getDimensionServiceKey
54,234
List<UsageInfo> () { List<UsageInfo> result = new ArrayList<>(); for (int i = 0; i < myChecked.length; i++) { if (myChecked[i]) { result.add(myOverridingMethods.get(i)); } } return result; }
getSelected
54,235
Action[] () { return new Action[] {getOKAction(), getCancelAction()}; }
createActions
54,236
void () { HelpManager.getInstance().invokeHelp(HelpID.SAFE_DELETE_OVERRIDING); }
doHelpAction
54,237
JComponent () { JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); panel.add(new JLabel(KotlinBundle.message("override.declaration.unused.overriding.methods.description"))); panel.add(new JLabel(KotlinBundle.message("override.declaration.choose.to.delete"))); return panel; }
createNorthPanel
54,238
JComponent () { return myTable; }
getPreferredFocusedComponent
54,239
void () { Disposer.dispose(myUsagePreviewPanel); super.dispose(); }
dispose
54,240
JComponent () { JPanel panel = new JPanel(new BorderLayout()); panel.setBorder(BorderFactory.createEmptyBorder(8, 0, 4, 0)); final MyTableModel tableModel = new MyTableModel(); myTable = new JBTable(tableModel); myTable.setShowGrid(false); TableColumnModel columnModel = myTable.getColumnModel(); int checkBoxWidth = new...
createCenterPanel
54,241
void (ActionEvent e) { if (myTable.isEditing()) return; int[] rows = myTable.getSelectedRows(); if (rows.length > 0) { boolean valueToBeSet = false; for (int row : rows) { if (!myChecked[row]) { valueToBeSet = true; break; } } for (int row : rows) { myChecked[row] = valueToBeSet; } tableModel.updateData(); } }
actionPerformed
54,242
void (ListSelectionEvent e) { int index = myTable.getSelectionModel().getLeadSelectionIndex(); if (index != -1) { UsageInfo usageInfo = myOverridingMethods.get(index); myUsagePreviewPanel.updateLayout(Collections.singletonList(usageInfo)); } else { myUsagePreviewPanel.updateLayout(null); } }
valueChanged
54,243
void () { splitter.dispose(); }
dispose
54,244
int () { return myChecked.length; }
getRowCount
54,245
String (int column) { if (column == CHECK_COLUMN) { return " "; } return KotlinBundle.message("override.declaration.member"); }
getColumnName
54,246
Class (int columnIndex) { return columnIndex == CHECK_COLUMN ? Boolean.class : String.class; }
getColumnClass
54,247
int () { return 2; }
getColumnCount
54,248
Object (int rowIndex, int columnIndex) { if (columnIndex == CHECK_COLUMN) { return Boolean.valueOf(myChecked[rowIndex]); } else { return myMethodText[rowIndex]; } }
getValueAt
54,249
void (Object aValue, int rowIndex, int columnIndex) { if (columnIndex == CHECK_COLUMN) { myChecked[rowIndex] = ((Boolean) aValue).booleanValue(); } }
setValueAt
54,250
boolean (int rowIndex, int columnIndex) { return columnIndex == CHECK_COLUMN; }
isCellEditable
54,251
void (JComboBox classCombo) { classCombo.setRenderer(new KotlinOrJavaClassCellRenderer()); classCombo.addItemListener( new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { if (myMemberSelectionPanel == null) return; AbstractMemberSelectionTable<KtNam...
initClassCombo
54,252
void (ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { if (myMemberSelectionPanel == null) return; AbstractMemberSelectionTable<KtNamedDeclaration, KotlinMemberInfo> table = myMemberSelectionPanel.getTable(); if (table == null) return; table.setMemberInfos(myMemberInfos); table.fireExternalDataChange(); }...
itemStateChanged
54,253
void (char c, PsiFile file, Editor editor) { int offset = editor.getCaretModel().getOffset() - 1; deleteGt = c == '<' && file instanceof KtFile && (isAfterToken(offset, editor, KtTokens.FUN_KEYWORD) || isAfterToken(offset, editor, KtTokens.IDENTIFIER)); }
beforeCharDeleted
54,254
boolean (char c, PsiFile file, Editor editor) { int offset = editor.getCaretModel().getOffset(); CharSequence chars = editor.getDocument().getCharsSequence(); if (editor.getDocument().getTextLength() <= offset) return false; //virtual space after end of file char c1 = chars.charAt(offset); if (c == '<' && deleteGt) { i...
charDeleted
54,255
boolean () { return donTShowConversionDialog; }
isDonTShowConversionDialog
54,256
void (boolean donTShowConversionDialog) { this.donTShowConversionDialog = donTShowConversionDialog; }
setDonTShowConversionDialog
54,257
boolean () { return autoAddValKeywordToDataClassParameters; }
isAutoAddValKeywordToDataClassParameters
54,258
void (boolean autoAddValKeywordToDataClassParameters) { this.autoAddValKeywordToDataClassParameters = autoAddValKeywordToDataClassParameters; }
setAutoAddValKeywordToDataClassParameters
54,259
boolean () { return enableJavaToKotlinConversion; }
isEnableJavaToKotlinConversion
54,260
void (boolean enableJavaToKotlinConversion) { this.enableJavaToKotlinConversion = enableJavaToKotlinConversion; }
setEnableJavaToKotlinConversion
54,261
KotlinEditorOptions () { return this; }
getState
54,262
void (@NotNull KotlinEditorOptions state) { XmlSerializerUtil.copyBean(state, this); }
loadState
54,263
KotlinEditorOptions () { return ApplicationManager.getApplication().getService(KotlinEditorOptions.class); }
getInstance
54,264
Object () { try { return super.clone(); } catch (CloneNotSupportedException e) { return null; } }
clone
54,265
void (Editor editor) { TypedHandlerUtil.handleAfterGenericLT(editor, KtTokens.LT, KtTokens.GT, INVALID_INSIDE_REFERENCE); }
handleKotlinAutoCloseLT
54,266
boolean (Editor editor) { return TypedHandlerUtil.handleGenericGT(editor, KtTokens.LT, KtTokens.GT, INVALID_INSIDE_REFERENCE); }
handleKotlinGTInsert
54,267
void (Editor editor, int offset) { TypedHandlerUtil.handleGenericLTDeletion(editor, offset, KtTokens.LT, KtTokens.GT, INVALID_INSIDE_REFERENCE); }
handleKotlinLTDeletion
54,268
boolean (int offset, Editor editor) { return isAfterClassIdentifier(offset, editor) || isAfterToken(offset, editor, KtTokens.FUN_KEYWORD); }
shouldAutoCloseAngleBracket
54,269
boolean (int offset, Editor editor) { HighlighterIterator iterator = editor.getHighlighter().createIterator(offset); if (iterator.atEnd()) { return false; } if (iterator.getStart() > 0) { iterator.retreat(); } return TypedHandlerUtil.isClassLikeIdentifier(offset, editor, iterator, KtTokens.IDENTIFIER); }
isAfterClassIdentifier
54,270
boolean (int offset, Editor editor, KtToken tokenType) { HighlighterIterator iterator = editor.getHighlighter().createIterator(offset); if (iterator.atEnd()) { return false; } if (iterator.getStart() > 0) { iterator.retreat(); } if (iterator.getTokenType() == KtTokens.WHITE_SPACE && iterator.getStart() > 0) { iterator....
isAfterToken
54,271
void (@NotNull Project project, @NotNull AnalysisScope scope) { try { runInspections(project, scope); } finally { myGlobalInspectionContext = null; myExternalProfile = null; } }
analyze
54,272
void (Project project, AnalysisScope scope) { scope.setSearchInLibraries(false); FileDocumentManager.getInstance().saveAllDocuments(); GlobalInspectionContextImpl inspectionContext = getGlobalInspectionContext(project); InspectionManagerEx managerEx = (InspectionManagerEx) InspectionManager.getInstance(project); myExte...
runInspections
54,273
GlobalInspectionContextImpl (Project project) { if (myGlobalInspectionContext == null) { myGlobalInspectionContext = ((InspectionManagerEx) InspectionManager.getInstance(project)).createNewGlobalContext(false); } return myGlobalInspectionContext; }
getGlobalInspectionContext
54,274
String () { return "reference.dialogs.inspection.scope"; }
getHelpTopic
54,275
void () { super.canceled(); myGlobalInspectionContext = null; }
canceled
54,276
boolean (@NotNull ConfigurationFromContext self, ConfigurationFromContext other) { return other.isProducedBy(TestNGConfigurationProducer.class); }
shouldReplace
54,277
boolean ( @NotNull TestNGConfiguration configuration, @NotNull ConfigurationContext context, @NotNull PsiElement element ) { KotlinTestFrameworkProvider.JavaEntity javaEntity = TestNgKotlinTestFrameworkProvider.getInstance().getJavaEntity(element); if (javaEntity == null || !hasDetectedTestFramework(javaEntity.getTestC...
isConfiguredByElement
54,278
boolean ( @NotNull TestNGConfiguration configuration, ConfigurationContext context, @NotNull Ref<PsiElement> sourceElement ) { // TODO: check TestNG Pattern running first, before method/class (see TestNGInClassConfigurationProducer for logic) // TODO: and PsiClassOwner not handled, which is in TestNGInClassConfiguratio...
setupConfigurationFromContext
54,279
void (ConfigurationFromContext configuration, @NotNull ConfigurationContext context, @NotNull Runnable startRunnable) { JavaTestEntity testEntity = TestNgKotlinTestFrameworkProvider.getInstance() .getJavaTestEntity(configuration.getSourceElement(), true); if (testEntity == null) { super.onFirstRun(configuration, contex...
onFirstRun
54,280
RunnerAndConfigurationSettings () { return configuration.getConfigurationSettings(); }
getConfigurationSettings
54,281
void (RunnerAndConfigurationSettings configurationSettings) { configuration.setConfigurationSettings(configurationSettings); }
setConfigurationSettings
54,282
PsiElement () { return lightElement; }
getSourceElement
54,283
ConfigurationFactory () { return TestNGConfigurationType.getInstance(); }
getConfigurationFactory
54,284
boolean ( TestNGConfiguration configuration, Location location, ConfigurationContext context, Project project, @Nullable PsiClass delegate, @Nullable PsiMethod method ) { if (delegate == null) { return false; } setupConfigurationModule(context, configuration); Module originalModule = configuration.getConfigurationModul...
configure
54,285
ClassBrowser ( Project project, ConfigurationModuleSelector moduleSelector, LabeledComponent<ModuleDescriptionsComboBox> moduleChooser ) { ClassFilter applicationClass = new ClassFilter() { @Override public boolean isAccepted(PsiClass aClass) { return aClass instanceof KtLightClass && ConfigurationUtil.MAIN_CLASS.value...
createApplicationClassBrowser
54,286
boolean (PsiClass aClass) { return aClass instanceof KtLightClass && ConfigurationUtil.MAIN_CLASS.value(aClass) && findMainMethod(aClass) != null; }
isAccepted
54,287
ClassFilter (Module module) { return applicationClass; }
createFilter
54,288
void (@NotNull PsiClass psiClass) { Module module = ModuleUtilCore.findModuleForPsiElement(psiClass); if (module != null && moduleSelector.isModuleAccepted(module)) { moduleChooser.getComponent().setSelectedModule(module); } }
onClassChosen
54,289
TreeClassChooser (ClassFilter.ClassFilterWithScope classFilter) { Project project = getProject(); return new TreeJavaClassChooserDialog(myTitle, project, classFilter.getScope(), classFilter, null, null, true) { @Override protected @Nullable PsiClass getSelectedFromTreeUserObject(DefaultMutableTreeNode node) { Object us...
createClassChooser
54,290
void (ActionEvent e) { commonProgramParameters.setModuleContext(moduleSelector.getModule()); }
actionPerformed
54,291
void (@NotNull KotlinRunConfiguration configuration) { commonProgramParameters.applyTo(configuration); moduleSelector.applyTo(configuration); String className = mainClass.getComponent().getText(); PsiClass aClass = moduleSelector.findClass(className); configuration.setRunClass(aClass != null ? JavaExecutionUtil.getRunt...
applyEditorTo
54,292
void (@NotNull KotlinRunConfiguration configuration) { commonProgramParameters.reset(configuration); moduleSelector.reset(configuration); String runClass = configuration.getRunClass(); mainClass.getComponent().setText(runClass != null ? runClass.replaceAll("\\$", "\\.") : ""); jrePathEditor.setPathOrName(configuration....
resetEditorFrom
54,293
JComponent () { return mainPanel; }
createEditor
54,294
void () { mainClass = new LabeledComponent<>(); mainClass.setComponent(new EditorTextFieldWithBrowseButton(project, true, (declaration, place) -> { if (declaration instanceof KtLightClass aClass) { if (ConfigurationUtil.MAIN_CLASS.value(aClass) && (PsiMethodUtil.findMainMethod(aClass) != null || place.getParent() != nu...
createUIComponents
54,295
JComponent () { return anchor; }
getAnchor
54,296
void (JComponent anchor) { this.anchor = anchor; mainClass.setAnchor(anchor); commonProgramParameters.setAnchor(anchor); jrePathEditor.setAnchor(anchor); moduleChooser.setAnchor(anchor); shortenClasspathModeCombo.setAnchor(anchor); }
setAnchor
54,297
void (@NotNull KotlinStandaloneScriptRunConfiguration configuration) { commonProgramParameters.reset(configuration); String path = configuration.filePath; chooseScriptFileTextField.setText(path != null ? path : ""); jrePathEditor.setPathOrName(configuration.getAlternativeJrePath(), configuration.isAlternativeJrePathEna...
resetEditorFrom
54,298
void (@NotNull KotlinStandaloneScriptRunConfiguration configuration) { commonProgramParameters.applyTo(configuration); configuration.setAlternativeJrePath(jrePathEditor.getJrePathOrName()); configuration.setAlternativeJrePathEnabled(jrePathEditor.isAlternativeJreSelected()); configuration.filePath = chooseScriptFileTex...
applyEditorTo
54,299
JComponent () { return mainPanel; }
createEditor