Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
280,100 | MasterDetailsStateService (@NotNull Project project) { return project.getService(MasterDetailsStateService.class); } | getInstance |
280,101 | void (@NotNull @NonNls String key, @NotNull MasterDetailsState state) { final Element element = XmlSerializer.serialize(state); final ComponentState componentState = new ComponentState(); componentState.myKey = key; componentState.mySettings = element; myStates.put(key, componentState); } | setComponentState |
280,102 | States () { States states = new States(); states.myStates.addAll(myStates.values()); states.getStates().sort(Comparator.comparing(o -> o.myKey)); return states; } | getState |
280,103 | void (@NotNull States states) { myStates.clear(); for (ComponentState state : states.getStates()) { myStates.put(state.myKey, state); } } | loadState |
280,104 | List<ComponentState> () { return myStates; } | getStates |
280,105 | void (List<ComponentState> states) { myStates = states; } | setStates |
280,106 | int () { return showImpl(true).getExitCode(); } | show |
280,107 | boolean () { return showImpl(true).isOK(); } | showAndGet |
280,108 | void () { showImpl(false); } | showNotModal |
280,109 | void () { } | dispose |
280,110 | MyDialogWrapper (boolean isModal) { myDialogWrapper.setTitle(myTitle); myDialogWrapper.init(); myDialogWrapper.setModal(isModal); myDialogWrapper.show(); if (isModal) { myDialogWrapper.dispose(); } return myDialogWrapper; } | showImpl |
280,111 | void (JComponent centerPanel) { myCenterPanel = centerPanel; } | setCenterPanel |
280,112 | DialogBuilder (@NotNull JComponent centerPanel) { myCenterPanel = centerPanel; return this; } | centerPanel |
280,113 | DialogBuilder (@NotNull JComponent northPanel) { myNorthPanel = northPanel; return this; } | setNorthPanel |
280,114 | void (@DialogTitle String title) { myTitle = title; } | setTitle |
280,115 | DialogBuilder (@NotNull @DialogTitle String title) { myTitle = title; return this; } | title |
280,116 | void (JComponent component) { myPreferedFocusComponent = component; } | setPreferredFocusComponent |
280,117 | void (@NonNls String dimensionServiceKey) { myDimensionServiceKey = dimensionServiceKey; } | setDimensionServiceKey |
280,118 | DialogBuilder (@NotNull @NlsSafe String dimensionServiceKey) { myDimensionServiceKey = dimensionServiceKey; return this; } | dimensionKey |
280,119 | void (Action action) { addActionDescriptor(new CustomActionDescriptor(action)); } | addAction |
280,120 | DialogBuilder (Action action) { myDialogWrapper.addLeftSideAction(action); return this; } | addLeftSideAction |
280,121 | ArrayList<ActionDescriptor> () { if (myActions == null) removeAllActions(); return myActions; } | getActionDescriptors |
280,122 | void (ActionDescriptor... descriptors) { removeAllActions(); ContainerUtil.addAll(myActions, descriptors); } | setActionDescriptors |
280,123 | void () { myActions = new ArrayList<>(); } | removeAllActions |
280,124 | Window () { return myDialogWrapper.getWindow(); } | getWindow |
280,125 | CustomizableAction () { return addActionDescriptor(new OkActionDescriptor()); } | addOkAction |
280,126 | CustomizableAction () { return addActionDescriptor(new CancelActionDescriptor()); } | addCancelAction |
280,127 | CustomizableAction () { CustomizableAction closeAction = addOkAction(); closeAction.setText(CommonBundle.getCloseButtonText()); return closeAction; } | addCloseButton |
280,128 | void (@NotNull Disposable disposable) { Disposer.register(this, disposable); } | addDisposable |
280,129 | DialogWrapper () { return myDialogWrapper; } | getDialogWrapper |
280,130 | void (boolean modal) { if (modal) { show(); } else { showNotModal(); } } | showModal |
280,131 | void (@NonNls String helpId) { myDialogWrapper.setHelpId(helpId); } | setHelpId |
280,132 | void (Runnable runnable) { myCancelOperation = runnable; } | setCancelOperation |
280,133 | void (Runnable runnable) { myOkOperation = runnable; } | setOkOperation |
280,134 | void (final boolean isEnabled) { myDialogWrapper.setOKActionEnabled(isEnabled); } | setOkActionEnabled |
280,135 | DialogBuilder (boolean isEnabled) { myDialogWrapper.setOKActionEnabled(isEnabled); return this; } | okActionEnabled |
280,136 | DialogBuilder (boolean resizable) { myDialogWrapper.setResizable(resizable); return this; } | resizable |
280,137 | CustomizableAction () { return get(getActionDescriptors(), OkActionDescriptor.class); } | getOkAction |
280,138 | CustomizableAction (final List<? extends ActionDescriptor> actionDescriptors, final Class aClass) { for (ActionDescriptor actionDescriptor : actionDescriptors) { if (actionDescriptor.getClass().isAssignableFrom(aClass)) return (CustomizableAction)actionDescriptor; } return null; } | get |
280,139 | CustomizableAction () { return get(getActionDescriptors(), CancelActionDescriptor.class); } | getCancelAction |
280,140 | Component () { return myCenterPanel; } | getCenterPanel |
280,141 | Action (DialogWrapper dialogWrapper) { Action action = createAction(dialogWrapper); action.putValue(Action.NAME, myName); if (myMnemonicChar != null) action.putValue(Action.MNEMONIC_KEY, myMnemonicChar); if (myIsDefault) action.putValue(Action.DEFAULT, Boolean.TRUE); return action; } | getAction |
280,142 | void (boolean isDefault) { myIsDefault = isDefault; } | setDefault |
280,143 | CloseDialogAction (String name, int mnemonicChar, int exitCode) { CloseDialogAction closeDialogAction = new CloseDialogAction(name, mnemonicChar, exitCode); closeDialogAction.setDefault(true); return closeDialogAction; } | createDefault |
280,144 | Action (final DialogWrapper dialogWrapper) { return new AbstractAction(){ @Override public void actionPerformed(@NotNull ActionEvent e) { dialogWrapper.close(myExitCode); } }; } | createAction |
280,145 | void (@NotNull ActionEvent e) { dialogWrapper.close(myExitCode); } | actionPerformed |
280,146 | Action (DialogWrapper dialogWrapper) { return myAction; } | getAction |
280,147 | void (String text) { myText = text; } | setText |
280,148 | Action (DialogWrapper dialogWrapper) { Action builtinAction = getBuiltinAction((MyDialogWrapper)dialogWrapper); if (myText != null) builtinAction.putValue(Action.NAME, myText); return builtinAction; } | getAction |
280,149 | Action (MyDialogWrapper dialogWrapper) { return dialogWrapper.getOKAction(); } | getBuiltinAction |
280,150 | Action (MyDialogWrapper dialogWrapper) { return dialogWrapper.getCancelAction(); } | getBuiltinAction |
280,151 | void (@NonNls String helpId) { myHelpId = helpId; } | setHelpId |
280,152 | void (Action action) { if (myLeftSideActions == null) { myLeftSideActions = new ArrayList<>(); } myLeftSideActions.add(action); } | addLeftSideAction |
280,153 | void () { super.init(); } | init |
280,154 | Action () { return super.getOKAction(); } | getOKAction |
280,155 | Action () { return super.getCancelAction(); } | getCancelAction |
280,156 | JComponent () { return myCenterPanel; } | createCenterPanel |
280,157 | JComponent () { return myNorthPanel; } | createNorthPanel |
280,158 | void () { myPreferedFocusComponent = null; super.dispose(); } | dispose |
280,159 | JComponent () { if (myPreferedFocusComponent != null) return myPreferedFocusComponent; FocusTraversalPolicy focusTraversalPolicy = null; Container container = myCenterPanel; while (container != null && (focusTraversalPolicy = container.getFocusTraversalPolicy()) == null && !(container instanceof Window)) { container = container.getParent(); } if (focusTraversalPolicy == null) return null; Component component = focusTraversalPolicy.getDefaultComponent(myCenterPanel); while (!(component instanceof JComponent) && component != null) { component = focusTraversalPolicy.getComponentAfter(myCenterPanel, component); } return (JComponent)component; } | getPreferredFocusedComponent |
280,160 | String () { return myDimensionServiceKey; } | getDimensionServiceKey |
280,161 | JButton (Action action) { JButton button = super.createJButtonForAction(action); Object value = action.getValue(REQUEST_FOCUS_ENABLED); if (value instanceof Boolean) button.setRequestFocusEnabled(((Boolean)value).booleanValue()); return button; } | createJButtonForAction |
280,162 | void () { if (!getCancelAction().isEnabled()) return; if (myCancelOperation != null) { myCancelOperation.run(); } else { super.doCancelAction(); } } | doCancelAction |
280,163 | void () { if (myOkOperation != null) { myOkOperation.run(); } else { super.doOKAction(); } } | doOKAction |
280,164 | void (final @NlsContexts.DialogMessage @Nullable String text) { myDialogWrapper.setErrorText(text); } | setErrorText |
280,165 | void (final @NlsContexts.DialogMessage @Nullable String text, @Nullable JComponent component) { myDialogWrapper.setErrorText(text, component); } | setErrorText |
280,166 | void (@NotNull ContentManagerEvent event) { if (event.getContent().getComponent() == PanelWithActionsAndCloseButton.this) { Disposer.dispose(PanelWithActionsAndCloseButton.this); myContentManager.removeContentManagerListener(this); } } | contentRemoved |
280,167 | void () { myCloseEnabled = false; } | disableClose |
280,168 | void () { addActionsTo(myToolbarGroup); myToolbarGroup.add(new MyCloseAction()); ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.FILEHISTORY_VIEW_TOOLBAR, myToolbarGroup, ! myVerticalToolbar); JComponent centerPanel = createCenterPanel(); toolbar.setTargetComponent(centerPanel); for (AnAction action : myToolbarGroup.getChildren(null)) { action.registerCustomShortcutSet(action.getShortcutSet(), centerPanel); } add(centerPanel, BorderLayout.CENTER); if (myVerticalToolbar) { add(toolbar.getComponent(), BorderLayout.WEST); } else { add(toolbar.getComponent(), BorderLayout.NORTH); } } | init |
280,169 | Object (@NotNull String dataId) { return PlatformCoreDataKeys.HELP_ID.is(dataId) ? myHelpId : null; } | getData |
280,170 | void (DefaultActionGroup group) {} | addActionsTo |
280,171 | void (@NotNull AnActionEvent e) { super.update(e); e.getPresentation().setVisible(myCloseEnabled); } | update |
280,172 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
280,173 | void (@NotNull AnActionEvent e) { if (myContentManager != null) { Content content = myContentManager.getContent(PanelWithActionsAndCloseButton.this); if (content != null) { ContentsUtil.closeContentTab(myContentManager, content); } } } | actionPerformed |
280,174 | ComboBoxTableRenderer<T> (int clickCount) { myClickCount = clickCount; return this; } | withClickCount |
280,175 | Dimension () { Dimension size = addIconSize(super.getPreferredSize()); if (myValues != null) { String oldText = getText(); Icon oldIcon = getIcon(); for (int i = 0, limit = getPreferredSizeMaxValues(); i < myValues.length && i < limit; i++) { T v = myValues[i]; setText(getTextFor(v)); setIcon(getIconFor(v)); Dimension vSize = addIconSize(super.getPreferredSize()); size.width = Math.max(size.width, vSize.width); size.height = Math.max(size.height, vSize.height); } setText(oldText); setIcon(oldIcon); } return size; } | getPreferredSize |
280,176 | int () { return Integer.MAX_VALUE; } | getPreferredSizeMaxValues |
280,177 | Dimension () { return getPreferredSize(); } | getMinimumSize |
280,178 | Dimension (Dimension d) { return new Dimension(d.width + AllIcons.General.ArrowDown.getIconWidth() + JBUIScale.scale(2), Math.max(d.height, AllIcons.General.ArrowDown.getIconHeight())); } | addIconSize |
280,179 | Icon (@NotNull T value) { return null; } | getIconFor |
280,180 | ListSeparator (T value) { return null; } | getSeparatorAbove |
280,181 | Runnable (@NotNull T value) { stopCellEditing(value); return () -> stopCellEditing(value); } | onChosen |
280,182 | void (Graphics g) { super.paintComponent(g); if (!StringUtil.isEmpty(getText())) { Rectangle r = getBounds(); Insets i = getInsets(); int x = r.width - i.right - AllIcons.General.ArrowDown.getIconWidth(); int y = i.top + (r.height - i.top - i.bottom - AllIcons.General.ArrowDown.getIconHeight()) / 2; AllIcons.General.ArrowDown.paintIcon(this, g, x, y); } } | paintComponent |
280,183 | Component (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { @SuppressWarnings("unchecked") T t = (T)value; myCellState.collectState(table, isSelected, hasFocus, row, column); myCellState.updateRenderer(this); customizeComponent(t, table, isSelected); return this; } | getTableCellRendererComponent |
280,184 | Component (JTable table, Object value, boolean isSelected, int row, int column) { @SuppressWarnings("unchecked") T t = (T)value; myValue = t; myCellState.collectState(table, isSelected, true, row, column); myCellState.updateRenderer(this); customizeComponent(t, table, true); SwingUtilities.invokeLater(() -> showPopup(t, row)); return this; } | getTableCellEditorComponent |
280,185 | boolean (T value, int row) { return true; } | isApplicable |
280,186 | void (T value, int row) { List<T> filtered = ContainerUtil.findAll(myValues, t -> isApplicable(t, row)); ListPopup popup = JBPopupFactory.getInstance().createListPopup(new ListStep<>(this, filtered, value)); popup.addListener(this); popup.setRequestFocus(false); myPopupRef = new WeakReference<>(popup); popup.showUnderneathOf(this); } | showPopup |
280,187 | void (@NotNull LightweightWindowEvent event) { fireEditingCanceled(); } | onClosed |
280,188 | void (T value, JTable table, boolean isSelected) { setOpaque(true); setText(value == null ? "" : getTextFor(value)); setIcon(value == null ? null : getIconFor(value)); } | customizeComponent |
280,189 | Object () { return myValue; } | getCellEditorValue |
280,190 | boolean (EventObject event) { return !(event instanceof MouseEvent) || ((MouseEvent)event).getClickCount() >= myClickCount; } | isCellEditable |
280,191 | boolean (EventObject event) { return true; } | shouldSelectCell |
280,192 | void (T value) { myValue = value; stopCellEditing(); } | stopCellEditing |
280,193 | void (int idx) { stopCellEditing(myValues[idx]); } | chooseItem |
280,194 | boolean () { fireEditingStopped(); hidePopup(); return true; } | stopCellEditing |
280,195 | void () { fireEditingCanceled(); hidePopup(); } | cancelCellEditing |
280,196 | void () { fireEditingEvent(false); } | fireEditingStopped |
280,197 | void () { fireEditingEvent(true); } | fireEditingCanceled |
280,198 | void (boolean cancelled) { Object[] listeners = myListenerList.getListenerList(); // process the listeners last to first, notifying those that are interested in this event for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == CellEditorListener.class) { // Lazily create the event: if (myChangeEvent == null) { myChangeEvent = new ChangeEvent(this); } CellEditorListener listener = (CellEditorListener)listeners[i + 1]; if (cancelled) { listener.editingCanceled(myChangeEvent); } else { listener.editingStopped(myChangeEvent); } } } } | fireEditingEvent |
280,199 | void () { if (myPopupRef != null) { ListPopup popup = myPopupRef.get(); if (popup != null && popup.isVisible()) { popup.cancel(); } myPopupRef = null; } } | hidePopup |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.