Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
264,600
RemoteAgentProxyFactory (ClassLoader callerClassLoader) { return new RemoteAgentReflectiveThreadProxyFactory(myClassLoaderCache, callerClassLoader); }
createReflectiveThreadProxyFactory
264,601
List<File> () { List<File> result = new ArrayList<>(myInstanceLibraries); List<Class<?>> allRtClasses = new ArrayList<>(myRtClasses); allRtClasses.add(RemoteAgent.class); allRtClasses.add(Base64.class); allRtClasses.add(myAgentInterface); for (Class<?> clazz : allRtClasses) { result.add(new File(PathUtil.getJarPathForC...
listLibraryFiles
264,602
Builder<T> (@NotNull Class<?> rtClass) { myRtClasses.add(rtClass); return this; }
withRtDependency
264,603
Builder<T> (@NotNull List<? extends File> libraries) { myInstanceLibraries.addAll(libraries); return this; }
withInstanceLibraries
264,604
Builder<T> (@NotNull String runtimeModuleName, @NotNull String buildPathToJar) { if (myRunningFromSources) { File specificsModule = new File(myAllPluginsRoot, runtimeModuleName); myModuleDependencies.add(specificsModule); } else { File specificsDir = new File(myAllPluginsRoot, FileUtil.toSystemDependentName(buildPathTo...
withModuleDependency
264,605
InvocationHandler (Object agentImpl, ClassLoader agentClassLoader, ClassLoader callerClassLoader) { return new ReflectiveInvocationHandler(agentImpl, agentClassLoader, callerClassLoader); }
createInvocationHandler
264,606
Object (Object proxy, final Method method, final Object[] args) { ClassLoader initialClassLoader = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(myTargetClassLoader); Class<?>[] parameterTypes = method.getParameterTypes(); Class<?>[] delegateParameterTypes = new Clas...
invoke
264,607
Object () { return myMirrorValue; }
getMirrorValue
264,608
URLClassLoader (Set<URL> libraryUrls) { URLClassLoader result = myUrls2ClassLoader.get(libraryUrls); if (result == null) { result = createClassLoaderWithoutApplicationParent(libraryUrls); myUrls2ClassLoader.put(libraryUrls, result); } return result; }
getOrCreateClassLoader
264,609
URLClassLoader (Set<URL> libraryUrls) { ClassLoader platformOrBootstrap = ClassLoader.getPlatformClassLoader(); LOG.info("platform class loader: " + platformOrBootstrap); return new URLClassLoader(libraryUrls.toArray(new URL[0]), platformOrBootstrap); }
createClassLoaderWithoutApplicationParent
264,610
URL[] (@NotNull Collection<? extends File> libraries) { List<File> files = collectFiles(libraries); URL[] result = new URL[files.size()]; for (int i = 0; i < files.size(); i++) { try { result[i] = files.get(i).toURI().toURL(); } catch (MalformedURLException e) { LOG.error(e); // should never happen } } return result; }
collect
264,611
List<File> (Collection<? extends File> libraries) { myFiles = new ArrayList<>(); for (File library : libraries) { if (library.exists()) { addFile(library); if (library.isDirectory()) { addLibraries(library); } } } return myFiles; }
collectFiles
264,612
void (@NotNull File dir) { LOG.debug("addLibraries: " + dir.getAbsolutePath() + ", exists: " + dir.exists()); File[] subFiles = dir.listFiles(); if (subFiles == null) { LOG.warn("Can't list files in " + dir); return; } for (File file : subFiles) { if (file.isDirectory()) { addLibraries(file); } else if (file.getName()....
addLibraries
264,613
void (@NotNull File file) { LOG.debug("addFile: " + file.getAbsolutePath() + ", exists: " + file.exists()); myFiles.add(file); }
addFile
264,614
Icon (@NotNull String path, int cacheKey, int flags) { return IconManager.getInstance().loadRasterizedIcon(path, RemoteServersIcons.class.getClassLoader(), cacheKey, flags); }
load
264,615
void (EditorColorsScheme scheme) { colorSettingsChanged(); }
globalSchemeChange
264,616
TodoConfiguration () { return ApplicationManager.getApplication().getService(TodoConfiguration.class); }
getInstance
264,617
void () { myTodoPatterns = getDefaultPatterns(); myTodoFilters = new TodoFilter[]{}; buildIndexPatterns(); }
resetToDefaultTodoPatterns
264,618
void () { myIndexPatterns = new IndexPattern[myTodoPatterns.length]; for (int i = 0; i < myTodoPatterns.length; i++) { myIndexPatterns[i] = myTodoPatterns[i].getIndexPattern(); } }
buildIndexPatterns
264,619
void (TodoPattern @NotNull [] todoPatterns) { doSetTodoPatterns(todoPatterns, true); }
setTodoPatterns
264,620
void (@NotNull TodoPattern @NotNull [] todoPatterns, boolean shouldNotifyIndices) { TodoPattern[] oldTodoPatterns = myTodoPatterns; IndexPattern[] oldIndexPatterns = myIndexPatterns; myTodoPatterns = todoPatterns; buildIndexPatterns(); // only trigger index refresh actual index patterns have changed if (shouldNotifyInd...
doSetTodoPatterns
264,621
PropertyChangeListener (@NotNull Topic<PropertyChangeListener> topic) { return ApplicationManager.getApplication().getMessageBus().syncPublisher(topic); }
getPublisher
264,622
TodoFilter (String name) { for (TodoFilter filter : myTodoFilters) { if (filter.getName().equals(name)) { return filter; } } return null; }
getTodoFilter
264,623
boolean () { return myMultiLine; }
isMultiLine
264,624
void (boolean multiLine) { if (multiLine != myMultiLine) { myMultiLine = multiLine; getPublisher(PROPERTY_CHANGE).propertyChange(new PropertyChangeEvent(this, PROP_MULTILINE, !multiLine, multiLine)); } }
setMultiLine
264,625
void (TodoFilter @NotNull [] filters) { TodoFilter[] oldFilters = myTodoFilters; myTodoFilters = filters; getPublisher(PROPERTY_CHANGE).propertyChange(new PropertyChangeEvent(this, PROP_TODO_FILTERS, oldFilters, filters)); }
setTodoFilters
264,626
void (@NotNull Element element) { String multiLineText = element.getChildText(ELEMENT_MULTILINE); myMultiLine = multiLineText == null || Boolean.parseBoolean(multiLineText); List<TodoPattern> patternsList = new SmartList<>(); for (Element child : element.getChildren(ELEMENT_PATTERN)) { patternsList.add(new TodoPattern(...
loadState
264,627
Element () { Element element = new Element("state"); if (!myMultiLine) { Element m = new Element(ELEMENT_MULTILINE); m.setText(Boolean.FALSE.toString()); element.addContent(m); } TodoPattern[] todoPatterns = myTodoPatterns; if (!Arrays.equals(myTodoPatterns, getDefaultPatterns())) { for (TodoPattern pattern : todoPatte...
getState
264,628
void () { for (TodoPattern pattern : myTodoPatterns) { TodoAttributes attributes = pattern.getAttributes(); if (!attributes.shouldUseCustomTodoColor()) { attributes.setUseCustomTodoColor(false, TodoAttributesUtil.getDefaultColorSchemeTextAttributes()); } } }
colorSettingsChanged
264,629
TodoIndexPatternProvider () { return EP_NAME.findExtensionOrFail(TodoIndexPatternProvider.class); }
getInstance
264,630
Document () { return myDocument; }
getDocument
264,631
RangeHighlighter (final @Nullable TextAttributesKey textAttributesKey, final int startOffset, final int endOffset, final int layer, final @NotNull HighlighterTargetArea targetArea) { TextRange hostRange = myDocument.injectedToHost(new ProperTextRange(startOffset, endOffset)); return myHostModel.addRangeHighlighter( tex...
addRangeHighlighter
264,632
RangeHighlighter (int startOffset, int endOffset, int layer, @Nullable TextAttributes textAttributes, @NotNull HighlighterTargetArea targetArea) { TextRange hostRange = myDocument.injectedToHost(new ProperTextRange(startOffset, endOffset)); return myHostModel.addRangeHighlighter( hostRange.getStartOffset(), hostRange.g...
addRangeHighlighter
264,633
RangeHighlighterEx (@Nullable TextAttributesKey textAttributesKey, int startOffset, int endOffset, int layer, @NotNull HighlighterTargetArea targetArea, boolean isPersistent, @Nullable Consumer<? super RangeHighlighterEx> changeAttributesAction) { TextRange hostRange = myDocument.injectedToHost(new ProperTextRange(star...
addRangeHighlighterAndChangeAttributes
264,634
void (@NotNull RangeHighlighterEx highlighter, @NotNull Consumer<? super RangeHighlighterEx> changeAttributesAction) { myHostModel.changeAttributesInBatch(highlighter, changeAttributesAction); }
changeAttributesInBatch
264,635
RangeHighlighter (final @Nullable TextAttributesKey textAttributesKey, final int line, final int layer) { int hostLine = myDocument.injectedToHostLine(line); return myHostModel.addLineHighlighter(textAttributesKey, hostLine, layer); }
addLineHighlighter
264,636
RangeHighlighter (int line, int layer, @Nullable TextAttributes textAttributes) { int hostLine = myDocument.injectedToHostLine(line); return myHostModel.addLineHighlighter(hostLine, layer, textAttributes); }
addLineHighlighter
264,637
void (final @NotNull RangeHighlighter rangeHighlighter) { myHostModel.removeHighlighter(rangeHighlighter); }
removeHighlighter
264,638
void () { myHostModel.removeAllHighlighters(); }
removeAllHighlighters
264,639
void () { myHostModel.dispose(); }
dispose
264,640
RangeHighlighterEx (final @Nullable TextAttributesKey textAttributesKey, final int line, final int layer) { int hostLine = myDocument.injectedToHostLine(line); return myHostModel.addPersistentLineHighlighter(textAttributesKey, hostLine, layer); }
addPersistentLineHighlighter
264,641
boolean (final @NotNull RangeHighlighter highlighter) { return myHostModel.containsHighlighter(highlighter); }
containsHighlighter
264,642
void (@NotNull Disposable parentDisposable, @NotNull MarkupModelListener listener) { myHostModel.addMarkupModelListener(parentDisposable, listener); }
addMarkupModelListener
264,643
void (final @NotNull RangeHighlighter highlighter, final @NotNull TextAttributes textAttributes) { myHostModel.setRangeHighlighterAttributes(highlighter, textAttributes); }
setRangeHighlighterAttributes
264,644
boolean (int start, int end, @NotNull Processor<? super RangeHighlighterEx> processor) { //todo return false; }
processRangeHighlightersOverlappingWith
264,645
boolean (int start, int end, @NotNull Processor<? super RangeHighlighterEx> processor) { //todo return false; }
processRangeHighlightersOutside
264,646
MarkupIterator<RangeHighlighterEx> (int startOffset, int endOffset) { // todo convert return myHostModel.overlappingIterator(startOffset, endOffset); }
overlappingIterator
264,647
int () { return JBUIScale.scale(4); }
getMinEditorFontSize
264,648
int () { return JBUIScale.scale(SystemProperties.getIntProperty("ide.editor.max.font.size", 40)); }
getMaxEditorFontSize
264,649
int () { return JBUIScale.scale(12); }
getDefaultEditorFontSize
264,650
float () { return .6f; }
getMinEditorLineSpacing
264,651
float () { return 3f; }
getMaxEditorLineSpacing
264,652
float () { return 1f; }
getDefaultEditorLineSpacing
264,653
int (int size) { return round(getMinEditorFontSize(), getMaxEditorFontSize(), size); }
checkAndFixEditorFontSize
264,654
float (float size) { return round(getMinEditorFontSize(), getMaxEditorFontSize(), size); }
checkAndFixEditorFontSize
264,655
float (float lineSpacing) { return round(getMinEditorLineSpacing(), getMaxEditorLineSpacing(), lineSpacing); }
checkAndFixEditorLineSpacing
264,656
int (int min, int max, int val) { return Math.max(min, Math.min(max, val)); }
round
264,657
float (float min, float max, float val) { return Math.max(min, Math.min(max, val)); }
round
264,658
LayeredTextAttributes (@NotNull EditorColorsScheme scheme, TextAttributesKey @NotNull [] keys) { TextAttributes result = new TextAttributes(); for (TextAttributesKey key : keys) { TextAttributes attributes = scheme.getAttributes(key); if (attributes != null) { result = TextAttributes.merge(result, attributes); } } retu...
create
264,659
SegmentArrayWithData () { return new SegmentArrayWithData(createStorage()); }
createSegments
264,660
DataStorage () { return myLexer instanceof RestartableLexer ? new IntBasedStorage() : new ShortBasedStorage(); }
createStorage
264,661
boolean () { return myHighlighter instanceof PlainSyntaxHighlighter; }
isPlain
264,662
EditorColorsScheme () { return myScheme; }
getScheme
264,663
Lexer () { return myLexer; }
getLexer
264,664
void (@NotNull HighlighterClient editor) { LOG.assertTrue(myEditor == null, "Highlighters cannot be reused with different editors"); myEditor = editor; }
setEditor
264,665
void (@NotNull EditorColorsScheme scheme) { myScheme = scheme; myAttributesMap.clear(); }
setColorScheme
264,666
HighlighterIterator (int startOffset) { synchronized (this) { if (!isInSyncWithDocument()) { Document document = getDocument(); assert document != null; if (document.isInBulkUpdate()) { document.setInBulkUpdate(false); // bulk mode failed } doSetText(document.getImmutableCharSequence()); } int latestValidOffset = mySeg...
createIterator
264,667
boolean () { Project project = myEditor.getProject(); return project != null && !project.isDisposed(); }
isValid
264,668
boolean () { Document document = getDocument(); return document == null || document.getTextLength() == 0 || mySegments.getSegmentCount() > 0; }
isInSyncWithDocument
264,669
boolean (int data) { if (myLexer instanceof RestartableLexer) { int state = mySegments.unpackStateFromData(data); return ((RestartableLexer)myLexer).isRestartableState(state); } else { return data >= 0; } }
isInitialState
264,670
TokenIterator (int start) { return new TokenIterator() { @Override public int getStartOffset(int index) { return mySegments.getSegmentStart(index); } @Override public int getEndOffset(int index) { return mySegments.getSegmentEnd(index); } @Override public @NotNull IElementType getType(int index) { return mySegments.unp...
createTokenIterator
264,671
int (int index) { return mySegments.getSegmentStart(index); }
getStartOffset
264,672
int (int index) { return mySegments.getSegmentEnd(index); }
getEndOffset
264,673
IElementType (int index) { return mySegments.unpackTokenFromData(mySegments.getSegmentData(index)); }
getType
264,674
int (int index) { return mySegments.unpackStateFromData(mySegments.getSegmentData(index)); }
getState
264,675
int () { return mySegments.getSegmentCount(); }
getTokenCount
264,676
int () { return start; }
initialTokenIndex
264,677
boolean (int lexerState) { if (myLexer instanceof RestartableLexer) { return ((RestartableLexer)myLexer).isRestartableState(lexerState); } return lexerState == myInitialState; }
canRestart
264,678
boolean (int segmentIndex) { return false; }
hasAdditionalData
264,679
int () { return EditorDocumentPriorities.LEXER_EDITOR; }
getPriority
264,680
boolean (@NotNull SegmentArrayWithData a1, int idx1, @NotNull SegmentArrayWithData a2, int idx2, int offsetShift) { return a1.getSegmentStart(idx1) + offsetShift == a2.getSegmentStart(idx2) && a1.getSegmentEnd(idx1) + offsetShift == a2.getSegmentEnd(idx2) && a1.getSegmentData(idx1) == a2.getSegmentData(idx2); }
segmentsEqual
264,681
HighlighterClient () { return myEditor; }
getClient
264,682
void (@NotNull CharSequence text) { synchronized (this) { doSetText(text); } }
setText
264,683
void (@NotNull CharSequence text) { if (Comparing.equal(myText, text)) return; text = ImmutableCharSequence.asImmutable(text); SegmentArrayWithData tempSegments = createSegments(); TokenProcessor processor = createTokenProcessor(0, tempSegments, text); int textLength = text.length(); Lexer lexerWrapper = new Validating...
doSetText
264,684
TokenProcessor (int startIndex, @NotNull SegmentArrayWithData segments, @NotNull CharSequence myText) { return (tokenIndex, startOffset, endOffset, data, tokenType) -> segments.setElementAt(tokenIndex, startOffset, endOffset, data); }
createTokenProcessor
264,685
SyntaxHighlighter () { return myHighlighter; }
getSyntaxHighlighter
264,686
TextAttributes (@NotNull IElementType tokenType) { TextAttributes attrs = myAttributesMap.get(tokenType); if (attrs == null) { // let's fetch syntax highlighter attributes for token and merge them with "TEXT" attribute of current color scheme attrs = convertAttributes(getAttributesKeys(tokenType)); myAttributesMap.put(...
getAttributes
264,687
List<TextAttributes> (@NotNull Document document, int offset, char c) { CharSequence text = document.getImmutableCharSequence(); CharSequence newText = StringUtil.replaceSubSequence(text, offset, offset, new SingleCharSequence(c)); List<IElementType> tokenTypes = getTokenType(newText, offset); return Arrays.asList(getA...
getAttributesForPreviousAndTypedChars
264,688
List<IElementType> (@NotNull CharSequence text, int offset) { int startOffset = 0; int data = 0; boolean isDataSet = false; int oldStartIndex = 0; int startIndex = 0; if (offset > 0 && mySegments.getSegmentCount() > 0) { int segmentIndex = mySegments.findSegmentIndex(offset - 1) - 2; oldStartIndex = Math.max(0, segment...
getTokenType
264,689
int () { return mySegmentIndex; }
currentIndex
264,690
TextAttributes () { return getAttributes(getTokenType()); }
getTextAttributes
264,691
int () { return mySegments.getSegmentStart(mySegmentIndex); }
getStart
264,692
int () { return mySegments.getSegmentEnd(mySegmentIndex); }
getEnd
264,693
IElementType () { try { return mySegments.unpackTokenFromData(mySegments.getSegmentData(mySegmentIndex)); } catch (IllegalStateException e) { throw new InvalidStateException(LexerEditorHighlighter.this, "wrong state", e); } }
getTokenType
264,694
void () { mySegmentIndex++; }
advance
264,695
void () { mySegmentIndex--; }
retreat
264,696
boolean () { return mySegmentIndex >= mySegments.getSegmentCount() || mySegmentIndex < 0; }
atEnd
264,697
Document () { return LexerEditorHighlighter.this.getDocument(); }
getDocument
264,698
HighlighterClient () { return LexerEditorHighlighter.this.getClient(); }
getClient
264,699
SegmentArrayWithData () { return mySegments; }
getSegments