Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
48,000 | void () { for (int i=0; i < SampleGrid.ORIGINAL_COLUMNS-1; i++){ final RadContainer afterCurrent = SampleGrid.create(); GridChangeUtil.insertRowOrColumn(afterCurrent, i, false, false); assertGridDimensions(afterCurrent, SampleGrid.ORIGINAL_ROWS, SampleGrid.ORIGINAL_COLUMNS + 1); final RadContainer beforeNext = SampleGr... | test_insert_after_and_before |
48,001 | void () { { final RadContainer grid = SampleGrid.create(); assertEquals(GridChangeUtil.CellStatus.Required, GridChangeUtil.canDeleteCell(grid, 0, false)); assertEquals(GridChangeUtil.CellStatus.Required, GridChangeUtil.canDeleteCell(grid, 1, false)); assertEquals(GridChangeUtil.CellStatus.CanShift, GridChangeUtil.canDe... | test_delete |
48,002 | void () { final RadContainer grid = SampleGrid.create(); GridChangeUtil.moveCells(grid, true, new int[] { 3 }, 6); assertEquals(5, grid.getComponent(3).getConstraints().getRow()); assertEquals(3, grid.getComponent(4).getConstraints().getRow()); assertEquals(4, grid.getComponent(5).getConstraints().getRow()); } | testMoveRowDown |
48,003 | void () { final RadContainer grid = SampleGrid.create(); GridChangeUtil.moveCells(grid, true, new int[] { 5 }, 3); assertEquals(4, grid.getComponent(3).getConstraints().getRow()); assertEquals(5, grid.getComponent(4).getConstraints().getRow()); assertEquals(3, grid.getComponent(5).getConstraints().getRow()); } | testMoveRowUp |
48,004 | void () { final RadContainer grid = SampleGrid.create(); GridChangeUtil.moveCells(grid, true, new int[] { 3, 4 }, 6); assertEquals(4, grid.getComponent(3).getConstraints().getRow()); assertEquals(5, grid.getComponent(4).getConstraints().getRow()); assertEquals(3, grid.getComponent(5).getConstraints().getRow()); } | testMoveAdjacentRowsDown |
48,005 | void () { final RadContainer grid = SampleGrid.create(); GridChangeUtil.moveCells(grid, true, new int[] { 4, 5 }, 3); assertEquals(5, grid.getComponent(3).getConstraints().getRow()); assertEquals(3, grid.getComponent(4).getConstraints().getRow()); assertEquals(4, grid.getComponent(5).getConstraints().getRow()); } | testMoveAdjacentRowsUp |
48,006 | void () { final RadContainer grid = SampleGrid.create(); GridChangeUtil.moveCells(grid, true, new int[] { 0, 2 }, 5); assertEquals(3, grid.getComponent(0).getConstraints().getRow()); assertEquals(4, grid.getComponent(2).getConstraints().getRow()); assertEquals(1, grid.getComponent(3).getConstraints().getRow()); } | testMoveDisjointRowsDown |
48,007 | void () { final RadContainer grid = SampleGrid.create(); GridChangeUtil.moveCells(grid, true, new int[] { 2, 4 }, 0); assertEquals(0, grid.getComponent(2).getConstraints().getRow()); assertEquals(1, grid.getComponent(4).getConstraints().getRow()); assertEquals(2, grid.getComponent(0).getConstraints().getRow()); assertE... | testMoveDisjointRowsUp |
48,008 | void (final RadContainer gridA, final RadContainer gridB) { final int count = gridA.getComponentCount(); assertEquals(count, gridB.getComponentCount()); for (int j = 0; j < count; j++) { final GridConstraints aConstraints = gridA.getComponent(j).getConstraints(); final GridConstraints bConstraints = gridB.getComponent(... | assertGridsEqual |
48,009 | RadContainer (final int rowCount, final int columnCount) { return createGrid(rowCount, columnCount, new Insets(0,0,0,0), 0, 0); } | createGrid |
48,010 | RadContainer (final int rowCount, final int columnCount, final Insets margin, final int hGap, final int vGap) { final RadContainer container = new RadContainer(null, "grid"); container.setLayout(new GridLayoutManager(rowCount,columnCount,margin, hGap, vGap)); return container; } | createGrid |
48,011 | void (final RadContainer grid, final int rowCount, final int columnCount) { final GridLayoutManager layout = (GridLayoutManager)grid.getLayout(); assertEquals(columnCount, layout.getColumnCount()); assertEquals(rowCount, layout.getRowCount()); } | assertGridDimensions |
48,012 | void (final RadContainer grid, final int idx, final int cell, final int span) { final GridConstraints constraints = grid.getComponent(idx).getConstraints(); assertEquals(cell, constraints.getColumn()); assertEquals(span, constraints.getColSpan()); } | assertComponentCellAndSpan |
48,013 | void () { FileEditorManagerEx editorManager = FileEditorManagerEx.getInstanceEx(getProject()); VirtualFile file = myFixture.copyFileToProject("TestBorder.form"); GuiEditor editorComponent = DumbModeTestUtils.computeInDumbModeSynchronously(getProject(), () -> { FileEditor[] editors = editorManager.openFile(file, true); ... | testOpenInDumbMode |
48,014 | JComponent () { FileEditorManagerEx editorManager = FileEditorManagerEx.getInstanceEx(getProject()); EditorWindow window = editorManager.getSplitters().getCurrentWindow(); return (JComponent)((JComponent)window.getSelectedComposite().getComponent().getComponents()[0]).getComponents()[0]; } | getEditorComponent |
48,015 | String () { return PluginPathManager.getPluginHomePath("ui-designer") + "/testData"; } | getTestDataPath |
48,016 | byte[] (AsmCodeGenerator codeGenerator) { byte[] patchedData = codeGenerator.getPatchedData(); FormErrorInfo[] errors = codeGenerator.getErrors(); FormErrorInfo[] warnings = codeGenerator.getWarnings(); if (errors.length == 0 && warnings.length == 0) { assertNotNull("Class patching failed but no errors or warnings were... | getVerifiedPatchedData |
48,017 | Method (Class<?> aClass, String methodName, Class<?>[] params) { try { Method method = aClass.getDeclaredMethod(methodName, params); method.setAccessible(true); return method; } catch (NoSuchMethodException ignored) { } Class<?> parent = aClass.getSuperclass(); return parent == null ? null : findMethod(parent, methodNa... | findMethod |
48,018 | void (String name, byte[] bytes) { myClassData.put(name.replace('.', '/'), bytes); } | addClassDefinition |
48,019 | InputStream (String internalClassName) { byte[] bytes = myClassData.get(internalClassName); return bytes != null ? new ByteArrayInputStream(bytes) : null; } | lookupClassBeforeClasspath |
48,020 | void (String formName, String fileName) { myFormMap.put(formName, fileName); } | registerNestedForm |
48,021 | String (LwRootContainer container) { return container.getClassToBind(); } | getClassToBindName |
48,022 | void () { assertEquals(1, myManager.getGridColumnCount(myContainer)); insertComponent(0, 0, 1, 1); GridInsertLocation location = new GridInsertLocation(myContainer, 0, 0, GridInsertMode.ColumnAfter); DraggedComponentList dcl = DraggedComponentList.withComponents(myDropComponent); assertTrue(location.canDrop(dcl)); doDr... | testInsertColumnAfter |
48,023 | void () { setGridSize(2, 1); insertComponent(0, 0, 1, 1); final RadComponent c = insertComponent(1, 0, 1, 1); GridInsertLocation location = new GridInsertLocation(myContainer, 1, 0, GridInsertMode.RowBefore); DraggedComponentList dcl = DraggedComponentList.withComponents(myDropComponent); assertTrue(location.canDrop(dc... | testInsertRowBefore |
48,024 | void () { myContainer.setLayout(new GridLayoutManager(1, 2)); insertComponent(0, 0, 1, 2); GridInsertLocation location = new GridInsertLocation(myContainer, 0, 0, GridInsertMode.ColumnAfter); DraggedComponentList dcl = DraggedComponentList.withComponents(myDropComponent); assertFalse(location.canDrop(dcl)); } | testInsertInMiddleOfComponentColumn |
48,025 | void () { setGridSize(2, 1); insertComponent(0, 0, 2, 1); GridInsertLocation location = new GridInsertLocation(myContainer, 0, 0, GridInsertMode.RowAfter); DraggedComponentList dcl = DraggedComponentList.withComponents(myDropComponent); assertFalse(location.canDrop(dcl)); } | testInsertInMiddleOfComponentRow |
48,026 | void () { myContainer.setLayout(new GridLayoutManager(2, 2)); // *|. *** . // // *** -> ***** insertComponent(0, 0, 1, 1); RadComponent c = insertComponent(1, 0, 1, 2); GridInsertLocation location = new GridInsertLocation(myContainer, 0, 0, GridInsertMode.ColumnAfter); DraggedComponentList dcl = DraggedComponentList.wi... | testGrowComponent |
48,027 | void () { setGridSize(2, 2); insertComponent(0, 0, 1, 1); insertComponent(1, 0, 1, 2); setComponentDimensions(myDropComponent, 0, 0, 2, 1); GridInsertLocation location = new GridInsertLocation(myContainer, 0, 0, GridInsertMode.ColumnAfter); assertFalse(location.canDrop(DraggedComponentList.withComponents(myDropComponen... | testInsertInsideBigComponent |
48,028 | void () { setGridSize(4, 4); // * . . . // . . . . // . . . . // . . . * insertComponent(0, 0, 1, 1); insertComponent(3, 3, 1, 1); // * . . . // . . . . // * . . . // * . . * RadComponent c1 = createComponent(0, 0, 2, 1); RadComponent c2 = createComponent(0, 1, 1, 1); GridInsertLocation location = new GridInsertLocatio... | testInsertGrowMultiple |
48,029 | void () { setGridSize(2, 2); // * . // // . * insertComponent(0, 0, 1, 1); insertComponent(1, 1, 1, 1); // * * // * // * . RadComponent c1 = createComponent(0, 0, 2, 1); RadComponent c2 = createComponent(0, 1, 1, 1); GridInsertLocation location = new GridInsertLocation(myContainer, 1, 0, GridInsertMode.RowAfter); Dragg... | testInsertGrowMultiple1x1 |
48,030 | void () { setGridSize(2, 2); // * . // // . * insertComponent(0, 0, 1, 1); insertComponent(1, 1, 1, 1); setComponentDimensions(myDropComponent, 0, 0, 2, 2); GridInsertLocation location = new GridInsertLocation(myContainer, 1, 0, GridInsertMode.RowAfter); DraggedComponentList dcl = DraggedComponentList.withComponents(my... | testInsertGrowSingle1x1 |
48,031 | void () { setGridSize(4, 4); // * . . . // . . . . // . . . . // . . . * insertComponent(0, 0, 1, 1); insertComponent(3, 3, 1, 1); setComponentDimensions(myDropComponent, 0, 0, 2, 2); GridInsertLocation location = new GridInsertLocation(myContainer, 1, 0, GridInsertMode.RowAfter); DraggedComponentList dcl = DraggedComp... | testInsertGrowSingle |
48,032 | void () { setGridSize(2, 1); insertComponent(0, 0, 1, 1); insertComponent(1, 0, 1, 1); RadComponent c1 = createComponent(0, 0, 1, 1); RadComponent c2 = createComponent(1, 0, 1, 1); GridInsertLocation location = new GridInsertLocation(myContainer, 1, 0, GridInsertMode.RowAfter); DraggedComponentList dcl = DraggedCompone... | testInsertDifferentRows |
48,033 | RadComponent (int row, int column, int rowSpan, int colSpan) { RadComponent c = createComponent(row, column, rowSpan, colSpan); myContainer.addComponent(c); return c; } | insertComponent |
48,034 | RadComponent (final int row, final int column, final int rowSpan, final int colSpan) { final RadAtomicComponent c = new RadAtomicComponent(null, JLabel.class, "1"); setComponentDimensions(c, row, column, rowSpan, colSpan); return c; } | createComponent |
48,035 | void (final int rowCount, final int columnCount) { myContainer.setLayout(new GridLayoutManager(rowCount, columnCount)); } | setGridSize |
48,036 | void (final RadComponent c, final int row, final int column, final int rowSpan, final int colSpan) { c.getConstraints().restore(new GridConstraints(row, column, rowSpan, colSpan, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_GROW, null, nul... | setComponentDimensions |
48,037 | void (final GridInsertLocation location) { location.processDrop(null, new RadComponent[] {myDropComponent}, null, DraggedComponentList.withComponents(myDropComponent)); } | doDrop |
48,038 | void () { GridBagCase gbc = new GridBagCase(); gbc.addButton("Button 1", GridBagConstraints.RELATIVE, GridBagConstraints.RELATIVE); gbc.addButton("Button 2", GridBagConstraints.RELATIVE, GridBagConstraints.RELATIVE); gbc.addButton("Button 3", GridBagConstraints.RELATIVE, GridBagConstraints.RELATIVE); processSnapshot(gb... | testSnapshotRelative |
48,039 | void () { JPanel jp = new JPanel(); jp.setLayout(new GridBagLayout()); GridBagConstraints rightGbc = new GridBagConstraints(); rightGbc.gridx = 1; rightGbc.gridy = 0; rightGbc.gridheight = GridBagConstraints.REMAINDER; rightGbc.fill = GridBagConstraints.BOTH; rightGbc.weightx = 1.0; rightGbc.weighty = 1.0; rightGbc.anc... | testSnapshotRemainder |
48,040 | void (final JPanel panel) { for(int i=0; i<panel.getComponentCount(); i++) { RadComponent button = new RadAtomicComponent(null, JButton.class, Integer.toString(i)); myManager.addSnapshotComponent(panel, (JComponent) panel.getComponent(i), myContainer, button); } } | processSnapshot |
48,041 | Component (final String title, int gridx, int gridy) { GridBagConstraints buttonConstraints = new GridBagConstraints(); buttonConstraints.gridx = gridx; buttonConstraints.gridy = gridy; buttonConstraints.fill = GridBagConstraints.HORIZONTAL; buttonConstraints.anchor = GridBagConstraints.NORTHWEST; buttonConstraints.ipa... | addButton |
48,042 | void () { RadComponent c = newComponent(0, 0, 1, 1); myContainer.addComponent(c); CellConstraints cc = myLayout.getConstraints(c.getDelegee()); assertEquals(1, cc.gridX); assertEquals(1, cc.gridY); assertEquals(1, cc.gridWidth); assertEquals(1, cc.gridHeight); } | testAddComponent |
48,043 | RadComponent (final int row, final int column, final int rowSpan, final int colSpan) { RadComponent c = new RadAtomicComponent(null, JLabel.class, "1"); c.setCustomLayoutConstraints(new CellConstraints(1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT)); c.getConstraints().restore(new GridConstraints(row, column, ... | newComponent |
48,044 | void () { myManager.insertGridCells(myContainer, 0, false, false, true); assertEquals(3, myManager.getGridColumnCount(myContainer)); } | testInsertColumn |
48,045 | void () { myManager.processCellResized(myContainer, false, 0, 210); final ColumnSpec spec = myLayout.getColumnSpec(1); assertTrue(spec.getSize() instanceof ConstantSize); ConstantSize cSize = (ConstantSize) spec.getSize(); assertEquals(210, cSize.getPixelSize(myContainer.getDelegee())); } | testResizeColumn |
48,046 | void () { myManager.insertGridCells(myContainer, 0, false, false, true); final ConstantSize colSize = new ConstantSize(17, ConstantSize.MM); myLayout.setColumnSpec(1, new ColumnSpec(colSize)); RadComponent c = newComponent(0, 0, 1, 1); myContainer.addComponent(c); myManager.processCellsMoved(myContainer, false, new int... | testMoveColumnRight |
48,047 | void () { myManager.insertGridCells(myContainer, 0, false, false, true); final ConstantSize colSize = new ConstantSize(17, ConstantSize.MM); myLayout.setColumnSpec(3, new ColumnSpec(colSize)); RadComponent c = newComponent(0, 2, 1, 1); myContainer.addComponent(c); myManager.processCellsMoved(myContainer, false, new int... | testMoveColumnLeft |
48,048 | void () { myManager.insertGridCells(myContainer, 0, false, false, true); myManager.insertGridCells(myContainer, 0, false, false, true); final ConstantSize colSize1 = new ConstantSize(17, ConstantSize.MM); final ConstantSize colSize2 = new ConstantSize(19, ConstantSize.MM); myLayout.setColumnSpec(1, new ColumnSpec(colSi... | testMoveMultipleColumnsRight |
48,049 | String () { return PluginPathManager.getPluginHomePath("ui-designer") + "/testData"; } | getTestDataPath |
48,050 | void () { final AbstractProjectViewPane pane = myStructure.createPane(); getProjectTreeStructure().setProviders(new ClassesTreeStructureProvider(myProject), new FormMergerTreeStructureProvider(myProject)); assertStructureEqual(getPackageDirectory(), """ PsiDirectory: package1 PsiClass:Class1 PsiJavaFile:Class2.java Psi... | testStandardProviders |
48,051 | String () { return "standardProviders"; } | getTestDirectoryName |
48,052 | void () { final AbstractProjectViewPane pane = myStructure.createPane(); getProjectTreeStructure().setProviders(new ClassesTreeStructureProvider(myProject), new FormMergerTreeStructureProvider(myProject)); assertStructureEqual(getPackageDirectory(), """ PsiDirectory: package1 PsiClass:Class1 PsiJavaFile:Class2.java Psi... | testStandardProvidersForm1 |
48,053 | String () { return PluginPathManager.getPluginHomePath("ui-designer") + "/testData/inspection"; } | getTestDataPath |
48,054 | void () { LocalInspectionToolWrapper wrapper = new LocalInspectionToolWrapper(new I18nFormInspection()); InspectionsKt.enableInspectionTool(getProject(), wrapper, getTestRootDisposable()); doTest("i18n/" + getTestName(true), new LocalInspectionToolWrapper(new I18nInspection()), false, false, wrapper); } | testFormTabbedPaneTitle |
48,055 | String () { return "/renameUIRelated/"; } | getTestRoot |
48,056 | String () { return PluginPathManager.getPluginHomePath("ui-designer") + "/testData"; } | getTestDataPath |
48,057 | void (VirtualFile rootDir) { LanguageLevelProjectExtension.getInstance(myJavaFacade.getProject()).setLanguageLevel(LanguageLevel.JDK_1_5); super.prepareProject(rootDir); } | prepareProject |
48,058 | void () { doTest(new PerformAction() { @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) { PsiClass aClass = myJavaFacade.findClass("UIClass", ProjectScope.getAllScope(myProject)); Assert.assertNotNull(aClass); new RenameProcessor(myProject, aClass, "NewClass", true, true).run(); } }); } | testRenameClass |
48,059 | void (VirtualFile rootDir, VirtualFile rootAfter) { PsiClass aClass = myJavaFacade.findClass("UIClass", ProjectScope.getAllScope(myProject)); Assert.assertNotNull(aClass); new RenameProcessor(myProject, aClass, "NewClass", true, true).run(); } | performAction |
48,060 | void () { doTest(new PerformAction() { @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) { PsiClass aClass = myJavaFacade.findClass("UIClass", ProjectScope.getAllScope(myProject)); Assert.assertNotNull(aClass); final PsiField field = aClass.findFieldByName("UIField", false); Assert.assertN... | testRenameBoundField |
48,061 | void (VirtualFile rootDir, VirtualFile rootAfter) { PsiClass aClass = myJavaFacade.findClass("UIClass", ProjectScope.getAllScope(myProject)); Assert.assertNotNull(aClass); final PsiField field = aClass.findFieldByName("UIField", false); Assert.assertNotNull(field); new RenameProcessor(myProject, field, "OtherName", tru... | performAction |
48,062 | void () { doTest(new PerformAction() { @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) { PsiPackage aPackage = JavaPsiFacade.getInstance(myPsiManager.getProject()).findPackage("gov"); Assert.assertNotNull(aPackage); new RenameProcessor(myProject, aPackage, "org", true, true).run(); } });... | testRenamePackage |
48,063 | void (VirtualFile rootDir, VirtualFile rootAfter) { PsiPackage aPackage = JavaPsiFacade.getInstance(myPsiManager.getProject()).findPackage("gov"); Assert.assertNotNull(aPackage); new RenameProcessor(myProject, aPackage, "org", true, true).run(); } | performAction |
48,064 | void () { // IDEADEV-28864 doTest(new PerformAction() { @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) { PsiPackage aPackage = JavaPsiFacade.getInstance(myPsiManager.getProject()).findPackage("org.withoutForms"); Assert.assertNotNull(aPackage); new RenameProcessor(myProject, aPackage, "... | testRenamePackageNested |
48,065 | void (VirtualFile rootDir, VirtualFile rootAfter) { PsiPackage aPackage = JavaPsiFacade.getInstance(myPsiManager.getProject()).findPackage("org.withoutForms"); Assert.assertNotNull(aPackage); new RenameProcessor(myProject, aPackage, "withForms", true, true).run(); } | performAction |
48,066 | void () { // IDEADEV-5615 doTest(new PerformAction() { @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) { PsiPackage aPackage = JavaPsiFacade.getInstance(myPsiManager.getProject()).findPackage("org.withoutForms"); Assert.assertNotNull(aPackage); new RenameProcessor(myProject, aPackage, "w... | testRenamePackageWithComponentClass |
48,067 | void (VirtualFile rootDir, VirtualFile rootAfter) { PsiPackage aPackage = JavaPsiFacade.getInstance(myPsiManager.getProject()).findPackage("org.withoutForms"); Assert.assertNotNull(aPackage); new RenameProcessor(myProject, aPackage, "withForms", true, true).run(); } | performAction |
48,068 | void () { doTest(new PerformAction() { @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) { PsiClass aClass = myJavaFacade.findClass("PropEnum", ProjectScope.getAllScope(myProject)); Assert.assertNotNull(aClass); PsiField enumConstant = aClass.findFieldByName("valueB", false); Assert.assert... | testRenameEnumConstant |
48,069 | void (VirtualFile rootDir, VirtualFile rootAfter) { PsiClass aClass = myJavaFacade.findClass("PropEnum", ProjectScope.getAllScope(myProject)); Assert.assertNotNull(aClass); PsiField enumConstant = aClass.findFieldByName("valueB", false); Assert.assertNotNull(enumConstant); new RenameProcessor(myProject, enumConstant, "... | performAction |
48,070 | void () { doTest(new PerformAction() { @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) { PsiFile file = myPsiManager.findFile(rootDir.findChild("F1.properties")); Assert.assertNotNull(file); new RenameProcessor(myProject, file, "F2.properties", true, true).run(); } }); } | testRenameResourceBundle |
48,071 | void (VirtualFile rootDir, VirtualFile rootAfter) { PsiFile file = myPsiManager.findFile(rootDir.findChild("F1.properties")); Assert.assertNotNull(file); new RenameProcessor(myProject, file, "F2.properties", true, true).run(); } | performAction |
48,072 | void () { doTest(new PerformAction() { @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) { PsiFile file = myPsiManager.findFile(rootDir.findChild("p1").findChild("Form1.form")); Assert.assertNotNull(file); new RenameProcessor(myProject, file, "Form2.form", true, true).run(); } }); } | testRenameNestedForm |
48,073 | void (VirtualFile rootDir, VirtualFile rootAfter) { PsiFile file = myPsiManager.findFile(rootDir.findChild("p1").findChild("Form1.form")); Assert.assertNotNull(file); new RenameProcessor(myProject, file, "Form2.form", true, true).run(); } | performAction |
48,074 | void () { doTest(new PerformAction() { @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) { PsiFile file = myPsiManager.findFile(rootDir.findFileByRelativePath("org/withoutForms/child/abstractClass.png")); Assert.assertNotNull(file); new RenameProcessor(myProject, file, "specificClass.png",... | testRenameImage |
48,075 | void (VirtualFile rootDir, VirtualFile rootAfter) { PsiFile file = myPsiManager.findFile(rootDir.findFileByRelativePath("org/withoutForms/child/abstractClass.png")); Assert.assertNotNull(file); new RenameProcessor(myProject, file, "specificClass.png", true, true).run(); } | performAction |
48,076 | void () { PsiClass psiClass = myJavaFacade.findClass(JButton.class.getName(), GlobalSearchScope.allScope(myProject)); final Query<PsiReference> query = ReferencesSearch.search(psiClass); final Collection<PsiReference> result = query.findAll(); assertEquals(1, result.size()); } | testClassUsage |
48,077 | void () { doPropertyUsageTest("test.properties", 960); } | testFormPropertyUsage |
48,078 | void () { doPropertyUsageTest("messages/test.properties", 876); } | testFormPropertyUsageForBundleInPackage |
48,079 | void () { doPropertyUsageTest("test_ru.properties", 960); } | testLocalizedPropertyUsage |
48,080 | void (final String propertyFileName, int offset) { PropertiesFile propFile = (PropertiesFile) myPsiManager.findFile(myTestProjectRoot.findFileByRelativePath(propertyFileName)); assertNotNull(propFile); final Property prop = (Property)propFile.findPropertyByKey("key"); assertNotNull(prop); final Query<PsiReference> quer... | doPropertyUsageTest |
48,081 | void () { doPropertyFileUsageTest("test.properties"); } | testPropertyFileUsage |
48,082 | void () { doPropertyFileUsageTest("test_ru.properties"); } | testLocalizedPropertyFileUsage |
48,083 | void (final String fileName) { PropertiesFile propFile = (PropertiesFile) myPsiManager.findFile(myTestProjectRoot.findChild(fileName)); assertNotNull(propFile); final Query<PsiReference> query = ReferencesSearch.search(propFile.getContainingFile()); final Collection<PsiReference> result = query.findAll(); assertEquals(... | doPropertyFileUsageTest |
48,084 | void (final PsiReference ref, final String fileName, final int offset) { final PsiElement element = ref.getElement(); assertEquals(fileName, element.getContainingFile().getName()); int startOffset = element.getTextOffset() + ref.getRangeInElement().getStartOffset(); assertEquals(offset, startOffset); } | verifyReference |
48,085 | String () { return PluginPathManager.getPluginHomePath("ui-designer") + "/testData/move/"; } | getTestDataPath |
48,086 | void () { doTest("to", "from/addmodulewizard.png"); } | testMoveIcon |
48,087 | void (final String targetDirName, final String fileToMove) { doTest(() -> { final VirtualFile child = myFixture.findFileInTempDir(fileToMove); assertNotNull("File " + fileToMove + " not found", child); PsiFile file = getPsiManager().findFile(child); final VirtualFile child1 = myFixture.findFileInTempDir(targetDirName);... | doTest |
48,088 | void () { doWithEditorConfigDisabled(()->myFixture.configureByFile("test.txt")); myFixture.copyFileToProject(".editorconfig"); myFixture.enableInspections(EditorConfigEncodingInspection.class); myFixture.checkHighlighting(); } | testEncodingMismatch |
48,089 | void () { doWithEditorConfigDisabled(()->myFixture.configureByFile("test.xml")); myFixture.copyFileToProject(".editorconfig"); myFixture.enableInspections(EditorConfigEncodingInspection.class); myFixture.checkHighlighting(); } | testIgnoreHardcodedCharset |
48,090 | void () { doWithEditorConfigDisabled(()->myFixture.configureByFile("test.txt")); myFixture.copyFileToProject(".editorconfig"); myFixture.enableInspections(EditorConfigEncodingInspection.class); IntentionAction quickFix = myFixture.findSingleIntention(EditorConfigBundle.message("inspection.file.encoding.ignore")); asser... | testIgnoreQuickFix |
48,091 | void () { doWithEditorConfigDisabled(()->myFixture.configureByFile("test.txt")); myFixture.copyFileToProject(".editorconfig"); VirtualFile sourceFile = getFile().getVirtualFile(); assertEquals(StandardCharsets.UTF_8, sourceFile.getCharset()); myFixture.enableInspections(EditorConfigEncodingInspection.class); IntentionA... | testApplyEncodingQuickFix |
48,092 | void (@NotNull Runnable runnable) { EditorConfigSettings settings = CodeStyle.getSettings(getProject()).getCustomSettings(EditorConfigSettings.class); settings.ENABLED = false; try { runnable.run(); } finally { settings.ENABLED = true; } } | doWithEditorConfigDisabled |
48,093 | String () { return "/plugins/editorconfig/testData/org/editorconfig/configmanagement/inspections/" + getTestName(true); } | getBasePath |
48,094 | boolean () { return true; } | isCommunity |
48,095 | Path () { return contentDir; } | getTestDataPath |
48,096 | PsiFile (@NotNull String name) { return PsiUtilCore.getPsiFile(getProject(), getVirtualFile(name)); } | findPsiFile |
48,097 | VirtualFile (@NotNull String name) { Path file = getTestDataPath().resolve(name); VirtualFile virtualFile = LocalFileSystem.getInstance().refreshAndFindFileByNioFile(file); assertNotNull("Can not find the file" + file, virtualFile); return virtualFile; } | getVirtualFile |
48,098 | void () { myFixture.configureByFile(".editorconfig"); myFixture.enableInspections(EditorConfigValueCorrectnessInspection.class); myFixture.testHighlighting(true, false, true); } | testValues |
48,099 | String () { return "/plugins/editorconfig/testData/org/editorconfig/configmanagement/inspections/" + getTestName(true); } | getBasePath |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.