Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
46,800 | void (final AnAction action, @NonNls final String actionId) { action.registerCustomShortcutSet( ActionManager.getInstance().getAction(actionId).getShortcutSet(), this ); } | registerKeyboardAction |
46,801 | void (final KeyEvent e) { myEditor.myProcessor.processKeyEvent(e); if (!e.isConsumed()) { super.processKeyEvent(e); } } | processKeyEvent |
46,802 | void (final MouseEvent e) { if (e.getID() == MouseEvent.MOUSE_PRESSED) { requestFocusInWindow(); } try { myEditor.myProcessor.processMouseEvent(e); } catch (ProcessCanceledException ex) { throw ex; } catch (Exception ex) { LOG.error(ex); } } | processMouseEvent |
46,803 | void (final MouseEvent e) { myLastMousePosition = e.getPoint(); try { myEditor.myProcessor.processMouseEvent(e); } catch (ProcessCanceledException ex) { throw ex; } catch (Exception ex) { LOG.error(ex); } } | processMouseMotionEvent |
46,804 | Point () { if (myLastMousePosition == null) { return new Point(10, 10); } return myLastMousePosition; } | getLastMousePosition |
46,805 | Object (@NotNull final String dataId) { if (CommonDataKeys.NAVIGATABLE.is(dataId)) { final ComponentTree componentTree = DesignerToolWindowManager.getInstance(myEditor).getComponentTree(); if (componentTree != null) { return componentTree.getData(dataId); } } return null; } | getData |
46,806 | Point () { final ArrayList<RadComponent> selection = FormEditingUtil.getSelectedComponents(myEditor); if (selection.size() > 0) { final RadComponent component = selection.get(0); final Rectangle bounds = component.getBounds(); int bottom = bounds.height > 4 ? bounds.y + bounds.height - 4 : bounds.y; int left = bounds.w... | getBestPopupPosition |
46,807 | void (final GuiEditor editor, final RadComponent component, final Graphics g) { // Collect selected components and paint decoration for non selected components final ArrayList<RadComponent> selection = new ArrayList<>(); final Rectangle layeredPaneRect = editor.getLayeredPane().getVisibleRect(); FormEditingUtil.iterate... | paintComponentDecoration |
46,808 | boolean (final RadComponent component) { if (!component.getDelegee().isShowing()) { // Skip invisible components return true; } final Shape oldClip = g.getClip(); final RadContainer parent = component.getParent(); if (parent != null) { final Point p = SwingUtilities.convertPoint(component.getDelegee(), 0, 0, editor.get... | visit |
46,809 | void (final GuiEditor editor, @NotNull final RadComponent component, final Graphics g) { if (!(component instanceof RadContainer) && !(component instanceof RadNestedForm) && !component.isDragBorder()) { return; } boolean highlightBoundaries = (getDesignTimeInsets(component) > 2); if (component instanceof RadContainer c... | paintComponentBoundsImpl |
46,810 | int (RadComponent component) { while (component != null) { Integer designTimeInsets = (Integer)component.getDelegee().getClientProperty(GridLayoutManager.DESIGN_TIME_INSETS); if (designTimeInsets != null) { return designTimeInsets.intValue(); } component = component.getParent(); } return 0; } | getDesignTimeInsets |
46,811 | void (final GuiEditor editor, @NotNull final RadComponent component, final Graphics g) { if (!editor.isShowGrid()) { return; } if (!(component instanceof RadContainer container)) { return; } if (!container.getLayoutManager().isGrid()) { return; } // performance: don't paint grid outline in drag layer Container parent =... | paintGridOutline |
46,812 | void (@NotNull RadComponent component, Graphics g, boolean focused) { if (component.isSelected()) { if (focused) { g.setColor(PlatformColors.BLUE); } else { g.setColor(Color.GRAY); } final Point[] points = getPoints(component.getWidth(), component.getHeight()); for (final Point point : points) { g.fillRect(point.x - R,... | paintSelectionDecoration |
46,813 | int (@NotNull final RadComponent component, final int x, final int y) { if (component.getParent() == null || !component.isSelected()) { return 0; } // only components in XY can be resized... /* if (!component.getParent().isXY()) { return 0; } */ final int width = component.getWidth(); final int height = component.getHe... | getResizeMask |
46,814 | boolean (final int x, final int y, final Point r) { return x >= r.x - R && x <= r.x + R && y >= r.y - R && y <= r.y + R; } | isInside |
46,815 | int (final int resizeMask) { if (resizeMask == (WEST_MASK | NORTH_MASK)) { return Cursor.NW_RESIZE_CURSOR; } else if (resizeMask == NORTH_MASK) { return Cursor.N_RESIZE_CURSOR; } else if (resizeMask == (EAST_MASK | NORTH_MASK)) { return Cursor.NE_RESIZE_CURSOR; } else if (resizeMask == WEST_MASK) { return Cursor.W_RESI... | getResizeCursor |
46,816 | Point[] (final int width, final int height) { final Point[] points = new Point[8]; points[NW] = new Point(GAP, GAP); // NW points[N] = new Point(width / 2, GAP); // N points[NE] = new Point(width - GAP - 1, GAP); // NE points[E] = new Point(width - GAP - 1, height / 2); // E points[SE] = new Point(width - GAP - 1, heig... | getPoints |
46,817 | void (RadRootContainer rootContainer, RadButtonGroup group, Graphics g) { List<RadComponent> components = rootContainer.getGroupContents(group); if (components.size() < 2) return; Rectangle[] allBounds = new Rectangle[components.size()]; int lastTop = -1; int minLeft = Integer.MAX_VALUE; for (int i = 0; i < components.... | paintButtonGroupLines |
46,818 | void (final RadComponent component, final Graphics g) { if (component instanceof RadContainer) return; for (IProperty prop : component.getModifiedProperties()) { if (prop.getName().equals(SwingProperties.TEXT)) { final Object desc = prop.getPropertyValue(component); if (!(desc instanceof StringDescriptor) || ((StringDe... | paintComponentTag |
46,819 | boolean (final Object element, final VirtualFile vFile) { if (element instanceof Form form){ return form.containsFile(vFile); } return false; } | elementContainsFile |
46,820 | int (final Object element, final boolean isSortByType) { if (element instanceof Form) return 9; return -1; } | getElementWeight |
46,821 | String (final Object element) { if (element instanceof Form) { final PsiFile[] psiFiles = ((Form)element).getFormFiles(); VirtualFile vFile = null; if (psiFiles.length > 0) { vFile = psiFiles [0].getVirtualFile(); } if (vFile != null) { return vFile.getPresentableUrl(); } } return null; } | getElementLocation |
46,822 | boolean (Object element) { if (element instanceof Form) { return !((Form) element).isValid(); } return false; } | isInvalidElement |
46,823 | String () { return "form"; } | getFavoriteTypeId |
46,824 | String (Object element) { if (element instanceof Form form) { return form.getClassToBind().getQualifiedName(); } return null; } | getElementUrl |
46,825 | String (final Object element) { if (element instanceof Form form) { final Module module = ModuleUtil.findModuleForPsiElement(form.getClassToBind()); return module != null ? module.getName() : null; } return null; } | getElementModuleName |
46,826 | Object[] (final Project project, final String url, final String moduleName) { final PsiManager psiManager = PsiManager.getInstance(project); final PsiClass classToBind = JavaPsiFacade.getInstance(psiManager.getProject()).findClass(url, GlobalSearchScope.allScope(project)); if (classToBind == null) return null; return n... | createPathFromUrl |
46,827 | Object (@NotNull Collection<? extends AbstractTreeNode<?>> selected, @NotNull String dataId) { if (Form.DATA_KEY.is(dataId)) { List<Form> result = new ArrayList<>(); for (AbstractTreeNode<?> node : selected) { if (node instanceof FormNode) { result.add(((FormNode)node).getValue()); } } if (!result.isEmpty()) { return r... | getData |
46,828 | Collection<PsiFile> (Collection<? extends BasePsiNode<? extends PsiElement>> formNodes) { List<PsiFile> psiFiles = new ArrayList<>(); for (AbstractTreeNode<?> treeNode : formNodes) { psiFiles.add((PsiFile)treeNode.getValue()); } return psiFiles; } | convertToFiles |
46,829 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
46,830 | void (@NotNull DataContext dataContext) { Project project = CommonDataKeys.PROJECT.getData(dataContext); PsiElement[] elements = collectFormPsiElements(myNodes); DeleteHandler.deletePsiElement(elements, project); } | deleteElement |
46,831 | boolean (@NotNull DataContext dataContext) { PsiElement[] elements = collectFormPsiElements(myNodes); return DeleteHandler.shouldEnableDeleteAction(elements); } | canDeleteElement |
46,832 | PsiElement[] (AbstractTreeNode<?>[] selected) { Set<PsiElement> result = new HashSet<>(); for(AbstractTreeNode<?> node: selected) { if (node.getValue() instanceof Form form) { result.add(form.getClassToBind()); ContainerUtil.addAll(result, form.getFormFiles()); } else if (node.getValue() instanceof PsiElement) { result... | collectFormPsiElements |
46,833 | String () { return "Form:" + getValue().getName(); } | getTestPresentation |
46,834 | boolean (@NotNull VirtualFile file) { for (final AbstractTreeNode aMyChildren : myChildren) { ProjectViewNode treeNode = (ProjectViewNode)aMyChildren; if (treeNode.contains(file)) return true; } return false; } | contains |
46,835 | void (@NotNull PresentationData presentation) { if (getValue() == null || !getValue().isValid()) { setValue(null); } else { presentation.setPresentableText(getValue().getName()); presentation.setIcon(GuiFormFileType.INSTANCE.getIcon()); } } | update |
46,836 | boolean () { return true; } | shouldPostprocess |
46,837 | boolean (VirtualFile file) { return contains(file); } | someChildContainsFile |
46,838 | void (final boolean requestFocus) { getValue().navigate(requestFocus); } | navigate |
46,839 | boolean () { final Form value = getValue(); return value != null && value.canNavigate(); } | canNavigate |
46,840 | boolean () { final Form value = getValue(); return value != null && value.canNavigateToSource(); } | canNavigateToSource |
46,841 | String () { return IdeBundle.message("tooltip.ui.designer.form"); } | getToolTip |
46,842 | FileStatus () { for(BasePsiNode<? extends PsiElement> child: myChildren) { final PsiElement value = child.getValue(); if (value == null || !value.isValid()) continue; final FileStatus fileStatus = NavigationItemFileStatus.get(child); if (fileStatus != FileStatus.NOT_CHANGED) { return fileStatus; } } return FileStatus.N... | getFileStatus |
46,843 | boolean (final Condition<? super PsiFile> condition) { for(BasePsiNode<? extends PsiElement> child: myChildren) { if (condition.value(child.getValue().getContainingFile())) { return true; } } return false; } | canHaveChildrenMatching |
46,844 | AbstractTreeNode (final PsiClass classToBind, final Project project, final ViewSettings settings) { final Form form = new Form(classToBind); final Collection<BasePsiNode<? extends PsiElement>> children = getChildren(project, form, settings); return new FormNode(project, form, settings, children); } | constructFormNode |
46,845 | boolean (Object object) { if (object instanceof Form form){ return myFormFiles.equals(form.myFormFiles) && myClassToBind.equals(form.myClassToBind); } else { return false; } } | equals |
46,846 | int () { return myFormFiles.hashCode() ^ myClassToBind.hashCode(); } | hashCode |
46,847 | String () { return myClassToBind.getName(); } | getName |
46,848 | PsiClass () { return myClassToBind; } | getClassToBind |
46,849 | PsiFile[] () { return PsiUtilCore.toPsiFileArray(myFormFiles); } | getFormFiles |
46,850 | void (boolean requestFocus) { for (PsiFile psiFile : myFormFiles) { if (psiFile != null && psiFile.canNavigate()) { psiFile.navigate(requestFocus); } } } | navigate |
46,851 | boolean () { for (PsiFile psiFile : myFormFiles) { if (psiFile != null && psiFile.canNavigateToSource()) return true; } return false; } | canNavigateToSource |
46,852 | boolean () { for (PsiFile psiFile : myFormFiles) { if (psiFile != null && psiFile.canNavigate()) return true; } return false; } | canNavigate |
46,853 | boolean () { if (myFormFiles.size() == 0) return false; for (PsiFile psiFile : myFormFiles) { if (!psiFile.isValid()) { return false; } } if (!myClassToBind.isValid()) { return false; } return true; } | isValid |
46,854 | boolean (final VirtualFile vFile) { final PsiFile classFile = myClassToBind.getContainingFile(); final VirtualFile classVFile = classFile == null ? null : classFile.getVirtualFile(); if (classVFile != null && classVFile.equals(vFile)) { return true; } for (PsiFile psiFile : myFormFiles) { final VirtualFile virtualFile ... | containsFile |
46,855 | Iterator<PsiElement> () { ArrayList<PsiElement> list = new ArrayList<>(myFormFiles); list.add(0, myClassToBind); return list.iterator(); } | iterator |
46,856 | boolean (@NotNull DataContext dataContext) { Form[] forms = Form.DATA_KEY.getData(dataContext); return forms != null && forms.length == 1; } | isAvailableOnDataContext |
46,857 | void (@NotNull Project project, Editor editor, PsiFile file, DataContext dataContext) { Form[] forms = Form.DATA_KEY.getData(dataContext); if (forms == null || forms.length != 1) return; PsiClass boundClass = forms [0].getClassToBind(); RefactoringActionHandlerFactory.getInstance().createRenameHandler().invoke(project,... | invoke |
46,858 | void (@NotNull Project project, PsiElement @NotNull [] elements, DataContext dataContext) { invoke(project, null, null, dataContext); } | invoke |
46,859 | boolean (DataContext dataContext) { Form[] forms = Form.DATA_KEY.getData(dataContext); return forms != null && forms.length > 0; } | canMove |
46,860 | boolean (PsiElement psiElement, PsiElement[] sources) { return MoveFilesOrDirectoriesHandler.isValidTarget(psiElement); } | isValidTarget |
46,861 | boolean (PsiElement[] elements, @Nullable final PsiElement targetContainer, @Nullable PsiReference reference) { return false; } | canMove |
46,862 | void (DataContext dataContext, Set<PsiElement> filesOrDirs) { Form[] forms = Form.DATA_KEY.getData(dataContext); LOG.assertTrue(forms != null); PsiClass[] classesToMove = new PsiClass[forms.length]; PsiFile[] filesToMove = new PsiFile[forms.length]; for(int i=0; i<forms.length; i++) { classesToMove [i] = forms [i].getC... | collectFilesOrDirsFromContext |
46,863 | boolean (PsiElement source, PsiElement target) { if (source instanceof PsiFile && source.getParent() == target) { final VirtualFile virtualFile = ((PsiFile)source).getVirtualFile(); if (virtualFile != null && virtualFile.getFileType() instanceof GuiFormFileType) { return true; } } return super.isMoveRedundant(source, t... | isMoveRedundant |
46,864 | boolean (@NotNull Language language) { return false; // only available in project view } | supportsLanguage |
46,865 | void (ChangeEvent e) { updateIntentionHintPosition(viewPort); } | stateChanged |
46,866 | GuiEditor () { return myEditor; } | getEditor |
46,867 | void (final GuiEditor editor) { myEditor = editor; } | setEditor |
46,868 | void () { if(!myComponent.isShowing() || !IJSwingUtilities.hasFocus(myComponent)){ hideIntentionHint(); return; } if (myHint == null || !myHint.isVisible()) { updateIntentionHintVisibility(); } else { final ErrorInfo[] errorInfos = getErrorInfos(); final Rectangle bounds = getErrorBounds(); if (!haveFixes(errorInfos) |... | refreshIntentionHint |
46,869 | void () { myAlarm.cancelAllRequests(); myAlarm.addRequest(myShowHintRequest, 500); } | updateIntentionHintVisibility |
46,870 | void () { if(!myComponent.isShowing() || !IJSwingUtilities.hasFocus(myComponent)){ hideIntentionHint(); return; } // 1. Hide previous hint (if any) hideIntentionHint(); // 2. Found error (if any) final ErrorInfo[] errorInfos = getErrorInfos(); if(!haveFixes(errorInfos)) { hideIntentionHint(); return; } // 3. Determine ... | showIntentionHint |
46,871 | void (final JViewport viewPort) { if (myHint != null && myHint.isVisible()) { Rectangle rc = getErrorBounds(); if (rc != null) { myLastHintBounds = rc; Rectangle hintRect = new Rectangle(rc.x - AllIcons.Actions.IntentionBulb.getIconWidth() - 4, rc.y, AllIcons.Actions.IntentionBulb .getIconWidth() + 4, AllIcons.Actions.... | updateIntentionHintPosition |
46,872 | Rectangle (final JViewport viewPort) { return viewPort.getViewRect(); } | getHintClipRect |
46,873 | boolean (final ErrorInfo[] errorInfos) { boolean haveFixes = false; for(ErrorInfo errorInfo: errorInfos) { if (errorInfo.myFixes.length > 0 || errorInfo.getInspectionId() != null) { haveFixes = true; break; } } return haveFixes; } | haveFixes |
46,874 | void () { myAlarm.cancelAllRequests(); if(myHint != null && myHint.isVisible()){ myHint.hide(); myComponent.paintImmediately(myComponent.getVisibleRect()); } } | hideIntentionHint |
46,875 | void () { LOG.debug("showIntentionPopup()"); if(myHint == null || !myHint.isVisible()){ return; } final ErrorInfo[] errorInfos = getErrorInfos(); if(!haveFixes(errorInfos)){ return; } final ArrayList<ErrorWithFix> fixList = new ArrayList<>(); for(ErrorInfo errorInfo: errorInfos) { final QuickFix[] quickFixes = errorInf... | showIntentionPopup |
46,876 | void (final ErrorInfo errorInfo, final ArrayList<ErrorWithFix> suppressList, boolean named) { final String suppressName = named ? UIDesignerBundle.message("action.suppress.named.for.component", errorInfo.myDescription) : UIDesignerBundle.message("action.suppress.for.component"); final String suppressAllName = named ? U... | buildSuppressFixes |
46,877 | String (final ErrorWithFix value) { return value.second.getName(); } | getTextFor |
46,878 | PopupStep (final ErrorWithFix selectedValue, final boolean finalChoice) { if (selectedValue.second instanceof PopupQuickFix) { return ((PopupQuickFix) selectedValue.second).getPopupStep(); } if (finalChoice || !myShowSuppresses) { return doFinalStep( () -> CommandProcessor.getInstance().executeCommand(myEditor.getProje... | onChosen |
46,879 | boolean (final ErrorWithFix selectedValue) { return (myShowSuppresses && selectedValue.first.getInspectionId() != null && selectedValue.second.getComponent() != null && !(selectedValue.second instanceof SuppressFix)) || selectedValue.second instanceof PopupQuickFix; } | hasSubstep |
46,880 | void () { if (!myEditor.ensureEditable()) return; myEditor.getRootContainer().suppressInspection(myInspectionId, myComponent); myEditor.refreshAndSave(true); DaemonCodeAnalyzer.getInstance(myEditor.getProject()).restart(); } | run |
46,881 | void () { myManager.showIntentionHint(); } | run |
46,882 | boolean (@NotNull MouseEvent e, int clickCount) { myManager.showIntentionPopup(); return true; } | onClick |
46,883 | void (final Graphics g) { myIcon.paintIcon(this, g, 0, 0); } | paintComponent |
46,884 | void () { CustomCreateProperty.generateCreateComponentsMethod(myClass); } | run |
46,885 | void (@NotNull final Project project, @NotNull final RadContainer rootContainer, @NotNull final PsiClass boundClass, @NotNull final String fieldClassName, @NotNull final String fieldName, final boolean showErrors, @Nullable final Object undoGroupId) { ApplicationManager.getApplication().assertReadAccessAllowed(); PsiDo... | runImpl |
46,886 | void (final Project project, final PsiClass fieldClass, final String fieldName, final PsiClass boundClass, final boolean showErrors, final IContainer rootContainer) { // 1. Create field final PsiElementFactory factory = JavaPsiFacade.getInstance(project).getElementFactory(); final PsiType type = factory.createType(fiel... | createField |
46,887 | void () { runImpl(myEditor.getProject(), myEditor.getRootContainer(), myClass, myFieldClassName, myFieldName, true, null); } | run |
46,888 | void (@NotNull final AnActionEvent e) { final GuiEditor editor = myManager.getEditor(); if (editor == null) return; // 1. Show light bulb myManager.showIntentionHint(); // 2. Commit possible non committed value and show popup final PropertyInspector propertyInspector = DesignerToolWindowManager.getInstance(myManager.ge... | actionPerformed |
46,889 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
46,890 | void (@NotNull AnActionEvent e) { // Alt-Enter hotkey for editor takes precedence over this action e.getPresentation().setEnabled(e.getData(CommonDataKeys.EDITOR) == null); } | update |
46,891 | void () { final Project project = myEditor.getProject(); final ProjectFileIndex fileIndex = ProjectRootManager.getInstance(project).getFileIndex(); final VirtualFile sourceRoot = fileIndex.getSourceRootForFile(myEditor.getFile()); if(sourceRoot == null){ Messages.showErrorDialog( myEditor, UIDesignerBundle.message("err... | run |
46,892 | boolean (final IComponent component) { if (component.getBinding() != null) { final PsiClass fieldClass = JavaPsiFacade.getInstance(psiManager.getProject()).findClass(component.getComponentClassName(), scope); if (fieldClass != null) { PsiType fieldType = JavaPsiFacade.getInstance(psiManager.getProject()).getElementFact... | visit |
46,893 | void () { if(myComponent.isShowing()){ myManager.updateIntentionHintVisibility(); } else{ myManager.hideIntentionHint(); } } | visibilityChanged |
46,894 | void () { final PsiFile psiFile = myField.getContainingFile(); if (psiFile == null) return; if (!FileModificationService.getInstance().preparePsiElementForWrite(psiFile)) return; ApplicationManager.getApplication().runWriteAction(() -> CommandProcessor.getInstance().executeCommand(myField.getProject(), () -> { try { fi... | run |
46,895 | RadComponent () { return myComponent; } | getComponent |
46,896 | void (final FocusEvent e) { if(!e.isTemporary()){ myManager.updateIntentionHintVisibility(); } } | focusGained |
46,897 | void (final FocusEvent e) { if(!(e.isTemporary())){ myManager.hideIntentionHint(); } } | focusLost |
46,898 | void (final GuiEditor editor, final List<? extends RadComponent> selection, final AnActionEvent e) { if (myColumnDelta != 0) { // sort the selection so that move in indexed layout will handle components in correct order selection.sort((o1, o2) -> { int index1 = o1.getParent().indexOfComponent(o1); int index2 = o2.getPa... | actionPerformed |
46,899 | void (@NotNull GuiEditor editor, final ArrayList<? extends RadComponent> selection, final AnActionEvent e) { e.getPresentation().setEnabled(true); for(RadComponent c: selection) { if (!c.getParent().getLayoutManager().canMoveComponent(c, myRowDelta, myColumnDelta, myRowSpanDelta, myColSpanDelta)) { e.getPresentation().... | update |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.