Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
45,800 | void (final GridConstraints constraints, final boolean isRow, final int beforeIndex, final int count) { if (constraints.getCell(isRow) >= beforeIndex) { addToCell(constraints, isRow, count); } else if (isCellInsideComponent(constraints, isRow, beforeIndex)) { // component belongs to the cell being resized - increment c... | adjustConstraintsOnInsert |
45,801 | void (final RadContainer grid, final int cellIndex, final boolean isRow) { check(grid, isRow, cellIndex); int insertedCells = grid.getGridLayoutManager().insertGridCells(grid, cellIndex, isRow, false, false); for (int i=grid.getComponentCount() - 1; i >= 0; i--){ final RadComponent component = grid.getComponent(i); fin... | splitCell |
45,802 | CellStatus (@NotNull final RadContainer grid, final int cellIndex, final boolean isRow) { check(grid, isRow, cellIndex); // Do not allow to delete the single row/column if(isRow && grid.getGridRowCount() <= grid.getGridLayoutManager().getMinCellCount()) { return CellStatus.Required; } else if(!isRow && grid.getGridColu... | canDeleteCell |
45,803 | boolean (final RadContainer grid, final int[] cells, final boolean row) { // for multiple cells, we can't determine if deleting all cells will have a correct result for(int cell: cells) { CellStatus status = canDeleteCell(grid, cell, row); if (status != CellStatus.Empty) { if (cells.length == 1 && status == CellStatus.... | canDeleteCells |
45,804 | void (final RadContainer grid, final int cellIndex, final boolean isRow) { check(grid, isRow, cellIndex); if (canDeleteCell(grid, cellIndex, isRow) == CellStatus.Required) { throw new IllegalArgumentException("cell cannot be deleted"); } final RadAbstractGridLayoutManager oldLayout = grid.getGridLayoutManager(); final ... | deleteCell |
45,805 | boolean (final GridConstraints constraints, final boolean isRow, final int cellIndex) { final int cell = constraints.getCell(isRow); final int span = constraints.getSpan(isRow); return cell <= cellIndex && cellIndex <= cell + span - 1; } | isCellInsideComponent |
45,806 | void (@NotNull RadContainer grid, final boolean isRow, final int cellIndex) { if (!grid.getLayoutManager().isGrid()){ throw new IllegalArgumentException("container must be grid"); } final int cellCount = isRow ? grid.getGridRowCount() : grid.getGridColumnCount(); if (cellIndex == 0 && cellCount == 0) return; if (cellIn... | check |
45,807 | void (final GridConstraints constraints, final boolean isRow, final int delta) { if (isRow) { constraints.setRow(constraints.getRow() + delta); } else { constraints.setColumn(constraints.getColumn() + delta); } } | addToCell |
45,808 | void (final GridConstraints constraints, final boolean isRow, final int delta) { if (isRow) { constraints.setRowSpan(constraints.getRowSpan() + delta); } else { constraints.setColSpan(constraints.getColSpan() + delta); } } | addToSpan |
45,809 | void (final RadContainer container, final boolean isRow, final int[] cellsToMove, int targetCell) { for(int i=0; i<cellsToMove.length; i++) { final int sourceCell = cellsToMove[i]; moveCell(container, isRow, sourceCell, targetCell); if (sourceCell < targetCell) { for(int j=i+1; j<cellsToMove.length; j++) { cellsToMove ... | moveCells |
45,810 | void (final RadContainer container, final boolean isRow, final int sourceCell, int targetCell) { if (targetCell == sourceCell || targetCell == sourceCell+1) return; // if column moved to left - components inbetween move to right, and vice versa int delta = (sourceCell > targetCell) ? 1 : -1; int startCell = Math.min(so... | moveCell |
45,811 | DesignerEditorPanelFacade (FileEditor editor) { if (editor instanceof UIFormEditor formEditor) { return formEditor.getEditor(); } return null; } | getDesigner |
45,812 | ToggleEditorModeAction (ToolWindowAnchor anchor) { return new ToggleEditorModeAction(this, myProject, anchor) { @Override protected LightToolWindowManager getOppositeManager() { AbstractToolWindowManager designerManager = DesignerToolWindowManager.getInstance(myProject); AbstractToolWindowManager paletteManager = Palet... | createToggleAction |
45,813 | LightToolWindowManager () { AbstractToolWindowManager designerManager = DesignerToolWindowManager.getInstance(myProject); AbstractToolWindowManager paletteManager = PaletteToolWindowManager.getInstance(myProject); return myManager == designerManager ? paletteManager : designerManager; } | getOppositeManager |
45,814 | GuiDesignerConfiguration (final Project project) { return project.getService(GuiDesignerConfiguration.class); } | getInstance |
45,815 | GuiDesignerConfiguration () { return this; } | getState |
45,816 | void (@NotNull GuiDesignerConfiguration object) { XmlSerializerUtil.copyBean(object, this); } | loadState |
45,817 | Object () { return myRootElement; } | getRootElement |
45,818 | Object (@NotNull final Object element) { if (element instanceof ComponentTreeStructureRoot) { return null; } else if (element instanceof LwInspectionSuppression[] || element instanceof RadButtonGroup[]) { return myRootElement; } else if (element instanceof LwInspectionSuppression) { return myEditor.getRootContainer().g... | getParentElement |
45,819 | void () {} | commit |
45,820 | boolean () { return false; } | hasSomethingToCommit |
45,821 | String () { return "root of component tree structure " + ComponentTreeStructure.this; } | toString |
45,822 | boolean () { return false; } | update |
45,823 | Object () { return myInspectionSuppressions; } | getElement |
45,824 | Rectangle () { final TreePath selectionPath = myComponent.getSelectionPath(); LOG.assertTrue(selectionPath != null); return myComponent.getPathBounds(selectionPath); } | getErrorBounds |
45,825 | void (final TreeSelectionEvent e) { hideIntentionHint(); updateIntentionHintVisibility(); ErrorInfo[] errorInfos = getErrorInfos(); final String text; if (errorInfos.length > 0) { text = errorInfos [0].myDescription; } else { text = ""; } StatusBar.Info.set(text, myComponent.getProject()); } | valueChanged |
45,826 | boolean () { return false; } | update |
45,827 | Object () { return myButtonGroups; } | getElement |
45,828 | boolean () { return false; } | update |
45,829 | Object () { return myInspectionSuppression; } | getElement |
45,830 | String () { StringBuilder titleBuilder = new StringBuilder(myInspectionSuppression.getInspectionId()); if (myTarget != null) { titleBuilder.append(" for "); titleBuilder.append(myTarget.getDisplayName()); } return titleBuilder.toString(); } | toString |
45,831 | LwInspectionSuppression () { return myInspectionSuppression; } | getSuppression |
45,832 | int (JComponent c) { return DnDConstants.ACTION_COPY_OR_MOVE; } | getSourceActions |
45,833 | Transferable (JComponent c) { return DraggedComponentList.pickupSelection(myEditor, null); } | createTransferable |
45,834 | Project () { return myProject; } | getProject |
45,835 | void (JViewport viewPort) { myQuickFixManager = new QuickFixManagerImpl(null, this, viewPort); } | initQuickFixManager |
45,836 | void (final GuiEditor editor) { myEditor = editor; myDeleteProvider.setEditor(editor); myQuickFixManager.setEditor(editor); myStartInplaceEditingAction.setEditor(editor); } | setEditor |
45,837 | void () { myQuickFixManager.refreshIntentionHint(); } | refreshIntentionHint |
45,838 | String (final MouseEvent e) { final TreePath path = getPathForLocation(e.getX(), e.getY()); final RadComponent component = getComponentFromPath(path); if (component != null) { final ErrorInfo errorInfo = ErrorAnalyzer.getErrorForComponent(component); if (errorInfo != null) { return errorInfo.myDescription; } } return n... | getToolTipText |
45,839 | RadComponent (TreePath path) { if (path != null) { final DefaultMutableTreeNode node = (DefaultMutableTreeNode)path.getLastPathComponent(); LOG.assertTrue(node != null); final Object userObject = node.getUserObject(); if (userObject instanceof ComponentPtrDescriptor descriptor) { final ComponentPtr ptr = descriptor.get... | getComponentFromPath |
45,840 | RadComponent () { return ArrayUtil.getFirstElement(getSelectedComponents()); } | getSelectedComponent |
45,841 | Object (@NotNull final String dataId) { if (GuiEditor.DATA_KEY.is(dataId)) { return myEditor; } if (PlatformDataKeys.DELETE_ELEMENT_PROVIDER.is(dataId)) { return myDeleteProvider; } if (PlatformDataKeys.COPY_PROVIDER.is(dataId) || PlatformDataKeys.CUT_PROVIDER.is(dataId) || PlatformDataKeys.PASTE_PROVIDER.is(dataId)) {... | getData |
45,842 | Object (@NotNull RadComponent selectedComponent, @NonNls String dataId) { if (CommonDataKeys.NAVIGATABLE.is(dataId)) { return getPsiFile(selectedComponent); } return null; } | getSlowData |
45,843 | Navigatable (@NotNull RadComponent selectedComponent) { final String classToBind = myEditor.getRootContainer().getClassToBind(); if (classToBind == null) { return null; } final PsiClass aClass = FormEditingUtil.findClassToBind(myEditor.getModule(), classToBind); if (aClass == null) { return null; } if (selectedComponen... | getPsiFile |
45,844 | SimpleTextAttributes (@NotNull final SimpleTextAttributes attrs, @Nullable HighlightDisplayLevel level) { if (level == null) { return attrs; } Map<SimpleTextAttributes, SimpleTextAttributes> highlightMap = myHighlightAttributes.get(level.getSeverity()); if (highlightMap == null) { highlightMap = new HashMap<>(); myHigh... | getAttribute |
45,845 | void (final TreeUI ui) { super.setUI(ui); // [vova] we cannot create this hash in constructor and just clear it here. The // problem is that setUI is invoked by constructor of superclass. myHighlightAttributes = new HashMap<>(); final EditorColorsScheme globalScheme = EditorColorsManager.getInstance().getGlobalScheme()... | setUI |
45,846 | Icon (final RadComponent component) { if (!(component instanceof RadErrorComponent)) { final Palette palette = Palette.getInstance(component.getProject()); final ComponentItem item = palette.getItem(component.getComponentClassName()); final Icon icon; if (item != null) { icon = item.getSmallIcon(); } else { icon = UIDe... | getComponentIcon |
45,847 | void (final @Nullable RadComponent dropTargetComponent) { if (dropTargetComponent != myDropTargetComponent) { myDropTargetComponent = dropTargetComponent; repaint(); } } | setDropTargetComponent |
45,848 | void (final UIFormEditor formEditor) { myFormEditor = formEditor; } | setFormEditor |
45,849 | void ( final @NotNull JTree tree, final Object value, final boolean selected, final boolean expanded, final boolean leaf, final int row, final boolean hasFocus ) { final DefaultMutableTreeNode node = (DefaultMutableTreeNode)value; if (node.getUserObject() instanceof ComponentPtrDescriptor descriptor) { final ComponentP... | customizeCellRenderer |
45,850 | void (DropTargetDragEvent dtde) { try { RadComponent dropTargetComponent = null; ComponentDragObject dragObject = null; final DraggedComponentList dcl = DraggedComponentList.fromTransferable(dtde.getTransferable()); if (dcl != null) { dragObject = dcl; } else { ComponentItem componentItem = SimpleTransferable.getData(d... | dragOver |
45,851 | void (DropTargetEvent dte) { setDropTargetComponent(null); } | dragExit |
45,852 | void (DropTargetDropEvent dtde) { try { final DraggedComponentList dcl = DraggedComponentList.fromTransferable(dtde.getTransferable()); ComponentItem componentItem = SimpleTransferable.getData(dtde.getTransferable(), ComponentItem.class); if (dcl != null || componentItem != null) { final TreePath path = getPathForLocat... | drop |
45,853 | void (final GuiEditor editor) { myEditor = editor; } | setEditor |
45,854 | ActionUpdateThread () { DeleteProvider baseProvider = myEditor == null ? null : PlatformDataKeys.DELETE_ELEMENT_PROVIDER.getData(myEditor); return baseProvider == null ? ActionUpdateThread.BGT : baseProvider.getActionUpdateThread(); } | getActionUpdateThread |
45,855 | void (@NotNull DataContext dataContext) { if (myEditor == null) return; LwInspectionSuppression[] suppressions = LW_INSPECTION_SUPPRESSION_ARRAY_DATA_KEY.getData(dataContext); if (suppressions != null) { if (!myEditor.ensureEditable()) return; for(LwInspectionSuppression suppression: suppressions) { myEditor.getRootCon... | deleteElement |
45,856 | boolean (@NotNull DataContext dataContext) { if (myEditor != null) { LwInspectionSuppression[] suppressions = LW_INSPECTION_SUPPRESSION_ARRAY_DATA_KEY.getData(dataContext); if (suppressions != null) { return true; } DeleteProvider baseProvider = PlatformDataKeys.DELETE_ELEMENT_PROVIDER.getData(myEditor); if (baseProvid... | canDeleteElement |
45,857 | boolean () { return false; } | update |
45,858 | Object () { return myGroup; } | getElement |
45,859 | String () { return myGroup.getName(); } | toString |
45,860 | boolean () { return false; } | update |
45,861 | Object () { return myRootElement; } | getElement |
45,862 | void () { myEditor.removeHierarchyChangeListener(myHierarchyChangeListener); if (myTreeSelectionListener != null) { myTree.getSelectionModel().removeTreeSelectionListener(myTreeSelectionListener); myTreeSelectionListener = null; } mySelectionWatcher.dispose(); } | dispose |
45,863 | boolean (final NodeDescriptor<?> descriptor) { return myTreeStructure.isAutoExpandNode(descriptor); } | isAutoExpandNode |
45,864 | void () { myInsideChange++; } | beginUpdateSelection |
45,865 | void () { myInsideChange--; updateSelection(); } | endUpdateSelection |
45,866 | void () { // Found selected components final RadContainer rootContainer = myEditor.getRootContainer(); final ArrayList<RadComponent> selection = new ArrayList<>(); FormEditingUtil.iterate( rootContainer, new FormEditingUtil.ComponentVisitor<RadComponent>() { @Override public boolean visit(final RadComponent component) ... | syncSelection |
45,867 | boolean (final RadComponent component) { if(component.isSelected()){ selection.add(component); } return true; } | visit |
45,868 | int (final RadContainer container, final RadComponent component) { if (container != null) { for(int i = container.getComponentCount() - 1; i >= 0 ; i--){ if(component.equals(container.getComponent(i))){ return i; } } } return -1; } | indexOf |
45,869 | int (final NodeDescriptor descriptor1, final NodeDescriptor descriptor2) { if (descriptor1 instanceof ComponentPtrDescriptor && descriptor2 instanceof ComponentPtrDescriptor) { final RadComponent component1 = ((ComponentPtrDescriptor)descriptor1).getComponent(); final RadComponent component2 = ((ComponentPtrDescriptor)... | compare |
45,870 | void () { invalidateAndSyncSelection(); } | hierarchyChanged |
45,871 | void (final RadComponent component, final boolean ignored) { updateSelection(); } | selectionChanged |
45,872 | void () { myStructureTreeModel.invalidateAsync(); } | invalidateAsync |
45,873 | void () { myStructureTreeModel.invalidateAsync().thenRun(() -> { ApplicationManager.getApplication().invokeLater(() -> { // After updating the tree we have to synchronize the selection in the tree // with selected element in the hierarchy syncSelection(); }); }); } | invalidateAndSyncSelection |
45,874 | void () { final PropertyInspector propertyInspector = DesignerToolWindowManager.getInstance(myEditor).getPropertyInspector(); if (propertyInspector.isEditing()) { propertyInspector.stopEditing(); } invalidateAndSyncSelection(); } | updateSelection |
45,875 | void (final TreeSelectionEvent e) { if (myInsideChange>0) { return; } final Set<ComponentPtr> selectedElements = TreeUtil.collectSelectedObjectsOfType(myTree, ComponentPtrDescriptor.class) .stream() .map(descriptor -> descriptor.getElement()) .collect(Collectors.toSet()); myInsideChange++; try{ FormEditingUtil.clearSel... | valueChanged |
45,876 | RadComponent () { return myComponent; } | getComponent |
45,877 | boolean () { return myComponent!=null; } | isValid |
45,878 | void () { // Try to find component with myId starting from root container final RadContainer container=myEditor.getRootContainer(); myComponent= (RadComponent)FormEditingUtil.findComponent(container,myId); } | validate |
45,879 | boolean (final Object obj) { if(!(obj instanceof ComponentPtr)){ return false; } return myId.equals(((ComponentPtr)obj).myId); } | equals |
45,880 | int () { return myId.hashCode(); } | hashCode |
45,881 | boolean () { myPtr.validate(); if(!myPtr.isValid()) { myPtr=null; return true; } final String oldBinding = myBinding; final String oldTitle = myTitle; final RadComponent component = myPtr.getComponent(); if (component.getModule().isDisposed()) { return false; } if(component instanceof RadRootContainer) { myBinding = ((... | update |
45,882 | RadComponent () { return myPtr != null ? myPtr.getComponent() : null; } | getComponent |
45,883 | ComponentPtr () { return myPtr; } | getElement |
45,884 | void (final JComponent component) { component.putClientProperty(CLIENT_PROP_RAD_COMPONENT, this); for (int i = 0; i < component.getComponentCount(); i++) { final Component child = component.getComponent(i); if (child instanceof JComponent) { setRadComponentRecursive((JComponent)child); } } } | setRadComponentRecursive |
45,885 | void (XmlWriter writer) { writer.startElement(UIFormXmlConstants.ELEMENT_NESTED_FORM); try { writeId(writer); writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_FORM_FILE, myFormFileName); writeBinding(writer); writeConstraints(writer); } finally { writer.endElement(); // component } } | write |
45,886 | String () { return myRootContainer.getClassToBind(); } | getComponentClassName |
45,887 | boolean () { return false; } | hasIntrospectedProperties |
45,888 | boolean () { if (super.isCustomCreateRequired()) return true; PsiClass boundClass = FormEditingUtil.findClassToBind(getModule(), myRootContainer.getClassToBind()); return isNonStaticInnerClass(boundClass); } | isCustomCreateRequired |
45,889 | boolean (final PsiClass boundClass) { if (boundClass == null) return false; return PsiUtil.isInnerClass(boundClass) || isNonStaticInnerClass(boundClass.getContainingClass()); } | isNonStaticInnerClass |
45,890 | RadContainer () { return myContainer; } | getContainer |
45,891 | boolean (ComponentDragObject dragObject) { return true; } | canDrop |
45,892 | void (FeedbackLayer feedbackLayer, ComponentDragObject dragObject) { if (myContainer.getComponentCount() == 0) { Dimension initialSize = dragObject.getInitialSize(getContainer()); int originX; if (myAlignment == FlowLayout.CENTER) { originX = myContainer.getSize().width / 2 - initialSize.width / 2 - myHGap; } else if (... | placeFeedback |
45,893 | boolean () { return myAlignment == FlowLayout.LEFT || myAlignment == FlowLayout.LEADING; } | isLeftAlign |
45,894 | boolean () { return myAlignment == FlowLayout.RIGHT || myAlignment == FlowLayout.TRAILING; } | isRightAlign |
45,895 | void (GuiEditor editor, RadComponent[] components, GridConstraints[] constraintsToAdjust, ComponentDragObject dragObject) { for(int i=0; i<myContainer.getComponentCount(); i++) { if (myContainer.getComponent(i).getId().equals(myInsertBeforeId)) { myInsertIndex = i; break; } } if (myInsertIndex > myContainer.getComponen... | processDrop |
45,896 | ComponentDropLocation (Direction direction) { return null; } | getAdjacentLocation |
45,897 | String[] () { final String[] layoutManagerNames = ArrayUtilRt.toStringArray(ourLayoutManagerRegistry.keySet()); Arrays.sort(layoutManagerNames); return layoutManagerNames; } | getLayoutManagerNames |
45,898 | String[] () { ArrayList<String> layoutManagerNames = new ArrayList<>(); for(String name: ourLayoutManagerRegistry.keySet()) { if (!name.equals(UIFormXmlConstants.LAYOUT_XY)) { layoutManagerNames.add(name); } } Collections.sort(layoutManagerNames); return ArrayUtilRt.toStringArray(layoutManagerNames); } | getNonDeprecatedLayoutManagerNames |
45,899 | RadLayoutManager (LayoutManager layout) { if (layout == null) return null; return createFromLayoutClass(layout.getClass()); } | createFromLayout |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.