Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
271,200 | void (GlyphVector g, float x, float y) { myResult += x; myResult += y; for (int i = 0; i < g.getNumGlyphs(); i++) { myResult += g.getGlyphCode(i); Point2D position = g.getGlyphPosition(i); myResult += position.getX(); myResult += position.getY(); } } | drawGlyphVector |
271,201 | void (Shape s) { Rectangle bounds = s.getBounds(); myResult += bounds.x; myResult += bounds.y; myResult += bounds.width; myResult += bounds.height; } | fill |
271,202 | boolean (Rectangle rect, Shape s, boolean onStroke) { throw new UnsupportedOperationException(); } | hit |
271,203 | GraphicsConfiguration () { return null; } | getDeviceConfiguration |
271,204 | void (Composite comp) { myComposite = comp; myResult += Objects.hashCode(comp); } | setComposite |
271,205 | void (Paint paint) { throw new UnsupportedOperationException(); } | setPaint |
271,206 | void (RenderingHints.Key hintKey, Object hintValue) { myRenderingHints.put(hintKey, hintValue); myResult += Objects.hashCode(hintKey); myResult += Objects.hashCode(hintValue); } | setRenderingHint |
271,207 | Object (RenderingHints.Key hintKey) { return myRenderingHints.get(hintKey); } | getRenderingHint |
271,208 | void (Map<?, ?> hints) { myRenderingHints.clear(); addRenderingHints(hints); myResult += Objects.hashCode(hints); } | setRenderingHints |
271,209 | void (Map<?, ?> hints) { myRenderingHints.putAll(hints); myResult += Objects.hashCode(hints); } | addRenderingHints |
271,210 | RenderingHints () { return (RenderingHints)myRenderingHints.clone(); } | getRenderingHints |
271,211 | Graphics () { throw new UnsupportedOperationException(); } | create |
271,212 | void (int x, int y) { myResult += x; myResult += y; } | translate |
271,213 | Color () { return myColor; } | getColor |
271,214 | void (Color c) { myColor = c; myResult += Objects.hashCode(c); } | setColor |
271,215 | void () { throw new UnsupportedOperationException(); } | setPaintMode |
271,216 | void (Color c1) { throw new UnsupportedOperationException(); } | setXORMode |
271,217 | Font () { return myFont; } | getFont |
271,218 | void (Font font) { myFont = font; myResult += Objects.hashCode(font); } | setFont |
271,219 | void (Stroke s) { myStroke = s; myResult += Objects.hashCode(s); } | setStroke |
271,220 | Stroke () { return myStroke; } | getStroke |
271,221 | FontMetrics (Font f) { throw new UnsupportedOperationException(); } | getFontMetrics |
271,222 | Rectangle () { return myClip == null ? null : new Rectangle(myClip); } | getClipBounds |
271,223 | void (int x, int y, int width, int height) { throw new UnsupportedOperationException(); } | clipRect |
271,224 | void (int x, int y, int width, int height) { throw new UnsupportedOperationException(); } | setClip |
271,225 | Shape () { return myClip == null ? null : new Rectangle(myClip); } | getClip |
271,226 | void (Shape clip) { throw new UnsupportedOperationException(); } | setClip |
271,227 | void (int x, int y, int width, int height, int dx, int dy) { throw new UnsupportedOperationException(); } | copyArea |
271,228 | void (int x1, int y1, int x2, int y2) { myResult += x1; myResult += x2; myResult += y1; myResult += y2; } | drawLine |
271,229 | void (int x, int y, int width, int height) { myResult += x; myResult += y; myResult += width; myResult += height; } | fillRect |
271,230 | void (int x, int y, int width, int height) { throw new UnsupportedOperationException(); } | clearRect |
271,231 | void (int x, int y, int width, int height, int arcWidth, int arcHeight) { throw new UnsupportedOperationException(); } | drawRoundRect |
271,232 | void (int x, int y, int width, int height, int arcWidth, int arcHeight) { throw new UnsupportedOperationException(); } | fillRoundRect |
271,233 | void (int x, int y, int width, int height) { throw new UnsupportedOperationException(); } | drawOval |
271,234 | void (int x, int y, int width, int height) { throw new UnsupportedOperationException(); } | fillOval |
271,235 | void (int x, int y, int width, int height, int startAngle, int arcAngle) { throw new UnsupportedOperationException(); } | drawArc |
271,236 | void (int x, int y, int width, int height, int startAngle, int arcAngle) { throw new UnsupportedOperationException(); } | fillArc |
271,237 | void (int[] xPoints, int[] yPoints, int nPoints) { throw new UnsupportedOperationException(); } | drawPolyline |
271,238 | void (int[] xPoints, int[] yPoints, int nPoints) { throw new UnsupportedOperationException(); } | drawPolygon |
271,239 | void (int[] xPoints, int[] yPoints, int nPoints) { throw new UnsupportedOperationException(); } | fillPolygon |
271,240 | void (double tx, double ty) { throw new UnsupportedOperationException(); } | translate |
271,241 | void (double theta) { throw new UnsupportedOperationException(); } | rotate |
271,242 | void (double theta, double x, double y) { throw new UnsupportedOperationException(); } | rotate |
271,243 | void (double sx, double sy) { throw new UnsupportedOperationException(); } | scale |
271,244 | void (double shx, double shy) { throw new UnsupportedOperationException(); } | shear |
271,245 | void (AffineTransform Tx) { throw new UnsupportedOperationException(); } | transform |
271,246 | void (AffineTransform Tx) { myTransform.setTransform(Tx); myResult += Tx.hashCode(); } | setTransform |
271,247 | AffineTransform () { return new AffineTransform(myTransform); } | getTransform |
271,248 | Paint () { throw new UnsupportedOperationException(); } | getPaint |
271,249 | Composite () { return myComposite; } | getComposite |
271,250 | void (Color color) { throw new UnsupportedOperationException(); } | setBackground |
271,251 | Color () { throw new UnsupportedOperationException(); } | getBackground |
271,252 | void (Shape s) { throw new UnsupportedOperationException(); } | clip |
271,253 | FontRenderContext () { return myFontRenderContext; } | getFontRenderContext |
271,254 | void () { final Document doc = new DocumentImpl(""" line1 \t line2 """); assertEquals("", DocumentUtil.getIndent(doc, doc.getLineStartOffset(0) + 2).toString()); assertEquals(" \t ", DocumentUtil.getIndent(doc, doc.getLineStartOffset(1) + 2).toString()); assertEquals("", DocumentUtil.getIndent(doc, doc.getLineStartOffs... | testGetIndent |
271,255 | void () { for (int len = 2; len < 25; len++) { stress(len); } } | testStressFoldingFromZeroOffset |
271,256 | void () { DocumentImpl doc = new DocumentImpl("0123456789\n123456789\n23456789"); Editor editor = EditorFactory.getInstance().createEditor(doc); try { final FoldingModel model = editor.getFoldingModel(); model.runBatchFoldingOperation(() -> { addAndCollapseFoldRegion(model, 0, 8, "/*...*/"); addAndCollapseFoldRegion(mo... | testStress8 |
271,257 | void (final int len) { DocumentImpl doc = new DocumentImpl("0123456789\n123456789\n23456789"); Editor editor = EditorFactory.getInstance().createEditor(doc); try { final FoldingModel model = editor.getFoldingModel(); model.runBatchFoldingOperation(() -> { addAndCollapseFoldRegion(model, 0, len, "/*...*/"); addAndCollap... | stress |
271,258 | void (FoldingModel model, int startOffset, int endOffset, String placeHolder) { FoldRegion foldRegion = model.addFoldRegion(startOffset, endOffset, placeHolder); assertNotNull(foldRegion); foldRegion.setExpanded(false); } | addAndCollapseFoldRegion |
271,259 | void () { int N = 100_000; DocumentImpl doc = new DocumentImpl(StringUtil.repeat("x", N)); Editor editor = EditorFactory.getInstance().createEditor(doc); try { FoldingModelEx model = (FoldingModelEx)editor.getFoldingModel(); PlatformTestUtil.startPerformanceTest("restoring many fold regions", 1500, () -> model.runBatch... | testRestoreManyFoldRegionsPerformance |
271,260 | void () { String text = """ some<caret> text<caret> some <selection><caret>other</selection> <selection>text<caret></selection> <selection>ano<caret>ther</selection> line"""; PsiFile psiFile = myFixture.configureByText(PlainTextFileType.INSTANCE, text); VirtualFile virtualFile = psiFile.getVirtualFile(); assertNotNull(... | testRestoreState |
271,261 | Editor (VirtualFile virtualFile) { FileEditor[] fileEditors = FileEditorManagerEx.getInstanceEx(getProject()).openFile(virtualFile, false); assertNotNull(fileEditors); assertEquals(1, fileEditors.length); Editor editor = ((TextEditor)fileEditors[0]).getEditor(); EditorTestUtil.waitForLoading(editor); return editor; } | openFile |
271,262 | void (Editor editor, String textWithMarkup) { final Document document = new DocumentImpl(textWithMarkup); EditorTestUtil.CaretAndSelectionState caretAndSelectionState = EditorTestUtil.extractCaretAndSelectionMarkers(document); assertEquals(document.getCharsSequence().toString(), editor.getDocument().getText()); EditorT... | verifyEditorState |
271,263 | void (@NotNull String fileText) { super.initText(fileText); ((EditorImpl)getEditor()).setHorizontalTextAlignment(EditorImpl.TEXT_ALIGNMENT_RIGHT); } | initText |
271,264 | String () { return super.getTestDataPath() + "/right"; } | getTestDataPath |
271,265 | void () { myMockery = new JUnit4Mockery() {{ setImposteriser(ClassImposteriser.INSTANCE); }}; myProject = myMockery.mock(Project.class); } | prepare |
271,266 | void (@NotNull LineWrapPositionStrategy strategy, final String document) { doTest(strategy, document, true); } | doTest |
271,267 | void (@NotNull LineWrapPositionStrategy strategy, final String document, boolean allowToBeyondMaxPreferredOffset) { final Context context = new Context(document); context.init(); int actual = strategy.calculateWrapPosition( createMockDocument(context.document), myProject, 0, context.document.length(), context.edgeIndex... | doTest |
271,268 | Document (@NotNull final String text) { final Document result = myMockery.mock(Document.class); myMockery.checking(new Expectations() {{ allowing(result).getCharsSequence(); will(returnValue(text)); allowing(result).getLineNumber(with(any(int.class))); will(returnValue(0)); allowing(result).getLineStartOffset(0); will(... | createMockDocument |
271,269 | void () { tmpWrapIndex = rawDocument.indexOf(WRAP_MARKER); tmpEdgeIndex = rawDocument.indexOf(EDGE_MARKER); if (tmpWrapIndex >= 0 && tmpEdgeIndex >= 0) { if (tmpWrapIndex < tmpEdgeIndex) { processWrap(); processMaxPreferredIndex(); } else { processMaxPreferredIndex(); processWrap(); } } else { if (tmpWrapIndex >= 0) { ... | init |
271,270 | void () { buffer.append(rawDocument, index, tmpWrapIndex); index = tmpWrapIndex + WRAP_MARKER.length(); wrapIndex = buffer.length(); if (rawDocument.indexOf(WRAP_MARKER, index) >= 0) { throw new IllegalArgumentException(String.format("More than one wrap indicator is found at the document '%s'", rawDocument)); } } | processWrap |
271,271 | void () { buffer.append(rawDocument, index, tmpEdgeIndex); index = tmpEdgeIndex + EDGE_MARKER.length(); edgeIndex = buffer.length(); if (rawDocument.indexOf(EDGE_MARKER, index) >= 0) { throw new IllegalArgumentException(String.format("More than one max preferred offset is found at the document '%s'", rawDocument)); } } | processMaxPreferredIndex |
271,272 | void () { Document document = EditorFactory.getInstance().createDocument(StringUtil.repeat(LOREM_IPSUM + '\n', 15000)); PlatformTestUtil.startPerformanceTest("Editor creation", 130, () -> { Editor editor = EditorFactory.getInstance().createEditor(document); try { LOG.debug(String.valueOf(editor.getContentComponent().ge... | testOpeningEditorWithManyLines |
271,273 | void () { Document document = EditorFactory.getInstance().createDocument(StringUtil.repeat(LOREM_IPSUM, 30000)); PlatformTestUtil.startPerformanceTest("Editor creation", 2000, () -> { Editor editor = EditorFactory.getInstance().createEditor(document); try { EditorTestUtil.setEditorVisibleSize(editor, 100, 100); LOG.deb... | testOpeningEditorWithLongLine |
271,274 | void () { configureFromFileText(getTestName(false) + ".txt", "aaa\nbbb\nccc\nddd"); EditorTestUtil.addFoldRegion(getEditor(), 4, 8, "...", true); assertVisualLineRange(2, 0, 3); assertVisualLineRange(4, 4, 11); assertVisualLineRange(7, 4, 11); assertVisualLineRange(8, 4, 11); assertVisualLineRange(9, 4, 11); assertVisu... | testGetNotFoldedLineStartEndOffsets |
271,275 | void () { createSmallEditor("<caret>12345\n67890"); EditorUtil.scrollToTheEnd(getEditor()); // caret should be at the end, but editor shouldn't be scrolled to it assertCaretAt(1, 5, false); } | testScrollFromBeginToEnd |
271,276 | void () { createSmallEditor("12345\n<caret>12345"); EditorUtil.scrollToTheEnd(getEditor()); // caret should be at the end, and visible assertCaretAt(1, 5, true); } | testScrollFromLastLineToEnd |
271,277 | void () { createSmallEditor("12345\n12345<caret>\n"); Rectangle oldVisibleArea = getEditor().getScrollingModel().getVisibleAreaOnScrollingFinished(); EditorUtil.scrollToTheEnd(getEditor(), true); // caret should be at the end, but only vertical scrolling should happen assertCaretAt(2, 0, false); Rectangle newVisibleAre... | testScrollToEndWithEmptyLastLine |
271,278 | void () { createEditor("line1\nline2\nlong long line\n"); assertTrue("Failed to activate soft wrapping", EditorTestUtil.configureSoftWraps(getEditor(), 10)); int lineHeight = getEditor().getLineHeight(); @NotNull Pair<@NotNull Interval, @Nullable Interval> p1 = EditorUtil.logicalLineToYRange(getEditor(), 1); assertEqua... | testLogicalLineToYRange |
271,279 | void () { createEditor("line1\nline2\n"); EditorTestUtil.addFoldRegion(getEditor(), 5, 6, "...", true); @NotNull Pair<@NotNull Interval, @Nullable Interval> p = EditorUtil.logicalLineToYRange(getEditor(), 1); assertEquals(0, p.first.intervalStart()); assertEquals(getEditor().getLineHeight(), p.first.intervalEnd()); ass... | testLogicalLineToYRangeShared |
271,280 | void () { createEditor("line1\nline2\nline3\n"); EditorTestUtil.addFoldRegion(getEditor(), 5, 6, "...", true); int lineHeight = getEditor().getLineHeight(); Interval i1 = EditorUtil.yToLogicalLineRange(getEditor(), lineHeight / 2); assertEquals(0, i1.intervalStart()); assertEquals(1, i1.intervalEnd()); Interval i2 = Ed... | testYToLogicalLineRange |
271,281 | void (String text) { configureFromFileText(getTestName(false) + ".txt", text); } | createEditor |
271,282 | void (String text) { configureFromFileText(getTestName(false) + ".txt", text); EditorTestUtil.setEditorVisibleSize(getEditor(), 4, 2); } | createSmallEditor |
271,283 | void (int line, int column, boolean isVisible) { LogicalPosition position = getEditor().getCaretModel().getLogicalPosition(); assertEquals(line, position.line); assertEquals(column, position.column); Point caretXY = getEditor().logicalPositionToXY(position); assertEquals(isVisible, getEditor().getScrollingModel().getVi... | assertCaretAt |
271,284 | void (int offset, int lineStartOffset, int lineEndOffset) { assertEquals(lineStartOffset, EditorUtil.getNotFoldedLineStartOffset(getEditor(), offset)); assertEquals(lineEndOffset, EditorUtil.getNotFoldedLineEndOffset(getEditor(), offset)); } | assertVisualLineRange |
271,285 | void () { String text = """ package org; public class TestClass { int field; public int getField() { return field; } }"""; init(text); int blockSelectionStartOffset = text.indexOf("public int"); Editor editor = myFixture.getEditor(); LogicalPosition blockSelectionStartPosition = editor.offsetToLogicalPosition(blockSele... | testBlockSelection |
271,286 | int () { return field; } | getField |
271,287 | void () { String text = """ package org; public class TestClass { int field; public int getField() { return field; } }"""; init(text); int blockSelectionStartOffset = text.indexOf("public int"); Editor editor = myFixture.getEditor(); ((EditorEx) editor).setColumnMode(true); LogicalPosition blockSelectionStartPosition =... | testColumnModeBlockSelection |
271,288 | int () { return field; } | getField |
271,289 | void () { String text = """ public class TestClass { int field; int otherField; }"""; init(text); int blockSelectionStartOffset = text.indexOf("int"); Editor editor = myFixture.getEditor(); ((EditorEx) editor).setColumnMode(true); LogicalPosition blockSelectionStartPosition = editor.offsetToLogicalPosition(blockSelecti... | testColumnModeBlockSelectionWithGaps |
271,290 | void () { // We want to exclude unnecessary indents from the pasted results. String text = """ package org; public class TestClass { int field; public int getField() { return field; } }"""; init(text); int selectionStart = text.indexOf("public int"); int selectionEnd = text.indexOf('} | testRegularSelection |
271,291 | int () { return field; } | getField |
271,292 | void () { init("\"tr\" #> <selection>template.statusList.sortBy</selection>(_.index).map(fromStatus =>"); verifySyntaxInfo("fontStyle=0,text=template.statusList.sortBy\n"); } | testIncorrectFirstLineCalculationOffset |
271,293 | void () { init( """ package org; import java.io.Serializable; <selection>/** * Code in <code>here</code> * <strong>Hi</strong> man * @param <T> </selection>*/ public interface SampleTest<T> extends Serializable { boolean isNotNull(); T getValue(); }""" ); verifySyntaxInfo(""" foreground=java.awt.Color[r=128,g=128,b=128... | testJavadoc |
271,294 | void () { init(""" public class Test { <selection> int field; }</selection>"""); verifySyntaxInfo(""" text= \s foreground=java.awt.Color[r=0,g=0,b=128],fontStyle=1,text=int\s foreground=java.awt.Color[r=102,g=14,b=122],text=field foreground=java.awt.Color[r=0,g=0,b=0],fontStyle=0,text=; text=} | testIndentStrippingWhenFirstLineIsMostIndented |
271,295 | void () { init(""" public class Test { <selection> int field; </selection>}"""); verifySyntaxInfo(""" foreground=java.awt.Color[r=0,g=0,b=128],fontStyle=1,text=int\s foreground=java.awt.Color[r=102,g=14,b=122],text=field foreground=java.awt.Color[r=0,g=0,b=0],fontStyle=0,text=; """); } | testIndentStrippingWhenSelectionEndIsBeforeNonWsCharactersOnTheLine |
271,296 | void () { String text = "package org;\r" + "\r" + "public class TestClass {\r" + "\r" + " int field;\r" + "\r" + " public int getField() {\r" + " return field;\r" + " }\r" + "}"; initWithCustomLineSeparators(text); int selectionStart = text.indexOf("public int"); int selectionEnd = text.indexOf('} | testSlashRSeparator |
271,297 | void () { String text = """ package org;\r \r public class TestClass {\r \r int field;\r \r public int getField() {\r return field;\r }\r }"""; initWithCustomLineSeparators(text); int selectionStart = text.indexOf("public int"); int selectionEnd = text.indexOf('} | testSlashRSlashNSeparator |
271,298 | int () {\r return field;\r } | getField |
271,299 | void () { String fileName = "Test.java"; FileType fileType = FileTypeRegistry.getInstance().getFileTypeByFileName(fileName); PsiFile psiFile = PsiFileFactory.getInstance(getProject()).createFileFromText(fileName, fileType, "class Test {}", 0, false); VirtualFile virtualFile = psiFile.getViewProvider().getVirtualFile();... | testNonPhysicalFile |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.