Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
47,900 | void (final boolean isContainer) { myIsContainer = isContainer; } | setIsContainer |
47,901 | boolean (final Object o) { if (this == o) return true; if (!(o instanceof ComponentItem componentItem)) return false; if (myClassName != null ? !myClassName.equals(componentItem.myClassName) : componentItem.myClassName != null) return false; if (myDefaultConstraints != null ? !myDefaultConstraints.equals(componentItem.... | equals |
47,902 | int () { int result; result = (myClassName != null ? myClassName.hashCode() : 0); result = 29 * result + (myDefaultConstraints != null ? myDefaultConstraints.hashCode() : 0); result = 29 * result + (myIconPath != null ? myIconPath.hashCode() : 0); result = 29 * result + (myToolTipText != null ? myToolTipText.hashCode()... | hashCode |
47,903 | void (ColoredListCellRenderer cellRenderer, boolean selected, boolean hasFocus) { cellRenderer.setIcon(getSmallIcon()); if (myAnyComponent) { cellRenderer.append(UIDesignerBundle.message("palette.non.palette.component"), SimpleTextAttributes.REGULAR_ATTRIBUTES); cellRenderer.setToolTipText(UIDesignerBundle.message("pal... | customizeCellRenderer |
47,904 | Dimension (final JComponent parent, final ClassLoader loader) { if (myInitialSize != null) { return myInitialSize; } myInitialSize = new Dimension(myDefaultConstraints.myPreferredSize); if (myInitialSize.width <= 0 || myInitialSize.height <= 0) { try { Class aClass = Class.forName(getClassName(), true, loader); RadAtom... | getInitialSize |
47,905 | ComponentItem (final Project project) { ComponentItem result = new ComponentItem(project, "", null, null, new GridConstraints(), new HashMap<>(), false, false, false); result.myAnyComponent = true; return result; } | createAnyComponentItem |
47,906 | boolean () { return myAnyComponent; } | isAnyComponent |
47,907 | boolean () { return myClassName.equals(HSpacer.class.getName()) || myClassName.equals(VSpacer.class.getName()); } | isSpacer |
47,908 | int () { return 18; } | getIconHeight |
47,909 | int () { return 18; } | getIconWidth |
47,910 | void (final Component c, final Graphics g, final int x, final int y) { g.drawImage(myImage, 2, 2, 14, 14, c); } | paintIcon |
47,911 | ActionUpdateThread () { return ActionUpdateThread.BGT; } | getActionUpdateThread |
47,912 | void (@NotNull AnActionEvent e) { Project project = e.getData(CommonDataKeys.PROJECT); if (project == null) return; GroupItem groupItem = e.getData(GroupItem.DATA_KEY); PsiFile psiFile = e.getData(CommonDataKeys.PSI_FILE); PsiElement elementToAdd = (psiFile != null) ? findElementToAdd(psiFile) : null; String className ... | actionPerformed |
47,913 | void (final Project project, final ComponentItem itemToBeAdded) { Palette palette = Palette.getInstance(project); if (itemToBeAdded.getIconPath() == null || itemToBeAdded.getIconPath().length() == 0) { PsiClass aClass = JavaPsiFacade.getInstance(project).findClass(itemToBeAdded.getClassName().replace('$', '.'), Project... | assignDefaultIcon |
47,914 | void (@NotNull AnActionEvent e) { Project project = e.getData(CommonDataKeys.PROJECT); if (e.getData(GroupItem.DATA_KEY) != null || e.getData(ComponentItem.DATA_KEY) != null) { e.getPresentation().setVisible(true); GroupItem groupItem = e.getData(GroupItem.DATA_KEY); e.getPresentation().setEnabled(project != null && (g... | update |
47,915 | PsiElement (final PsiFile psiFile) { if (psiFile.getFileType().equals(GuiFormFileType.INSTANCE)) { return psiFile; } else if (psiFile.getFileType().equals(JavaFileType.INSTANCE)) { final PsiClass psiClass = PsiTreeUtil.getChildOfType(psiFile, PsiClass.class); Project project = psiFile.getProject(); final PsiClass compo... | findElementToAdd |
47,916 | void (@NotNull com.intellij.openapi.editor.event.DocumentEvent e) { updateOKAction(); } | documentChanged |
47,917 | boolean (PsiFile file) { return file.getFileType().equals(GuiFormFileType.INSTANCE); } | accept |
47,918 | void (@NotNull DocumentEvent e) { updateOKAction(); } | textChanged |
47,919 | void (ItemEvent e) { updateOKAction(); } | itemStateChanged |
47,920 | void (final String className) { final JavaCodeFragmentFactory factory = JavaCodeFragmentFactory.getInstance(myProject); PsiPackage defaultPackage = JavaPsiFacade.getInstance(myProject).findPackage(""); final PsiCodeFragment fragment = factory.createReferenceCodeFragment(className, defaultPackage, true, true); myDocumen... | setEditorText |
47,921 | String () { return "reference.dialogs.addEditPaletteComponent"; } | getHelpId |
47,922 | void () { // TODO[vova] implement validation if (myClassRadioButton.isSelected()) { final String className = myDocument.getText().trim(); PsiClass psiClass = JavaPsiFacade.getInstance(myProject).findClass(className, GlobalSearchScope.allScope(myProject)); if (psiClass != null) { myItemToBeEdited.setClassName(getClassOr... | doOKAction |
47,923 | boolean () { VirtualFile formFile = ResourceFileUtil.findResourceFileInProject(myProject, myTfNestedForm.getText()); if (formFile == null) { Messages.showErrorDialog(getWindow(), UIDesignerBundle.message("add.component.cannot.load.form", myTfNestedForm.getText()), CommonBundle.getErrorTitle()); return false; } LwRootCo... | saveNestedForm |
47,924 | String () { if (myOneOff) { return "#com.intellij.uiDesigner.palette.ComponentItemDialog.OneOff"; } return "#com.intellij.uiDesigner.palette.ComponentItemDialog"; } | getDimensionServiceKey |
47,925 | JComponent () { return myTfClassName.getChildComponent(); } | getPreferredFocusedComponent |
47,926 | JComponent () { return myPanel; } | createCenterPanel |
47,927 | void () { myEditorTextField.setEnabled(myClassRadioButton.isSelected()); myTfNestedForm.setEnabled(myNestedFormRadioButton.isSelected()); updateOKAction(); } | updateEnabledTextField |
47,928 | void () { setOKActionEnabled(isOKEnabled()); } | updateOKAction |
47,929 | boolean () { myErrorLabel.setText(" "); if (myClassRadioButton.isSelected()) { if (myDocument == null) { // why? return false; } if (!PsiNameHelper.getInstance(myProject).isQualifiedName(myDocument.getText())) { if (myDocument.getTextLength() > 0) { myErrorLabel.setText(UIDesignerBundle.message("add.component.error.qua... | isOKEnabled |
47,930 | String (final PsiClass aClass) { PsiClass parentClass = PsiTreeUtil.getParentOfType(aClass, PsiClass.class, true); if(parentClass != null) { return getClassOrInnerName(parentClass) + "$" + aClass.getName(); } return aClass.getQualifiedName(); } | getClassOrInnerName |
47,931 | void (final ActionEvent e) { try (AccessToken ignore = SlowOperations.knownIssue("IDEA-307701, EA-766230")) { final TreeClassChooserFactory factory = TreeClassChooserFactory.getInstance(myProject); final TreeClassChooser chooser = factory.createInheritanceClassChooser(UIDesignerBundle.message("title.choose.component.cl... | actionPerformed |
47,932 | void (ActionEvent e) { final TreeClassChooserFactory factory = TreeClassChooserFactory.getInstance(myProject); PsiFile formFile = null; if (myTextField.getText().length() > 0) { VirtualFile formVFile = ResourceFileUtil.findResourceFileInScope(myTextField.getText(), myProject, ProjectScope.getAllScope(myProject)); if (f... | actionPerformed |
47,933 | void (ChangeEvent e) { updateEnabledTextField(); } | stateChanged |
47,934 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); ComponentItem selectedItem = e.getData(ComponentItem.DATA_KEY); if (project == null || selectedItem == null || selectedItem.isAnyComponent() || selectedItem.isSpacer()) { return; } final ComponentItem itemToBeEdited = selectedItem.clone(); /*"Cancel" s... | actionPerformed |
47,935 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
47,936 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); ComponentItem selectedItem = e.getData(ComponentItem.DATA_KEY); GroupItem groupItem = e.getData(GroupItem.DATA_KEY); e.getPresentation().setEnabled(project != null && selectedItem != null && groupItem != null && !selectedItem.isAnyComponent() && !selec... | update |
47,937 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); ComponentItem selectedItem = e.getData(ComponentItem.DATA_KEY); GroupItem groupItem = e.getData(GroupItem.DATA_KEY); if (project == null || selectedItem == null || groupItem == null) return; if(!selectedItem.isRemovable()){ Messages.showInfoMessage( pr... | actionPerformed |
47,938 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
47,939 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); ComponentItem selectedItem = e.getData(ComponentItem.DATA_KEY); GroupItem groupItem = e.getData(GroupItem.DATA_KEY); e.getPresentation().setEnabled(project != null && selectedItem != null && groupItem != null && !selectedItem.isAnyComponent() && select... | update |
47,940 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); GroupItem groupToBeEdited = e.getData(GroupItem.DATA_KEY); if (groupToBeEdited == null || project == null) return; // Ask group name final String groupName = Messages.showInputDialog( project, UIDesignerBundle.message("edit.enter.group.name"), UIDesign... | actionPerformed |
47,941 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
47,942 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); GroupItem groupItem = e.getData(GroupItem.DATA_KEY); e.getPresentation().setEnabled(project != null && groupItem != null && !groupItem.isReadOnly()); } | update |
47,943 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); GroupItem groupToBeRemoved = e.getData(GroupItem.DATA_KEY); if (groupToBeRemoved == null || project == null) return; if(!Palette.isRemovable(groupToBeRemoved)){ Messages.showInfoMessage( project, UIDesignerBundle.message("error.cannot.remove.default.gr... | actionPerformed |
47,944 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
47,945 | void (@NotNull AnActionEvent e) { Project project = e.getProject(); GroupItem groupItem = e.getData(GroupItem.DATA_KEY); ComponentItem selectedItem = e.getData(ComponentItem.DATA_KEY); e.getPresentation().setEnabled(project != null && groupItem != null && !groupItem.isReadOnly() && selectedItem == null); } | update |
47,946 | PaletteGroup[] (VirtualFile vFile) { if (FileTypeRegistry.getInstance().isFileOfType(vFile, GuiFormFileType.INSTANCE)) { Palette palette = Palette.getInstance(myProject); if (myListener == null) { myListener = new Palette.Listener() { @Override public void groupsChanged(@NotNull Palette palette) { fireGroupsChanged(); ... | getActiveGroups |
47,947 | void (@NotNull Palette palette) { fireGroupsChanged(); } | groupsChanged |
47,948 | void (PropertyChangeListener listener) { myPropertyChangeSupport.addPropertyChangeListener(listener); } | addListener |
47,949 | void (PropertyChangeListener listener) { myPropertyChangeSupport.removePropertyChangeListener(listener); } | removeListener |
47,950 | GroupItem () { final GroupItem result = new GroupItem(myName); for(ComponentItem myItem : myItems) { result.addItem(myItem.clone()); } return result; } | clone |
47,951 | boolean () { return myReadOnly; } | isReadOnly |
47,952 | void (final boolean readOnly) { myReadOnly = readOnly; } | setReadOnly |
47,953 | String () { if (mySpecialGroup) { return UIDesignerBundle.message("palette.special.group"); } return myName; } | getName |
47,954 | String () { return "Swing"; } | getTabName |
47,955 | void (@NotNull final String name) { myName = name; } | setName |
47,956 | void (@NotNull final ComponentItem item) { LOG.assertTrue(!myItems.contains(item)); myItems.add(item); } | addItem |
47,957 | void (@NotNull final ComponentItem itemToBeReplaced, @NotNull final ComponentItem replacement) { LOG.assertTrue(myItems.contains(itemToBeReplaced)); final int index = myItems.indexOf(itemToBeReplaced); myItems.set(index, replacement); } | replaceItem |
47,958 | void (@NotNull final ComponentItem item) { LOG.assertTrue(myItems.contains(item)); myItems.remove(item); } | removeItem |
47,959 | boolean (ComponentItem item) { return myItems.contains(item); } | contains |
47,960 | boolean (@NotNull final String className) { for(int i = myItems.size() - 1; i >= 0; i--){ if(className.equals(myItems.get(i).getClassName())){ return true; } } return false; } | containsItemClass |
47,961 | boolean (@NotNull final ComponentItem originalItem, final String className) { for(int i = myItems.size() - 1; i >= 0; i--){ if(className.equals(myItems.get(i).getClassName()) && originalItem != myItems.get(i)) { return true; } } return false; } | containsItemCopy |
47,962 | void (Project project, PaletteItem droppedItem, int index) { if (droppedItem instanceof ComponentItem componentItem) { Palette palette = Palette.getInstance(project); int oldIndex = myItems.indexOf(componentItem); if (oldIndex >= 0) { if (index == -1 || oldIndex == index) return; if (oldIndex < index) { index--; } myIt... | handleDrop |
47,963 | JComponent () { return myEditor; } | getComponent |
47,964 | void () { Disposer.dispose(myEditor); } | dispose |
47,965 | JComponent () { return myEditor.getPreferredFocusedComponent(); } | getPreferredFocusedComponent |
47,966 | String () { return UIDesignerBundle.message("title.gui.designer"); } | getName |
47,967 | GuiEditor () { return myEditor; } | getEditor |
47,968 | VirtualFile () { return myFile; } | getFile |
47,969 | boolean () { return false; } | isModified |
47,970 | boolean () { //TODO[anton,vova] fire when changed return FileDocumentManager.getInstance().getDocument(myFile) != null && FileTypeRegistry.getInstance().isFileOfType(myFile, GuiFormFileType.INSTANCE); } | isValid |
47,971 | void (@NotNull final PropertyChangeListener listener) { //TODO[anton,vova] } | addPropertyChangeListener |
47,972 | void (@NotNull final PropertyChangeListener listener) { //TODO[anton,vova] } | removePropertyChangeListener |
47,973 | BackgroundEditorHighlighter () { if (myBackgroundEditorHighlighter == null) { myBackgroundEditorHighlighter = new MyBackgroundEditorHighlighter(myEditor); } return myBackgroundEditorHighlighter; } | getBackgroundHighlighter |
47,974 | FileEditorState (@NotNull final FileEditorStateLevel ignored) { final Document document = FileDocumentManager.getInstance().getCachedDocument(myFile); long modificationStamp = document != null ? document.getModificationStamp() : myFile.getModificationStamp(); final ArrayList<RadComponent> selection = FormEditingUtil.ge... | getState |
47,975 | void (@NotNull final FileEditorState state) { FormEditingUtil.clearSelection(myEditor.getRootContainer()); final String[] ids = ((MyEditorState)state).getSelectedComponentIds(); for (final String id : ids) { final RadComponent component = (RadComponent)FormEditingUtil.findComponent(myEditor.getRootContainer(), id); if ... | setState |
47,976 | void (@NotNull final String binding) { final RadComponent component = (RadComponent) FormEditingUtil.findComponentWithBinding(myEditor.getRootContainer(), binding); if (component != null) { FormEditingUtil.selectSingleComponent(getEditor(), component); } } | selectComponent |
47,977 | void (@NotNull final String id) { final RadComponent component = (RadComponent)FormEditingUtil.findComponent(myEditor.getRootContainer(), id); if (component != null) { FormEditingUtil.selectSingleComponent(getEditor(), component); } } | selectComponentById |
47,978 | boolean () { return false; } | isDumbAware |
47,979 | boolean (final @NotNull Project project, final @NotNull VirtualFile file) { try (AccessToken ignore = SlowOperations.knownIssue("IDEA-307701, EA-762786")) { return FileTypeRegistry.getInstance().isFileOfType(file, GuiFormFileType.INSTANCE) && !GuiFormFileType.INSTANCE.isBinary() && (ModuleUtilCore.findModuleForFile(fil... | accept |
47,980 | boolean () { return true; } | acceptRequiresReadAction |
47,981 | FileEditor (final @NotNull Project project, final @NotNull VirtualFile file) { LOG.assertTrue(accept(project, file)); return new UIFormEditor(project, file); } | createEditor |
47,982 | FileEditorState (@NotNull Element element, final @NotNull Project project, final @NotNull VirtualFile file) { //TODO[anton,vova] implement return new MyEditorState(-1, ArrayUtilRt.EMPTY_STRING_ARRAY); } | readState |
47,983 | String () { return "ui-designer"; } | getEditorTypeId |
47,984 | FileEditorPolicy () { return FileEditorPolicy.HIDE_DEFAULT_EDITOR; } | getPolicy |
47,985 | String[] () { return mySelectedComponentIds; } | getSelectedComponentIds |
47,986 | boolean (final Object o) { if (this == o) return true; if (!(o instanceof MyEditorState state)) return false; if (myDocumentModificationStamp != state.myDocumentModificationStamp) return false; if (!Arrays.equals(mySelectedComponentIds, state.mySelectedComponentIds)) return false; return true; } | equals |
47,987 | int () { return (int)(myDocumentModificationStamp ^ (myDocumentModificationStamp >>> 32)); } | hashCode |
47,988 | boolean (@NotNull FileEditorState otherState, @NotNull FileEditorStateLevel level) { return otherState instanceof MyEditorState; } | canBeMergedWith |
47,989 | Icon (@NotNull String path, int cacheKey, int flags) { return IconManager.getInstance().loadRasterizedIcon(path, UIDesignerIcons.class.getClassLoader(), cacheKey, flags); } | load |
47,990 | void () { test("","",-1,-1,null); test("abcd","abcd",-1,-1,null); test("abcd","aBCd",1,3,"BC"); test("abcd","a12345d",1,3,"12345"); test("abcd","ad",1,3,""); test("ad","a12345d",1,1,"12345"); test("abcd","adf",1,4,"df"); test("abcd","123bcd",0,1,"123"); test("abcd","1234abcd",0,0,"1234"); test("abcd","1234",0,4,"1234")... | test1 |
47,991 | void (final String oldText, final String newText, final int startOffset, final int endOffset, final String replacement) { final GuiEditor.ReplaceInfo replaceInfo = GuiEditor.findFragmentToChange(oldText, newText); assertEquals(startOffset, replaceInfo.getStartOffset()); assertEquals(endOffset, replaceInfo.getEndOffset(... | test |
47,992 | void () { final Insets margin = new Insets(11,12,13,14); final int hGap = 15; final int vGap = 16; final RadContainer grid = createGrid(2, 3, margin, hGap, vGap); { final LayoutManager oldLayout = grid.getLayout(); GridChangeUtil.insertRowOrColumn(grid, 1, false, false); final GridLayoutManager newLayout = (GridLayoutM... | test_margins_and_gaps |
47,993 | void () { final RadContainer grid = SampleGrid.create(); try { // should cause exception GridChangeUtil.splitRow(grid, -1); assertTrue(false); } catch (IllegalArgumentException ok) { } try { // should cause exception GridChangeUtil.splitRow(grid, SampleGrid.ORIGINAL_ROWS); assertTrue(false); } catch (IllegalArgumentExc... | test_invalid_parameters |
47,994 | RadContainer () { final RadContainer grid = createGrid(ORIGINAL_ROWS, ORIGINAL_COLUMNS); addComponent(0, C0, S0, grid); addComponent(1, C1, S1, grid); addComponent(2, C2, S2, grid); addComponent(3, C3, S3, grid); addComponent(4, C4, S4, grid); addComponent(5, C5, S5, grid); return grid; } | create |
47,995 | void (final int idx, final int cell, final int span, final RadContainer grid) { final RadHSpacer component = new RadHSpacer(null, Integer.toString(idx)); component.getConstraints().restore(new GridConstraints(idx, cell, 1, span, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, 0,0,null,null,null, 0)); grid.add... | addComponent |
47,996 | void () { final RadContainer grid = SampleGrid.create(); GridChangeUtil.splitColumn(grid, 1); assertGridDimensions(grid, SampleGrid.ORIGINAL_ROWS, SampleGrid.ORIGINAL_COLUMNS + 1); assertComponentCellAndSpan(grid, 0, 0, 4); assertComponentCellAndSpan(grid, 1, 1, 4); assertComponentCellAndSpan(grid, 2, 0, 5); assertComp... | test_split |
47,997 | void () { final RadContainer grid = SampleGrid.create(); GridChangeUtil.insertRowOrColumn(grid, 1, false, false); assertGridDimensions(grid, SampleGrid.ORIGINAL_ROWS, SampleGrid.ORIGINAL_COLUMNS + 1); assertComponentCellAndSpan(grid, 0, 0, 4); assertComponentCellAndSpan(grid, 1, 1, 4); assertComponentCellAndSpan(grid, ... | test_insert_1 |
47,998 | void () { final RadContainer grid = SampleGrid.create(); GridChangeUtil.insertRowOrColumn(grid, 0, false, true); assertGridDimensions(grid, SampleGrid.ORIGINAL_ROWS, SampleGrid.ORIGINAL_COLUMNS + 1); // all must be shifted one cell right assertComponentCellAndSpan(grid, 0, SampleGrid.C0 + 1, SampleGrid.S0); assertCompo... | test_insert_first |
47,999 | void () { final RadContainer grid = SampleGrid.create(); GridChangeUtil.insertRowOrColumn(grid, SampleGrid.ORIGINAL_COLUMNS-1, false, false); assertGridDimensions(grid, SampleGrid.ORIGINAL_ROWS, SampleGrid.ORIGINAL_COLUMNS + 1); // no component should change its cell or span assertComponentCellAndSpan(grid, 0, SampleGr... | test_insert_last |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.