Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
250,800 | boolean (TemplateContext thisContext, LiveTemplateContextsSnapshot allContexts, LiveTemplateContext type) { return !thisContext.hasOwnValue(type) && !isEnabled(allContexts, thisContext, type) && JBIterable.generate(type, context -> allContexts.getLiveTemplateContext(context.getBaseContextId())).filter(this::hasOwnValue... | isDisabledByInheritance |
250,801 | boolean (LiveTemplateContext t) { return getOwnValue(t.getContextId()) != null; } | hasOwnValue |
250,802 | Element (@Nullable TemplateContext defaultContext) { return writeTemplateContext(defaultContext, getIdToType()); } | writeTemplateContext |
250,803 | boolean (@NotNull Boolean ownValue, @NotNull TemplateContextType type, @Nullable TemplateContext defaultContext) { Boolean defaultValue = defaultContext == null ? null : defaultContext.getOwnValue(type.getContextId()); if (defaultValue == null) { TemplateContextType base = type.getBaseContextType(); boolean baseEnabled... | isValueChanged |
250,804 | String () { return myContextStates.toString(); } | toString |
250,805 | String () { return StringUtil.notNullize(myExpressionString); } | getExpressionString |
250,806 | void (@Nullable String expressionString) { myExpressionString = expressionString; myExpression = null; } | setExpressionString |
250,807 | Expression () { if (myExpression == null) { if (myName.equals(Template.SELECTION)) { myExpression = new SelectionNode(); } else { myExpression = MacroParser.parse(myExpressionString); } } return myExpression; } | getExpression |
250,808 | String () { return StringUtil.notNullize(myDefaultValueString); } | getDefaultValueString |
250,809 | void (@Nullable String defaultValueString) { myDefaultValueString = defaultValueString; myDefaultValueExpression = null; } | setDefaultValueString |
250,810 | Expression () { if (myDefaultValueExpression == null) { myDefaultValueExpression = MacroParser.parse(myDefaultValueString); } return myDefaultValueExpression; } | getDefaultValueExpression |
250,811 | String () { return myName; } | getName |
250,812 | boolean () { if (myName.equals(Template.SELECTION)) return false; return myAlwaysStopAt; } | isAlwaysStopAt |
250,813 | void (boolean alwaysStopAt) { myAlwaysStopAt = alwaysStopAt; } | setAlwaysStopAt |
250,814 | Object () { return new Variable(myName, myExpressionString, myDefaultValueString, myAlwaysStopAt); } | clone |
250,815 | boolean (Object o) { if (this == o) return true; if (!(o instanceof Variable variable)) return false; if (myAlwaysStopAt != variable.myAlwaysStopAt) return false; if (mySkipOnStart != variable.mySkipOnStart) return false; if (myDefaultValueString != null ? !myDefaultValueString.equals(variable.myDefaultValueString) : v... | equals |
250,816 | int () { int result; result = myName.hashCode(); result = 29 * result + (myAlwaysStopAt ? 1 : 0); result = 29 * result + (mySkipOnStart ? 1 : 0); result = 29 * result + (myExpressionString != null ? myExpressionString.hashCode() : 0); result = 29 * result + (myDefaultValueString != null ? myDefaultValueString.hashCode(... | hashCode |
250,817 | String () { return "Variable{" + "myName='" + myName + '\'' + ", myAlwaysStopAt=" + myAlwaysStopAt + ", myExpressionString='" + myExpressionString + '\'' + ", myDefaultValueString='" + myDefaultValueString + '\'' + ", mySkipOnStart=" + mySkipOnStart + '}'; } | toString |
250,818 | boolean () { return mySkipOnStart; } | skipOnStart |
250,819 | Result (ExpressionContext context) { if (myInitialValue != null){ return myInitialValue.calculateQuickResult(context); } return context.getVariableValue(getName()); } | calculateResult |
250,820 | boolean () { return myInitialValue != null && myInitialValue.requiresCommittedPSI(); } | requiresCommittedPSI |
250,821 | LookupElement[] (ExpressionContext context) { if (myInitialValue == null){ return null; } return myInitialValue.calculateLookupItems(context); } | calculateLookupItems |
250,822 | String () { return myName; } | getName |
250,823 | boolean (Object o) { if (this == o) return true; if (!(o instanceof TemplateImpl template)) return false; if (myId != null && myId.equals(template.myId)) return true; if (isToReformat != template.isToReformat) return false; if (isToShortenLongNames != template.isToShortenLongNames) return false; if (myShortcutChar != t... | equals |
250,824 | int () { if (myId != null) { return myId.hashCode(); } int result; result = myKey.hashCode(); result = 29 * result + string().hashCode(); result = 29 * result + myGroupName.hashCode(); return result; } | hashCode |
250,825 | boolean () { return myIsInline; } | isInline |
250,826 | void (boolean isInline) { myIsInline = isInline; } | setInline |
250,827 | Variable (@NotNull Expression expression, boolean isAlwaysStopAt) { return addVariable("__Variable" + myVariables.size(), expression, isAlwaysStopAt); } | addVariable |
250,828 | Variable (@NotNull @NlsSafe String name, Expression expression, Expression defaultValueExpression, boolean isAlwaysStopAt, boolean skipOnStart) { if (isParsed() || !isToParseSegments()) { addVariableSegment(name); } Variable variable = new Variable(name, expression, defaultValueExpression, isAlwaysStopAt, skipOnStart);... | addVariable |
250,829 | Variable (@NotNull @NlsSafe String name, @NlsSafe String expression, @NlsSafe String defaultValue, boolean isAlwaysStopAt) { Variable variable = new Variable(name, expression, defaultValue, isAlwaysStopAt); myVariables.add(variable); return variable; } | addVariable |
250,830 | void (@NotNull Variable variable) { myVariables.add(variable); } | addVariable |
250,831 | void () { addVariableSegment(END); } | addEndVariable |
250,832 | void () { addVariableSegment(SELECTION_START); } | addSelectionStartVariable |
250,833 | void () { addVariableSegment(SELECTION_END); } | addSelectionEndVariable |
250,834 | TemplateImpl () { TemplateImpl template = new TemplateImpl(myKey, string(), myGroupName); template.resetFrom(this); return template; } | copy |
250,835 | void (TemplateImpl another) { removeAllParsed(); setToParseSegments(another.isToParseSegments()); myKey = another.getKey(); setString(another.string()); setTemplateText(another.templateText()); myGroupName = another.myGroupName; myId = another.myId; myDescription = another.myDescription; myShortcutChar = another.myShor... | resetFrom |
250,836 | boolean () { return isToReformat; } | isToReformat |
250,837 | void (boolean toReformat) { isToReformat = toReformat; } | setToReformat |
250,838 | void (boolean toIndent) { isToIndent = toIndent; } | setToIndent |
250,839 | boolean () { return isToIndent; } | isToIndent |
250,840 | boolean () { return isToShortenLongNames; } | isToShortenLongNames |
250,841 | void (boolean toShortenLongNames) { isToShortenLongNames = toShortenLongNames; } | setToShortenLongNames |
250,842 | void (boolean isDeactivated) { this.isDeactivated = isDeactivated; } | setDeactivated |
250,843 | boolean () { return isDeactivated; } | isDeactivated |
250,844 | TemplateContext () { return myTemplateContext; } | getTemplateContext |
250,845 | int () { return getVariableSegmentNumber(END); } | getEndSegmentNumber |
250,846 | void () { myVariables.clear(); clearSegments(); setToParseSegments(true); setBuildingTemplateTrace(new Throwable()); } | removeAllParsed |
250,847 | void (int i) { myVariables.remove(i); } | removeVariable |
250,848 | int () { return myVariables.size(); } | getVariableCount |
250,849 | boolean (int i) { return myVariables.get(i).isAlwaysStopAt(); } | isAlwaysStopAt |
250,850 | void (@NlsSafe String key) { myKey = key; } | setKey |
250,851 | void (@NlsContexts.DetailedDescription @Nullable String value) { value = StringUtil.notNullize(value).trim(); if (!StringUtil.equals(value, myDescription)) { myDescription = value; } } | setDescription |
250,852 | char () { return myShortcutChar; } | getShortcutChar |
250,853 | void (char shortcutChar) { myShortcutChar = shortcutChar; } | setShortcutChar |
250,854 | void (@NotNull @NonNls String groupName) { myGroupName = groupName; } | setGroupName |
250,855 | boolean () { for (Variable v : myVariables) { if (v.getName().equals(ARG)) return true; } return false; } | hasArgument |
250,856 | void (final @Nullable String id) { myId = id; } | setId |
250,857 | TemplateContext () { return getTemplateContext().createCopy(); } | createContext |
250,858 | void (final Map<TemplateOptionalProcessor, Boolean> context) { TemplateContext templateContext = getTemplateContext(); for (Map.Entry<TemplateOptionalProcessor, Boolean> entry : context.entrySet()) { TemplateOptionalProcessor key = entry.getKey(); if (key.isVisible(this, templateContext)) { key.setEnabled(this, entry.g... | applyOptions |
250,859 | void (final TemplateContext context) { myTemplateContext = context.createCopy(); } | applyContext |
250,860 | ArrayList<Variable> () { return new ArrayList<>(myVariables); } | getVariables |
250,861 | void (int segmentNumber) { Collections.swap(getSegments(), 0, segmentNumber); } | setPrimarySegment |
250,862 | String () { return myGroupName +"/" + myKey; } | toString |
250,863 | LookupElement[] (ExpressionContext context) { return LookupElement.EMPTY_ARRAY; } | calculateLookupItems |
250,864 | Result (ExpressionContext context) { final String selection = context.getProperty(ExpressionContext.SELECTION); return new TextResult(selection == null ? "" : selection); } | calculateResult |
250,865 | boolean () { return false; } | requiresCommittedPSI |
250,866 | List<TemplateContextType> () { return ContainerUtil.map(LiveTemplateContextService.getInstance().getLiveTemplateContexts(), LiveTemplateContext::getTemplateContextType); } | getAllContextTypes |
250,867 | boolean (Project project) { return false; } | isUndoOrRedoInProgress |
250,868 | void (TemplateState state, Project project, Document document) { } | registerUndoableAction |
250,869 | TextRange (PsiFile file, Document document, int offset) { return null; } | insertNewLineIndentMarker |
250,870 | PsiElement (PsiFile file, int offset) { return null; } | findWhiteSpaceNode |
250,871 | void (Project project, TemplateImpl template, Language language) { } | logTemplate |
250,872 | void (TemplateState state, Project project, Editor editor, LookupElement @NotNull [] items, Expression node) { } | runLookup |
250,873 | boolean () { return false; } | isLookupShown |
250,874 | boolean (Project project) { return true; } | skipSettingFinalEditorState |
250,875 | boolean (Editor editor, TemplateSegments segments, int currentSegmentNumber, String commandName) { return false; } | isCaretOutsideCurrentSegment |
250,876 | Project () { return myProject; } | getProject |
250,877 | int () { return myEditor.getCaretModel().getOffset(); } | getOffset |
250,878 | PsiFile () { Document document = myEditor.getDocument(); PsiFile psiFile = PsiDocumentManager.getInstance(myProject).getPsiFile(document); return Objects.requireNonNull(psiFile, () -> "Can't find a psi file for the " + document + " in " + myEditor); } | getPsiFile |
250,879 | Document () { return myEditor.getDocument(); } | getDocument |
250,880 | Project () { return myProject; } | getProject |
250,881 | void () { if (isDisposed()) return; myEditorDocumentListener = new DocumentListener() { @Override public void beforeDocumentChange(@NotNull DocumentEvent e) { if (CommandProcessor.getInstance().getCurrentCommand() != null && !isUndoOrRedoInProgress()) { myDocumentChanged = true; } } }; myLookupListener = new LookupList... | initListeners |
250,882 | void (@NotNull DocumentEvent e) { if (CommandProcessor.getInstance().getCurrentCommand() != null && !isUndoOrRedoInProgress()) { myDocumentChanged = true; } } | beforeDocumentChange |
250,883 | void (@NotNull LookupEvent event) { if (isCaretOutsideCurrentSegment(null)) { if (isCaretInsideOrBeforeNextVariable()) { nextTab(); } else { gotoEnd(true); } } } | itemSelected |
250,884 | void (@NotNull CommandEvent event) { if (!isUndoOrRedoInProgress()) { myDocumentChangesTerminateTemplate = isCaretOutsideCurrentSegment(event.getCommandName()); started = true; } } | commandStarted |
250,885 | void (@NotNull CommandEvent event) { if (started && !isDisposed() && !isUndoOrRedoInProgress()) { LookupUtil.performGuardedChange(getEditor(), () -> afterChangedUpdate()); } } | beforeCommandFinished |
250,886 | boolean () { return myLiveTemplateProcessor.isUndoOrRedoInProgress(myProject); } | isUndoOrRedoInProgress |
250,887 | void (@NotNull Editor editor) { CaretListener listener = new CaretListener() { @Override public void caretAdded(@NotNull CaretEvent e) { if (!isInteractiveModeSupported()) { finishTemplate(false); } } @Override public void caretRemoved(@NotNull CaretEvent e) { if (!isInteractiveModeSupported()) { finishTemplate(false);... | installCaretListener |
250,888 | void (@NotNull CaretEvent e) { if (!isInteractiveModeSupported()) { finishTemplate(false); } } | caretAdded |
250,889 | void (@NotNull CaretEvent e) { if (!isInteractiveModeSupported()) { finishTemplate(false); } } | caretRemoved |
250,890 | boolean () { if (getEditor() != null && myCurrentVariableNumber >= 0) { int nextVar = getNextVariableNumber(myCurrentVariableNumber); TextRange nextVarRange = nextVar < 0 ? null : getVariableRange(getTemplate().getVariableNameAt(nextVar)); if (nextVarRange == null) return false; int caretOffset = getEditor().getCaretMo... | isCaretInsideOrBeforeNextVariable |
250,891 | boolean (String commandName) { return myLiveTemplateProcessor.isCaretOutsideCurrentSegment(getEditor(), getSegments(), myCurrentSegmentNumber, commandName); } | isCaretOutsideCurrentSegment |
250,892 | boolean () { return getEditor() != null && getEditor().getCaretModel().getCaretCount() <= 1 && !(getEditor() instanceof ImaginaryEditor); } | isInteractiveModeSupported |
250,893 | boolean () { if (isCaretOutsideCurrentSegment(null)) { return false; } if (myLiveTemplateProcessor.isLookupShown()) { final Lookup lookup = LookupManager.getActiveLookup(getEditor()); if (lookup != null && !lookup.isFocused()) { return true; } } return !myLiveTemplateProcessor.isLookupShown(); } | isToProcessTab |
250,894 | void (int variableNumber) { myCurrentVariableNumber = variableNumber; final boolean isFinished = isFinished(); if (getDocument() != null) { ((DocumentEx)getDocument()).setStripTrailingSpacesEnabled(isFinished); } myCurrentSegmentNumber = isFinished ? -1 : getCurrentSegmentNumber(); } | setCurrentVariableNumber |
250,895 | int () { return getSegments().getSegmentsCount(); } | getSegmentsCount |
250,896 | TextRange (int segment) { return new TextRange(getSegments().getSegmentStart(segment), getSegments().getSegmentEnd(segment)); } | getSegmentRange |
250,897 | boolean () { return myCurrentVariableNumber < 0; } | isFinished |
250,898 | void () { if (getSegments() != null) { getSegments().removeAll(); setSegments(null); } if (myTemplateRange != null) { myTemplateRange.dispose(); myTemplateRange = null; } myPrevTemplate = getTemplate(); setTemplate(null); myProject = null; releaseEditor(); } | releaseAll |
250,899 | void () { if (getEditor() != null) { for (RangeHighlighter segmentHighlighter : myTabStopHighlighters) { segmentHighlighter.dispose(); } myTabStopHighlighters.clear(); setEditor(null); } } | releaseEditor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.