Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
266,800
List<CompletionContributor> (@NotNull Language language) { return INSTANCE.forKey(language); }
forLanguage
266,801
List<CompletionContributor> (@NotNull Language language, @NotNull Project project) { return DumbService.getInstance(project).filterByDumbAwareness(forLanguage(language)); }
forLanguageHonorDumbness
266,802
double () { return myPriority; }
getPriority
266,803
int () { return myGrouping; }
getGrouping
266,804
int () { return myExplicitProximity; }
getExplicitProximity
266,805
LookupElement (@NotNull LookupElement element, double priority) { PrioritizedLookupElement<?> prioritized = element.as(CLASS_CONDITION_KEY); LookupElement finalElement = prioritized != element ? element : prioritized.getDelegate(); int proximity = prioritized == null ? 0 : prioritized.getExplicitProximity(); int groupi...
withPriority
266,806
LookupElement (@NotNull LookupElement element, int grouping) { PrioritizedLookupElement<?> prioritized = element.as(CLASS_CONDITION_KEY); LookupElement finalElement = prioritized != element ? element : prioritized.getDelegate(); double priority = prioritized == null ? 0 : prioritized.getPriority(); int proximity = prio...
withGrouping
266,807
LookupElement (@NotNull LookupElement element, int explicitProximity) { PrioritizedLookupElement<?> prioritized = element.as(CLASS_CONDITION_KEY); double priority = prioritized == null ? 0 : prioritized.getPriority(); int grouping = prioritized == null ? 0 : prioritized.getGrouping(); LookupElement finalElement = prior...
withExplicitProximity
266,808
ThreeState (@NotNull PsiElement contextElement, @NotNull PsiFile psiFile, int offset) { return ThreeState.UNSURE; }
shouldSkipAutopopup
266,809
boolean (final InsertionContext context, final LookupElement item) { return true; }
placeCaretInsideParentheses
266,810
boolean (final InsertionContext context, final LookupElement item) { return false; }
placeCaretInsideParentheses
266,811
ParenthesesInsertHandler<LookupElement> (boolean hasParameters) { return hasParameters ? WITH_PARAMETERS : NO_PARAMETERS; }
getInstance
266,812
ParenthesesInsertHandler<LookupElement> (final boolean hasParameters, final boolean spaceBeforeParentheses, final boolean spaceBetweenParentheses, final boolean insertRightParenthesis, boolean allowParametersOnNextLine) { return new ParenthesesInsertHandler<>(spaceBeforeParentheses, spaceBetweenParentheses, insertRight...
getInstance
266,813
boolean (InsertionContext context, LookupElement item) { return hasParameters; }
placeCaretInsideParentheses
266,814
boolean (final @Nullable PsiElement element, final String text) { return element != null && text.equals(element.getText()); }
isToken
266,815
void (final @NotNull InsertionContext context, final @NotNull T item) { final char completionChar = context.getCompletionChar(); final Editor editor = context.getEditor(); if (completionChar != myLeftParenthesis && !editor.getSettings().isInsertParenthesesAutomatically()) return; final Document document = editor.getDoc...
handleInsert
266,816
String (boolean needSpace) { return needSpace ? " " : ""; }
getSpace
266,817
String () { if (myContextId == null) { throw new AssertionError("contextId must be set for liveTemplateContext " + this); } return myContextId; }
getContextId
266,818
boolean (@NotNull PsiFile file, int offset) { throw new RuntimeException("Please, implement isInContext(TemplateActionContext) method and don't invoke this method directly"); }
isInContext
266,819
boolean (@NotNull TemplateActionContext templateActionContext) { return isInContext(templateActionContext.getFile(), templateActionContext.getStartOffset()); }
isInContext
266,820
boolean () { return true; }
isExpandableFromEditor
266,821
Document (CharSequence text, Project project) { return EditorFactory.getInstance().createDocument(text); }
createDocument
266,822
boolean (@NotNull PsiFile file, int offset) { return true; }
isInContext
266,823
Collection<LiveTemplateContext> () { return myLiveTemplateIds.values(); }
getLiveTemplateContexts
266,824
PsiFile () { return myFile; }
getFile
266,825
boolean () { return myIsSurrounding; }
isSurrounding
266,826
TemplateActionContext (@NotNull PsiFile file) { return new TemplateActionContext(file, myEditor, myStartOffset, myEndOffset, myIsSurrounding); }
withFile
266,827
int () { return myStartOffset; }
getStartOffset
266,828
int () { return myEndOffset; }
getEndOffset
266,829
TemplateActionContext (@NotNull PsiFile psiFile, @NotNull Editor editor) { int editorOffset = editor.getCaretModel().getOffset(); return create(psiFile, editor, editorOffset, editorOffset, false); }
expanding
266,830
TemplateActionContext (@NotNull PsiFile psiFile, int offset) { return create(psiFile, null, offset, offset, false); }
expanding
266,831
TemplateActionContext (@NotNull PsiFile psiFile, @NotNull Editor editor) { SelectionModel selectionModel = editor.getSelectionModel(); int start = selectionModel.getSelectionStart(); int end = selectionModel.getSelectionEnd(); PsiElement startElement = psiFile.findElementAt(start); if (startElement instanceof PsiWhiteS...
surrounding
266,832
TemplateActionContext (@NotNull PsiFile psiFile, @Nullable Editor editor, int startOffset, int endOffset, boolean isSurrounding) { return new TemplateActionContext(psiFile, editor, startOffset, endOffset, isSurrounding); }
create
266,833
LiveTemplateContextService () { return ApplicationManager.getApplication().getService(LiveTemplateContextService.class); }
getInstance
266,834
TemplateContextType (@NotNull String id) { LiveTemplateContext context = getLiveTemplateContext(id); if (context == null) throw new LiveTemplateContextNotFoundException("Unable to find LiveTemplateContext with contextId " + id); return context.getTemplateContextType(); }
getTemplateContextType
266,835
TemplateContextType (@NotNull Class<?> clazz) { LiveTemplateContext context = getLiveTemplateContext(clazz); if (context == null) throw new LiveTemplateContextNotFoundException("Unable to find LiveTemplateContext with class " + clazz); return context.getTemplateContextType(); }
getTemplateContextType
266,836
void () { ApplicationManager.getApplication().assertWriteAccessAllowed(); // reset previously calculated base contexts for (LiveTemplateContext liveTemplateContext : myState.myLiveTemplateIds.values()) { liveTemplateContext.getTemplateContextType().clearCachedBaseContextType(); } myState = loadLiveTemplateContextsNoLoc...
reloadLiveTemplateContexts
266,837
LiveTemplateContextsState () { List<LiveTemplateContextBean> allBeans = LiveTemplateContextBean.EP_NAME.getExtensionList(); Map<String, LiveTemplateContext> allIdsMap = new LinkedHashMap<>(); for (LiveTemplateContextBean bean : allBeans) { allIdsMap.put(bean.getContextId(), bean); } for (LiveTemplateContextProvider pro...
loadLiveTemplateContextsNoLock
266,838
LiveTemplateContextsSnapshot () { return new LiveTemplateContextsSnapshot(myState.myLiveTemplateIds); // myLiveTemplateIds is immutable }
getSnapshot
266,839
void () { }
dispose
266,840
String () { if (contextId == null) { TemplateContextType instance = getInstance(); return instance.myContextId; } return contextId; }
getContextId
266,841
TemplateContextType () { return getInstance(); }
getTemplateContextType
266,842
TemplateContextType (@NotNull ComponentManager componentManager, @NotNull PluginDescriptor pluginDescriptor) { TemplateContextType instance = super.createInstance(componentManager, pluginDescriptor); if (instance.myContextId == null) { // new declaration syntax instance.myContextId = contextId; if (!EVERYWHERE_CONTEXT_...
createInstance
266,843
String () { return "LiveTemplateContextBean{" + "contextId='" + contextId + '\'' + ", baseContextId='" + baseContextId + '\'' + ", implementationClass='" + implementationClass + '\'' + '}'; }
toString
266,844
boolean () { return true; }
requiresCommittedPSI
266,845
LookupFocusDegree () { return LookupFocusDegree.FOCUSED; }
getLookupFocusDegree
266,846
boolean (String text, PsiElement context) { return text.equals(myText); }
equalsToText
266,847
String () { return myText; }
toString
266,848
void (final PsiFile psiFile, final Document document, final int segmentStart, final int segmentEnd) { }
handleFocused
266,849
boolean (TemplateContextType context) { return true; }
isAcceptableInContext
266,850
LookupFocusDegree () { return LookupFocusDegree.FOCUSED; }
getLookupFocusDegree
266,851
TemplateBuilderFactory () { return ApplicationManager.getApplication().getService(TemplateBuilderFactory.class); }
getInstance
266,852
ConstantNode (LookupElement @NotNull ... lookupElements) { return new ConstantNode(myValue, lookupElements); }
withLookupItems
266,853
ConstantNode (@NotNull Collection<? extends LookupElement> lookupElements) { return new ConstantNode(myValue, lookupElements.toArray(LookupElement.EMPTY_ARRAY)); }
withLookupItems
266,854
ConstantNode (String @NotNull ... lookupElements) { return new ConstantNode(myValue, ContainerUtil.map2Array(lookupElements, LookupElement.class, LookupElementBuilder::create)); }
withLookupStrings
266,855
ConstantNode (@NotNull Collection<String> lookupElements) { return new ConstantNode(myValue, ContainerUtil.map2Array(lookupElements, LookupElement.class, LookupElementBuilder::create)); }
withLookupStrings
266,856
ConstantNode (@Nullable @NlsContexts.PopupAdvertisement String popupAdvertisement) { return new ConstantNode(myValue, popupAdvertisement, myLookupElements); }
withPopupAdvertisement
266,857
Result (ExpressionContext context) { return myValue; }
calculateResult
266,858
boolean () { return false; }
requiresCommittedPSI
266,859
LookupElement[] (ExpressionContext context) { return myLookupElements; }
calculateLookupItems
266,860
TabOutScopesTracker () { return ApplicationManager.getApplication().getService(TabOutScopesTracker.class); }
getInstance
266,861
T () { return myDelegate; }
getDelegate
266,862
boolean () { return myDelegate.isValid() && super.isValid(); }
isValid
266,863
String () { return myDelegate.getLookupString(); }
getLookupString
266,864
Set<String> () { return myDelegate.getAllLookupStrings(); }
getAllLookupStrings
266,865
Object () { return myDelegate.getObject(); }
getObject
266,866
void (@NotNull InsertionContext context) { InsertHandler<? super LookupElementDecorator<@NotNull T>> decoratorInsertHandler = getDecoratorInsertHandler(); if (decoratorInsertHandler != null) { decoratorInsertHandler.handleInsert(context, this); return; } InsertHandler<T> delegateInsertHandler = getDelegateInsertHandler...
handleInsert
266,867
AutoCompletionPolicy () { return myDelegate.getAutoCompletionPolicy(); }
getAutoCompletionPolicy
266,868
String () { return myDelegate.toString(); }
toString
266,869
void (@NotNull LookupElementPresentation presentation) { myDelegate.renderElement(presentation); }
renderElement
266,870
void (LookupElementDecorator<?> element, LookupElementPresentation presentation) { //noinspection unchecked renderer.renderElement(element.myDelegate, presentation); }
renderElement
266,871
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; LookupElementDecorator that = (LookupElementDecorator)o; if (!myDelegate.equals(that.myDelegate)) return false; return true; }
equals
266,872
int () { return myDelegate.hashCode(); }
hashCode
266,873
boolean () { return myDelegate.isCaseSensitive(); }
isCaseSensitive
266,874
boolean () { return myDelegate.isWorthShowingInAutoPopup(); }
isWorthShowingInAutoPopup
266,875
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; InsertingDecorator<?> that = (InsertingDecorator<?>)o; if (!myInsertHandler.equals(that.myInsertHandler)) return false; return true; }
equals
266,876
int () { int result = super.hashCode(); result = 31 * result + myInsertHandler.hashCode(); return result; }
hashCode
266,877
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; InsertingDelegateDecorator<?> that = (InsertingDelegateDecorator<?>)o; if (!myInsertHandler.equals(that.myInsertHandler)) return false; return true; }
equals
266,878
int () { int result = super.hashCode(); result = 31 * result + myInsertHandler.hashCode(); return result; }
hashCode
266,879
void (final @NotNull LookupElementPresentation presentation) { myVisagiste.renderElement(this, presentation); }
renderElement
266,880
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; VisagisteDecorator that = (VisagisteDecorator)o; if (!myVisagiste.getClass().equals(that.myVisagiste.getClass())) return false; return true; }
equals
266,881
int () { int result = super.hashCode(); result = 31 * result + myVisagiste.getClass().hashCode(); return result; }
hashCode
266,882
LookupElement (@NotNull LookupElement element) { return new PolicyDecorator(element, this); }
applyPolicy
266,883
AutoCompletionPolicy () { return myPolicy; }
getAutoCompletionPolicy
266,884
String (String string) { StringUtil.assertValidSeparators(string); return string; }
validate
266,885
LookupElementBuilder (@NotNull String lookupString) { return new LookupElementBuilder(lookupString, lookupString); }
create
266,886
LookupElementBuilder (@NotNull Object object) { return new LookupElementBuilder(object.toString(), object); }
create
266,887
LookupElementBuilder (@NotNull String lookupString, @NotNull PsiElement element) { PsiUtilCore.ensureValid(element); return new LookupElementBuilder(lookupString, SmartPointerManager.getInstance(element.getProject()).createSmartPsiElementPointer(element)); }
createWithSmartPointer
266,888
LookupElementBuilder (@NotNull PsiNamedElement element) { PsiUtilCore.ensureValid(element); return new LookupElementBuilder(StringUtil.notNullize(element.getName()), element); }
create
266,889
LookupElementBuilder (@NotNull PsiNamedElement element) { PsiUtilCore.ensureValid(element); return create(element).withIcon(element.getIcon(0)); }
createWithIcon
266,890
LookupElementBuilder (@NotNull Object lookupObject, @NotNull String lookupString) { if (lookupObject instanceof PsiElement) { PsiUtilCore.ensureValid((PsiElement)lookupObject); } return new LookupElementBuilder(lookupString, lookupObject); }
create
266,891
LookupElementBuilder (@NotNull String lookupString, @NotNull Object object, @Nullable InsertHandler<LookupElement> insertHandler, @Nullable LookupElementRenderer<LookupElement> renderer, @Nullable LookupElementRenderer<LookupElement> expensiveRenderer, @Nullable LookupElementPresentation hardcodedPresentation, @Nullabl...
cloneWithUserData
266,892
LookupElementBuilder (@Nullable InsertHandler<LookupElement> insertHandler) { return cloneWithUserData(myLookupString, myObject, insertHandler, myRenderer, myExpensiveRenderer, myHardcodedPresentation, myPsiElement, myAllLookupStrings, myCaseSensitive); }
withInsertHandler
266,893
LookupElementBuilder (@Nullable LookupElementRenderer<LookupElement> renderer) { return cloneWithUserData(myLookupString, myObject, myInsertHandler, renderer, myExpensiveRenderer, myHardcodedPresentation, myPsiElement, myAllLookupStrings, myCaseSensitive); }
withRenderer
266,894
LookupElementBuilder (@Nullable LookupElementRenderer<LookupElement> expensiveRenderer) { return cloneWithUserData(myLookupString, myObject, myInsertHandler, myRenderer, expensiveRenderer, myHardcodedPresentation, myPsiElement, myAllLookupStrings, myCaseSensitive); }
withExpensiveRenderer
266,895
Set<String> () { return myAllLookupStrings; }
getAllLookupStrings
266,896
LookupElementBuilder (@Nullable Icon icon) { final LookupElementPresentation presentation = copyPresentation(); presentation.setIcon(icon); return cloneWithUserData(myLookupString, myObject, myInsertHandler, null, myExpensiveRenderer, presentation, myPsiElement, myAllLookupStrings, myCaseSensitive); }
withIcon
266,897
LookupElementPresentation () { final LookupElementPresentation presentation = new LookupElementPresentation(); if (myHardcodedPresentation != null) { presentation.copyFrom(myHardcodedPresentation); } else { presentation.setItemText(myLookupString); } return presentation; }
copyPresentation
266,898
LookupElementBuilder (@NotNull String another) { final Set<String> set = new HashSet<>(myAllLookupStrings); set.add(another); return cloneWithUserData(myLookupString, myObject, myInsertHandler, myRenderer, myExpensiveRenderer, myHardcodedPresentation, myPsiElement, Collections.unmodifiableSet(set), myCaseSensitive); }
withLookupString
266,899
LookupElementBuilder (@NotNull String lookupString) { return cloneWithUserData(lookupString, myObject, myInsertHandler, myRenderer, myExpensiveRenderer, myHardcodedPresentation, myPsiElement, myAllLookupStrings, myCaseSensitive); }
withBaseLookupString