Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
279,400
String () { return myNewPluginId; }
getNewPluginId
279,401
void () { updateStep(); }
stateChanged
279,402
void (final @NlsContexts.DialogTitle String title) { setTitle(title); myCurrentStep = 0; myPreviousButton = new JButton(IdeBundle.message("button.wizard.previous")); myNextButton = new JButton(IdeBundle.message("button.wizard.next")); myCancelButton = new JButton(CommonBundle.getCancelButtonText()); myHelpButton = isNe...
initWizard
279,403
void (final ActionEvent e) { helpAction(); }
actionPerformed
279,404
void (final ActionEvent e) { helpAction(); }
actionPerformed
279,405
JComponent () { if (useDialogWrapperSouthPanel()) return super.createSouthPanel(); JPanel panel = new JPanel(new BorderLayout()); int inset = isNewWizard() ? 15 : 0; panel.setBorder(isNewWizard() ? BorderFactory.createEmptyBorder(4, inset, 4, inset) : BorderFactory.createEmptyBorder(8, inset, 0, inset)); JPanel buttonP...
createSouthPanel
279,406
void (final ActionEvent e) { doPreviousAction(); }
actionPerformed
279,407
void (final ActionEvent e) { proceedToNextStep(); }
actionPerformed
279,408
void (final ActionEvent e) { doCancelAction(); }
actionPerformed
279,409
void (final ActionEvent e) { helpAction(); }
actionPerformed
279,410
boolean () { return false; }
useDialogWrapperSouthPanel
279,411
void () { if (isLastStep()) { // Commit data of current step and perform OK action Step currentStep = mySteps.get(myCurrentStep); LOG.assertTrue(currentStep != null); try { currentStep._commit(true); doOKAction(); } catch (CommitStepException exc) { String message = exc.getMessage(); Messages.showErrorDialog(myContentP...
proceedToNextStep
279,412
JPanel () { return myContentPanel; }
getContentComponent
279,413
void (final GroupLayout.Group hGroup, final GroupLayout.Group vGroup, final @Nullable Collection<? super Component> collection, final Component... components) { for (Component component : components) { hGroup.addComponent(component); vGroup.addComponent(component); if (collection != null) collection.add(component); } }
add
279,414
void (Graphics g) { if (myIcon == null) return; paintIcon(g); }
paintChildren
279,415
void (Graphics g) { if (myIcon == null) { return; } final BufferedImage image = ImageUtil.createImage(g, myIcon.getIconWidth(), myIcon.getIconHeight(), BufferedImage.TYPE_INT_ARGB); final Graphics2D gg = image.createGraphics(); myIcon.paintIcon(this, gg, 0, 0); final Rectangle bounds = g.getClipBounds(); int y = myIcon...
paintIcon
279,416
void (Icon icon) { myIcon = icon; revalidate(); repaint(); }
setIcon
279,417
Dimension () { return new Dimension(myIcon != null ? myIcon.getIconWidth() : 0, 0); }
getPreferredSize
279,418
Dimension () { return new Dimension(myIcon != null ? myIcon.getIconWidth() : 0, 0); }
getMinimumSize
279,419
JComponent () { JPanel panel = new JPanel(new BorderLayout()); panel.add(myIcon, BorderLayout.WEST); panel.add(myContentPanel, BorderLayout.CENTER); return panel; }
createCenterPanel
279,420
int () { return myCurrentStep; }
getCurrentStep
279,421
int () { return mySteps.size(); }
getStepCount
279,422
T () { return mySteps.get(myCurrentStep); }
getCurrentStepObject
279,423
void (final @NotNull T step) { addStep(step, mySteps.size()); }
addStep
279,424
void (final @NotNull T step, int index) { mySteps.add(index, step); if (step instanceof StepAdapter) { ((StepAdapter)step).registerStepListener(myStepListener); } // card layout is used final Component component = step.getComponent(); if (component != null) { addStepComponent(component); } }
addStep
279,425
void () { super.init(); updateStep(); }
init
279,426
String (@NotNull Component component) { if (component instanceof JPanel) { ((JPanel)component).putClientProperty(DIALOG_CONTENT_PANEL_PROPERTY, true); } String id = myComponentToIdMap.get(component); if (id == null) { id = Integer.toString(myComponentToIdMap.size()); myComponentToIdMap.put(component, id); myContentPane...
addStepComponent
279,427
void (final Component component) { String id = myComponentToIdMap.get(component); if (id == null) { id = addStepComponent(component); myContentPanel.revalidate(); myContentPanel.repaint(); } ((JBCardLayout)myContentPanel.getLayout()).swipe(myContentPanel, id, myTransitionDirection); }
showStepComponent
279,428
void () { // Commit data of current step final Step currentStep = mySteps.get(myCurrentStep); LOG.assertTrue(currentStep != null); try { currentStep._commit(false); } catch (final CommitStepException exc) { Messages.showErrorDialog( myContentPanel, exc.getMessage() ); return; } myCurrentStep = getPreviousStep(myCurrent...
doPreviousAction
279,429
void (JBCardLayout.SwipeDirection direction) { //it would be better to pass 'direction' to 'updateStep' as a parameter, but since that method is used and overridden in plugins // we cannot do it without breaking compatibility try { myTransitionDirection = direction; updateStep(); } finally { myTransitionDirection = JBC...
updateStep
279,430
void () { // Commit data of current step final Step currentStep = mySteps.get(myCurrentStep); LOG.assertTrue(currentStep != null); LOG.assertTrue(!isLastStep(), "steps: " + mySteps + " current: " + currentStep); try { currentStep._commit(false); } catch (final CommitStepException exc) { Messages.showErrorDialog( myCont...
doNextAction
279,431
int (int step) { final int stepCount = mySteps.size(); if (++step >= stepCount) { step = stepCount - 1; } return step; }
getNextStep
279,432
int () { return getNextStep(getCurrentStep()); }
getNextStep
279,433
T () { int step = getNextStep(); return mySteps.get(step); }
getNextStepObject
279,434
int (int step) { if (--step < 0) { step = 0; } return step; }
getPreviousStep
279,435
int () { return getPreviousStep(getCurrentStep()); }
getPreviousStep
279,436
void () { if (mySteps.isEmpty()) { return; } final Step step = mySteps.get(myCurrentStep); LOG.assertTrue(step != null); step._init(); myCurrentStepComponent = step.getComponent(); LOG.assertTrue(myCurrentStepComponent != null); showStepComponent(myCurrentStepComponent); Icon icon = step.getIcon(); if (icon != null) { ...
updateStep
279,437
void (@Nullable JComponent component) { if (component != null) { UiNotifyConnector.doWhenFirstShown(component, () -> { var focusManager = IdeFocusManager.findInstanceByComponent(component); focusManager.requestFocus(component, false); }); } }
requestFocusTo
279,438
boolean () { return true; }
canGoNext
279,439
boolean () { return isLastStep() && canGoNext(); }
canFinish
279,440
void () { boolean lastStep = isLastStep(); updateButtons(lastStep, lastStep ? canFinish() : canGoNext(), isFirstStep()); }
updateButtons
279,441
void () { if (!mySteps.isEmpty() && getRootPane() != null) updateButtons(); }
updateWizardButtons
279,442
void (boolean lastStep, boolean canGoNext, boolean firstStep) { if (lastStep) { if (mySteps.size() > 1) { myNextButton.setText(UIUtil.removeMnemonic(IdeBundle.message(isNewWizard() ? "button.create" : "button.finish"))); myNextButton.setMnemonic(isNewWizard() ? KeyEvent.VK_C : KeyEvent.VK_F); } else { myNextButton.setT...
updateButtons
279,443
boolean () { return Experiments.getInstance().isFeatureEnabled("new.project.wizard"); }
isNewWizard
279,444
boolean () { return myCurrentStep == 0; }
isFirstStep
279,445
boolean () { return myCurrentStep == mySteps.size() - 1 || getCurrentStep() == getNextStep(getCurrentStep()); }
isLastStep
279,446
JButton () { return myNextButton; }
getNextButton
279,447
JButton () { return myPreviousButton; }
getPreviousButton
279,448
JButton () { return myHelpButton; }
getHelpButton
279,449
JButton () { return myCancelButton; }
getCancelButton
279,450
Component () { return myCurrentStepComponent; }
getCurrentStepComponent
279,451
void () { HelpManager.getInstance().invokeHelp(getHelpID()); }
helpAction
279,452
void () { HelpManager.getInstance().invokeHelp(getHelpID()); }
doHelpAction
279,453
int () { return mySteps.size(); }
getNumberOfSteps
279,454
void (TreeExpander treeExpander) { myTreeExpander = treeExpander; }
setTreeExpander
279,455
void (@NotNull AnActionEvent event) { TreeExpander expander = getExpander(event.getDataContext()); if (expander == null) return; if (!expander.canCollapse()) return; expander.collapseAll(); }
actionPerformed
279,456
void (@NotNull AnActionEvent event) { Presentation presentation = event.getPresentation(); TreeExpander expander = getExpander(event.getDataContext()); presentation.setVisible(expander == null || expander.isCollapseAllVisible()); presentation.setEnabled(expander != null && expander.canCollapse()); }
update
279,457
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
279,458
void (@NotNull AnActionEvent e) { Project project = e.getData(CommonDataKeys.PROJECT); DefaultActionGroup group = new DefaultActionGroup(); fillActions(project, group, e.getDataContext()); showPopup(e, group); }
actionPerformed
279,459
void (AnActionEvent e, DefaultActionGroup group) { if (!myShowPopupWithNoActions && group.getChildrenCount() == 0) return; JBPopupFactory.ActionSelectionAid aid = getAidMethod(); ListPopup popup = JBPopupFactory.getInstance().createActionGroupPopup( getPopupTitle(e), group, e.getDataContext(), aid, true, null, -1, pres...
showPopup
279,460
void (AnActionEvent e, ListPopup popup) { Project project = e.getProject(); if (project != null) { popup.showCenteredInCurrentWindow(project); } else { popup.showInBestPositionFor(e.getDataContext()); } }
showPopup
279,461
void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(e.getData(CommonDataKeys.PROJECT) != null && isEnabled()); }
update
279,462
boolean () { return true; }
isEnabled
279,463
void (@NotNull AnActionEvent event) { TreeExpander expander = getExpander(event.getDataContext()); if (expander == null) return; if (!expander.canExpand()) return; expander.expandAll(); }
actionPerformed
279,464
void (@NotNull AnActionEvent event) { Presentation presentation = event.getPresentation(); TreeExpander expander = getExpander(event.getDataContext()); presentation.setVisible(expander == null || expander.isExpandAllVisible()); presentation.setEnabled(expander != null && expander.canExpand()); }
update
279,465
ActionsCollector () { return ApplicationManager.getApplication().getService(ActionsCollector.class); }
getInstance
279,466
void (@NotNull AnActionEvent e) { DataContext dataContext = e.getDataContext(); final String helpId = getHelpId(dataContext); if (helpId != null) { HelpManager.getInstance().invokeHelp(helpId); } }
actionPerformed
279,467
void (@NotNull AnActionEvent event) { Presentation presentation = event.getPresentation(); if (!ApplicationInfo.contextHelpAvailable()) { presentation.setVisible(false); return; } if (ActionPlaces.isMainMenuOrActionSearch(event.getPlace())) { DataContext dataContext = event.getDataContext(); presentation.setEnabled(get...
update
279,468
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
279,469
void (TreeExpander treeExpander) { myTreeExpander = treeExpander; }
setTreeExpander
279,470
void (@NotNull AnActionEvent e) { final ExclusionHandler<T> exclusionProcessor = e.getData(ExclusionHandler.EXCLUSION_HANDLER); if (exclusionProcessor == null) { e.getPresentation().setEnabledAndVisible(false); return; } final Component component = e.getData(PlatformCoreDataKeys.CONTEXT_COMPONENT); final Presentation p...
update
279,471
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
279,472
void (@NotNull AnActionEvent e) { final JTree tree = (JTree)e.getData(PlatformCoreDataKeys.CONTEXT_COMPONENT); LOG.assertTrue(tree != null); final TreePath[] paths = tree.getSelectionPaths(); LOG.assertTrue(paths != null); final ExclusionHandler<T> exclusionProcessor = e.getData(ExclusionHandler.EXCLUSION_HANDLER); LOG...
actionPerformed
279,473
DataFlavor[] () { return myFlavors; }
getFlavors
279,474
Transferable () { return myTransferable; }
getTransferable
279,475
DropTargetListener () { return ScrollListener.SHARED; }
getSharedListener
279,476
void (@NotNull JComponent component) { if (component instanceof Autoscroll) return; // Swing DnD component.putClientProperty(ENABLED, true); component.setAutoscrolls(false); // disable default scroller if needed DropTarget target = component.getDropTarget(); if (target == null && !GraphicsEnvironment.isHeadless()) { co...
installDropTargetAsNecessary
279,477
void (DropTargetDragEvent event) { getSharedListener().dragEnter(event); // ignore auto-scrolling from TransferHandler.DropHandler.dragEnter ReflectionUtil.setField(listener.getClass(), listener, Object.class, "state", null); ReflectionUtil.setField(listener.getClass(), listener, Component.class, "component", event.get...
dragEnter
279,478
void (DropTargetDragEvent event) { getSharedListener().dragOver(event); // ignore auto-scrolling from TransferHandler.DropHandler.dragOver listener.dropActionChanged(event); // depends on implementation }
dragOver
279,479
void (DropTargetDragEvent event) { getSharedListener().dropActionChanged(event); listener.dropActionChanged(event); }
dropActionChanged
279,480
void (DropTargetEvent event) { getSharedListener().dragExit(event); listener.dragExit(event); }
dragExit
279,481
void (DropTargetDropEvent event) { getSharedListener().drop(event); listener.drop(event); }
drop
279,482
void (DropTargetDragEvent event) { JComponent component = getComponent(event); if (component != null) { Point location = new Point(event.getLocation()); SwingUtilities.convertPointToScreen(location, component); if (Registry.is("ide.dnd.to.front")) { Window window = ComponentUtil.getWindow(component); if (window != null...
update
279,483
boolean (DropTargetDragEvent event) { JComponent component = getComponent(event); if (component == null) { return false; } Point location = new Point(this.screen); SwingUtilities.convertPointFromScreen(location, component); Rectangle bounds = component.getVisibleRect(); // mouse out of a component if (!bounds.contains(...
validate
279,484
void (DropTargetDragEvent event) { update(event); // start scrolling if possible }
dragEnter
279,485
void (DropTargetDragEvent event) { update(event); // continue scrolling if possible }
dragOver
279,486
void (DropTargetDragEvent event) { update(event); // continue scrolling if possible }
dropActionChanged
279,487
void (DropTargetEvent event) { update(null); // stop scrolling }
dragExit
279,488
void (DropTargetDropEvent event) { update(null); // stop scrolling }
drop
279,489
JComponent (DropTargetDragEvent event) { if (event == null) return null; // no appropriate event Object source = event.getDropTargetContext().getComponent(); JComponent component = source instanceof JComponent ? (JComponent)source : null; if (component == null) return null; // heavyweight components are not supported i...
getComponent
279,490
int (int count, int margin, int value, int min, int max) { int offset = Math.min(count * margin, (max - min) / 2); if (value < (min += offset)) { double delta = (min - value) / (double)margin; return count < delta ? 0 : -(int)Math.floor(delta * delta); } if (value > (max -= offset)) { double delta = (value - max) / (do...
getDelta
279,491
Image () { return myImage; }
getImage
279,492
Point () { return myPoint; }
getPoint
279,493
boolean (DnDAction action, @NotNull Point dragOrigin) { return myBeanProvider != null && myAsSource && myBeanProvider.fun(new DnDActionInfo(action, dragOrigin)) != null; }
canStartDragging
279,494
DnDDragStartBean (DnDAction action, @NotNull Point dragOrigin) { return myBeanProvider.fun(new DnDActionInfo(action, dragOrigin)); }
startDragging
279,495
void () { if (myDropEndedCallback != null) { myDropEndedCallback.run(); } }
dragDropEnd
279,496
void (int gestureModifiers) { if (myDropActionHandler != null) { myDropActionHandler.dropActionChanged(gestureModifiers); } }
dropActionChanged
279,497
boolean (DnDEvent event) { if (myChecker == null) { event.setDropPossible(true); return false; } return myChecker.update(event); }
update
279,498
boolean (DnDEvent aEvent) { return myHandler == null || myHandler.tryDrop(aEvent); }
tryDrop
279,499
void () { if (myCleanUpCallback != null) { myCleanUpCallback.run(); } }
cleanUpOnLeave