Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
245,400
void (@NotNull AnActionEvent e) { Presentation presentation = e.getPresentation(); presentation.setEnabledAndVisible(myManager.canCloseContents() && myContent.isCloseable()); presentation.setText(myManager.getCloseActionName()); }
update
245,401
void (@NotNull AnActionEvent e) { Content[] contents = myManager.getContents(); for (Content content : contents) { if (myContent != content && content.isCloseable()) { myManager.removeContent(content, true); } } myManager.setSelectedContent(myContent); }
actionPerformed
245,402
void (@NotNull AnActionEvent e) { Presentation presentation = e.getPresentation(); presentation.setText(myManager.getCloseAllButThisActionName()); presentation.setEnabledAndVisible(myManager.canCloseContents() && hasOtherCloseableContents()); }
update
245,403
boolean () { Content[] contents = myManager.getContents(); for (Content content : contents) { if (myContent != content && content.isCloseable()) { return true; } } return false; }
hasOtherCloseableContents
245,404
void (@NotNull AnActionEvent e) { for (Content content : myManager.getContents()) { if (content.isCloseable()) { myManager.removeContent(content, true); } } }
actionPerformed
245,405
void (@NotNull AnActionEvent e) { Presentation presentation = e.getPresentation(); Component component = e.getData(PlatformCoreDataKeys.CONTEXT_COMPONENT); boolean notForTheOnlyContent = myManager.getContentCount() > 1 || !(component instanceof ContentTabLabel); presentation.setEnabledAndVisible(notForTheOnlyContent &&...
update
245,406
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
245,407
void (@NotNull AnActionEvent e) { myManager.selectNextContent(); }
actionPerformed
245,408
void (@NotNull AnActionEvent e) { e.getPresentation().setEnabledAndVisible(myManager.getContentCount() > 1); e.getPresentation().setText(myManager.getNextContentActionName()); }
update
245,409
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
245,410
void (@NotNull AnActionEvent e) { myManager.selectPreviousContent(); }
actionPerformed
245,411
void (@NotNull AnActionEvent e) { e.getPresentation().setEnabledAndVisible(myManager.getContentCount() > 1); e.getPresentation().setText(myManager.getPreviousContentActionName()); }
update
245,412
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
245,413
void (@NotNull AnActionEvent e) { Component component = e.getData(PlatformCoreDataKeys.CONTEXT_COMPONENT); InternalDecoratorImpl decorator = InternalDecoratorImpl.findNearestDecorator(component); ContentManager manager = ObjectUtils.notNull(e.getData(PlatformDataKeys.CONTENT_MANAGER), myManager); Content content = Obje...
actionPerformed
245,414
void (@NotNull AnActionEvent e) { AnAction action = ActionUtil.getAction(myHorizontal ? "SplitVertically" : "SplitHorizontally"); if (action != null) { e.getPresentation().setIcon(action.getTemplatePresentation().getIcon()); } e.getPresentation().setEnabledAndVisible(myManager.getContents().length > 1); }
update
245,415
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
245,416
void (@NotNull AnActionEvent e) { InternalDecoratorImpl decorator = InternalDecoratorImpl.findNearestDecorator(e.getData(PlatformCoreDataKeys.CONTEXT_COMPONENT)); decorator.unsplit(myManager.getSelectedContent()); }
actionPerformed
245,417
void (@NotNull AnActionEvent e) { InternalDecoratorImpl decorator = InternalDecoratorImpl.findNearestDecorator(e.getData(PlatformCoreDataKeys.CONTEXT_COMPONENT)); e.getPresentation().setEnabledAndVisible(decorator != null && decorator.canUnsplit()); e.getPresentation().setText(ActionsBundle.actionText("Unsplit")); }
update
245,418
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
245,419
AnAction () { return ActionManager.getInstance().getAction(ACTION_NAME); }
getPinAction
245,420
int (@NotNull JComponent c) { for (int i = 0; i < myTabs.size(); i++) { if (myTabs.get(i).getComponent() == c) return i; } return -1; }
indexOf
245,421
void (@NotNull TabDescriptor tab) { setDisplayName(myId.getDisplayName(tab)); setComponent(tab.getComponent()); }
selectTab
245,422
void (@NotNull JComponent content, @NotNull String name, boolean selectTab) { addContent(new TabDescriptor(content, name), selectTab); }
addContent
245,423
void (@NotNull TabDescriptor tab, boolean selectTab) { Disposer.register(this, tab); if (!myTabs.contains(tab)) { myTabs.add(tab); } if (selectTab && getComponent() != tab.getComponent()) { selectTab(tab); } }
addContent
245,424
TabGroupId () { return myId; }
getId
245,425
void (JComponent component) { JComponent currentComponent = getComponent(); Container parent = currentComponent.getParent(); if (parent != null) { parent.remove(currentComponent); parent.add(component); } super.setComponent(component); }
setComponent
245,426
void (@NotNull JComponent content) { int index = indexOf(content); if (index != -1) { Disposer.dispose(myTabs.remove(index)); index = index > 0 ? index - 1 : index; if (index < myTabs.size()) { selectContent(index); } } }
removeContent
245,427
void (int index) { selectTab(myTabs.get(index)); }
selectContent
245,428
int () { return indexOf(getComponent()); }
getSelectedIndex
245,429
boolean (@NotNull JComponent contentComponent) { TabDescriptor tab = findTab(contentComponent); if (tab != null) { selectTab(tab); return true; } return false; }
findAndSelectContent
245,430
String () { return getDisplayName(); }
getTabName
245,431
boolean () { return myTabs.size() > 1; }
hasMultipleTabs
245,432
void () { ContentManager manager = getManager(); if (manager == null) return; boolean selected = manager.isSelected(this); TabDescriptor selectedTab = selectedTab(); List<TabDescriptor> tabsCopy = new ArrayList<>(myTabs); manager.removeContent(this, false); ContentUtilEx.setSplitMode(myId.getId(), true); for (TabDescri...
split
245,433
JComponent () { return myComponent; }
getComponent
245,434
void (JComponent component) { Component oldComponent = myComponent; myComponent = component; myChangeSupport.firePropertyChange(PROP_COMPONENT, oldComponent, myComponent); }
setComponent
245,435
JComponent () { if (myFocusRequest != null) { return myFocusRequest.compute(); } if (myComponent == null) { return null; } Container traversalRoot = myComponent.isFocusCycleRoot() ? myComponent : myComponent.getFocusCycleRootAncestor(); if (traversalRoot == null) { return null; } Component component = traversalRoot.get...
getPreferredFocusableComponent
245,436
void (JComponent c) { setPreferredFocusedComponent(() -> c); }
setPreferredFocusableComponent
245,437
void (Computable<? extends JComponent> computable) { myFocusRequest = computable; }
setPreferredFocusedComponent
245,438
void (Icon icon) { Icon oldValue = getIcon(); myIcon = icon; myChangeSupport.firePropertyChange(PROP_ICON, oldValue, getIcon()); }
setIcon
245,439
Icon () { return myIcon; }
getIcon
245,440
void (String displayName) { String oldValue = myDisplayName; myDisplayName = displayName; myChangeSupport.firePropertyChange(PROP_DISPLAY_NAME, oldValue, myDisplayName); }
setDisplayName
245,441
String () { return myDisplayName; }
getDisplayName
245,442
void (@NlsContexts.TabTitle String tabName) { myTabName = tabName; }
setTabName
245,443
String () { return myTabName == null ? myDisplayName : myTabName; }
getTabName
245,444
void (String toolwindowTitle) { myToolwindowTitle = toolwindowTitle; }
setToolwindowTitle
245,445
String () { return myToolwindowTitle == null ? myDisplayName : myToolwindowTitle; }
getToolwindowTitle
245,446
void (@NotNull Disposable disposer) { myDisposer = disposer; }
setDisposer
245,447
void (boolean value) { myShouldDisposeContent = value; }
setShouldDisposeContent
245,448
String () { return myDescription; }
getDescription
245,449
void (String description) { String oldValue = myDescription; myDescription = description; myChangeSupport.firePropertyChange(PROP_DESCRIPTION, oldValue, myDescription); }
setDescription
245,450
void (PropertyChangeListener l) { myChangeSupport.addPropertyChangeListener(l); }
addPropertyChangeListener
245,451
void (PropertyChangeListener l) { myChangeSupport.removePropertyChangeListener(l); }
removePropertyChangeListener
245,452
void (@Nullable ContentManager manager) { ContentManager oldValue = myManager; myManager = manager; myChangeSupport.firePropertyChange(PROP_CONTENT_MANAGER, oldValue, myManager); }
setManager
245,453
ContentManager () { return myManager; }
getManager
245,454
boolean () { return myManager != null && myManager.isSelected(this); }
isSelected
245,455
void () { Disposer.dispose(this); }
release
245,456
boolean () { return myManager != null; }
isValid
245,457
boolean () { return myIsPinned; }
isPinned
245,458
void (boolean pinned) { if (isPinnable() && myIsPinned != pinned) { boolean wasPinned = isPinned(); myIsPinned = pinned; myChangeSupport.firePropertyChange(PROP_PINNED, wasPinned, pinned); } }
setPinned
245,459
boolean () { return myPinnable; }
isPinnable
245,460
void (boolean pinnable) { myPinnable = pinnable; }
setPinnable
245,461
boolean () { return myCloseable; }
isCloseable
245,462
void (final boolean closeable) { if(closeable == myCloseable) return; boolean old = myCloseable; myCloseable = closeable; myChangeSupport.firePropertyChange(IS_CLOSABLE, old, closeable); }
setCloseable
245,463
void (final ActionGroup actions, String place, @Nullable JComponent contextComponent) { final ActionGroup oldActions = myActions; myActions = actions; myPlace = place; myActionsContextComponent = contextComponent; myChangeSupport.firePropertyChange(PROP_ACTIONS, oldActions, myActions); }
setActions
245,464
JComponent () { return myActionsContextComponent; }
getActionsContextComponent
245,465
ActionGroup () { return myActions; }
getActions
245,466
String () { return myPlace; }
getPlace
245,467
void () { if (myShouldDisposeContent && myComponent instanceof Disposable) { Disposer.dispose((Disposable)myComponent); } if (myDisposer != null) { Disposer.dispose(myDisposer); myDisposer = null; } myFocusRequest = null; clearUserData(); }
dispose
245,468
void (final @Nullable AlertIcon icon) { myAlertIcon = icon; }
setAlertIcon
245,469
void () { myChangeSupport.firePropertyChange(PROP_ALERT, null, true); }
fireAlert
245,470
void () { myChangeSupport.firePropertyChange(PROP_TAB_LAYOUT, null, true); }
fireTabLayout
245,471
void (BusyObject object) { myBusyObject = object; }
setBusyObject
245,472
String () { return mySeparator; }
getSeparator
245,473
void (String separator) { mySeparator = separator; }
setSeparator
245,474
void (Icon icon) { myPopupIcon = icon; }
setPopupIcon
245,475
Icon () { return myPopupIcon != null ? myPopupIcon : getIcon(); }
getPopupIcon
245,476
BusyObject () { return myBusyObject; }
getBusyObject
245,477
void (@Nullable JComponent comp) { mySearchComponent = comp; }
setSearchComponent
245,478
JComponent () { return mySearchComponent; }
getSearchComponent
245,479
void (long executionId) { myExecutionId = executionId; }
setExecutionId
245,480
long () { return myExecutionId; }
getExecutionId
245,481
void (String helpId) { myHelpId = helpId; }
setHelpId
245,482
void (@Nullable Color color) { Color oldColor = myColor; myColor = color; myChangeSupport.firePropertyChange(PROP_TAB_COLOR, oldColor, myColor); }
setTabColor
245,483
void (@NotNull ContentManagerImpl manager) { myNestedManagers.add(manager); Disposer.register(manager, new Disposable() { @Override public void dispose() { removeNestedManager(manager); } }); }
addNestedManager
245,484
void () { removeNestedManager(manager); }
dispose
245,485
void (@NotNull ContentManagerImpl manager) { myNestedManagers.remove(manager); }
removeNestedManager
245,486
boolean () { return myCanCloseContents; }
canCloseContents
245,487
JComponent () { if (myComponent == null) { myComponent = new MyNonOpaquePanel(); myComponent.add(myUI.getComponent(), BorderLayout.CENTER); } return myComponent; }
getComponent
245,488
ActionCallback (@NotNull Object requestor) { Content selected = getSelectedContent(); if (selected == null) return ActionCallback.DONE; BusyObject busyObject = selected.getBusyObject(); return busyObject != null ? busyObject.getReady(requestor) : ActionCallback.DONE; }
getReady
245,489
void (@NotNull Content content, final int order) { doAddContent(content, order); }
addContent
245,490
void (@NotNull Content content) { doAddContent(content, -1); }
addContent
245,491
void (final @NotNull Content content, final int index) { ThreadingAssertions.assertEventDispatchThread(); if (contents.contains(content)) { contents.remove(content); contents.add(index < 0 ? contents.size() : index, content); return; } if (!Content.TEMPORARY_REMOVED_KEY.get(content, false) && getContentCount() == 0 && ...
doAddContent
245,492
boolean (@NotNull Content content, boolean dispose) { boolean wasFocused = UIUtil.isFocusAncestor(content.getComponent()); return removeContent(content, dispose, wasFocused, false).isDone(); }
removeContent
245,493
ActionCallback (@NotNull Content content, boolean dispose, boolean requestFocus, boolean forcedFocus) { ActionCallback result = new ActionCallback(); doRemoveContent(content, dispose).doWhenDone(() -> { if (requestFocus) { Content current = getSelectedContent(); if (current == null) { ToolWindowManager.getInstance(myPr...
removeContent
245,494
ActionCallback (@NotNull Content content, boolean dispose) { ThreadingAssertions.assertEventDispatchThread(); int indexToBeRemoved = getIndexOfContent(content); if (indexToBeRemoved == -1) { return ActionCallback.REJECTED; } try { Content selection = mySelection.isEmpty() ? null : mySelection.get(mySelection.size() - 1...
doRemoveContent
245,495
void (boolean dispose) { if (contents.isEmpty()) { return; } for (Content content : List.copyOf(contents)) { removeContent(content, dispose); } }
removeAllContents
245,496
int () { return contents.size(); }
getContentCount
245,497
boolean () { boolean empty = ContentManager.super.isEmpty(); if (!empty) { return false; } for (ContentManager manager : myNestedManagers) { if (!manager.isEmpty()) { return false; } } return true; }
isEmpty
245,498
List<Content> () { List<Content> list = new ArrayList<>(); collectContentsRecursively(list); return list; }
getContentsRecursively
245,499
void (@NotNull List<Content> to) { to.addAll(contents); for (ContentManagerImpl nestedManager : myNestedManagers) { nestedManager.collectContentsRecursively(to); } }
collectContentsRecursively