Unnamed: 0
int64 0
305k
| body
stringlengths 7
52.9k
| name
stringlengths 1
185
|
|---|---|---|
290,400
|
void (@NotNull RunnerAndConfigurationSettingsImpl s) { myDefaultSettings = s.isTemplate(); for (RunConfigurationEditorFragment<?,?> fragment : getRunFragments()) { fragment.resetEditorFrom(s); } }
|
resetEditorFrom
|
290,401
|
void (@NotNull RunnerAndConfigurationSettingsImpl s) { for (RunConfigurationEditorFragment<?, ?> fragment : getRunFragments()) { fragment.applyEditorTo(s); } }
|
applyEditorTo
|
290,402
|
void (String targetName) { SettingsEditorFragment<Settings, ?> targetPathFragment = ContainerUtil.find(getFragments(), fragment -> TargetPathFragment.ID.equals(fragment.getId())); if (targetPathFragment != null) { targetPathFragment.setSelected(targetName != null); } }
|
targetChanged
|
290,403
|
void (Collection<? extends SettingsEditorFragment<Settings, ?>> fragments) { for (SettingsEditorFragment<Settings, ?> fragment : fragments) { JComponent component = fragment.getEditorComponent(); if (component == null) continue; FocusListener listener = new FocusListener() { @Override public void focusGained(FocusEvent e) { } @Override public void focusLost(FocusEvent e) { checkGotIt(fragment); } }; component.addFocusListener(listener); Disposer.register(fragment, () -> component.removeFocusListener(listener)); } }
|
initFragments
|
290,404
|
void (FocusEvent e) { }
|
focusGained
|
290,405
|
void (FocusEvent e) { checkGotIt(fragment); }
|
focusLost
|
290,406
|
void (SettingsEditorFragment<Settings, ?> fragment) { if (!isDefaultSettings() && !fragment.isCanBeHidden() && !fragment.isTag() && StringUtil.isNotEmpty(fragment.getName())) { ReadAction.nonBlocking(() -> { //noinspection unchecked Settings clone = (Settings)mySettings.clone(); fragment.applyEditorTo(clone); return fragment.isInitiallyVisible(clone); }) .finishOnUiThread(ModalityState.defaultModalityState(), visible -> { if (visible) return; JComponent component = fragment.getEditorComponent(); String text = fragment.getName().replace("\u001B", ""); new GotItTooltip("fragment.hidden." + fragment.getId(), ExecutionBundle.message("gotIt.popup.message", text), fragment). withHeader(ExecutionBundle.message("gotIt.popup.title")). show(component, (c, b) -> new Point(GotItComponentBuilder.getArrowShift(), c.getHeight())); }) .expireWith(fragment).submit(NonUrgentExecutor.getInstance()); } }
|
checkGotIt
|
290,407
|
TaskButton (BeforeRunTaskProvider<BeforeRunTask<?>> provider) { return new TaskButton(provider, (e) -> { myChangeListener.run(); buildPanel(); }); }
|
createTag
|
290,408
|
void () { myAddLabel.setVisible(getEnabledTasks().isEmpty()); }
|
updateAddLabel
|
290,409
|
void () { DefaultActionGroup group = new DefaultActionGroup(); for (BeforeRunTaskProvider<BeforeRunTask<?>> provider : getProviders()) { group.add(new TagAction(provider)); } ListPopup popup = JBPopupFactory .getInstance().createActionGroupPopup(ExecutionBundle.message("add.new.before.run.task.name"), group, DataManager.getInstance().getDataContext(myAddButton), false, false, false, null, -1, Conditions.alwaysTrue()); popup.showUnderneathOf(myAddButton); }
|
showPopup
|
290,410
|
void (Key<? extends BeforeRunTask<?>> providerId, boolean add) { TaskButton taskButton = ContainerUtil.find(myTags, button -> button.myProvider.getId() == providerId); if (add) { if (taskButton == null) { createTask(null, ContainerUtil.find(getProviders(), provider -> providerId == provider.getId())); } } else if (taskButton != null) { myTags.remove(taskButton); } }
|
addOrRemove
|
290,411
|
void (@Nullable AnActionEvent e, BeforeRunTaskProvider<BeforeRunTask<?>> myProvider) { BeforeRunTask<?> task = myProvider.createTask(myConfiguration); if (task == null) return; TaskButton tag = createTag(myProvider); if (e == null) { addTask(tag, task); return; } myProvider.configureTask(e.getDataContext(), myConfiguration, task).onSuccess(changed -> { if (!myProvider.canExecuteTask(myConfiguration, task)) { return; } addTask(tag, task); }); }
|
createTask
|
290,412
|
void (TaskButton tag, BeforeRunTask<?> task) { task.setEnabled(true); tag.setTask(task); myTags.remove(tag); myTags.add(tag); buildPanel(); myChangeListener.run(); }
|
addTask
|
290,413
|
void (@NotNull RunnerAndConfigurationSettingsImpl s) { myConfiguration = s.getConfiguration(); for (TaskButton tag : myTags) { remove(tag); } myTags.clear(); List<BeforeRunTask<?>> tasks = s.getManager().getBeforeRunTasks(s.getConfiguration()); for (BeforeRunTask<?> task : tasks) { BeforeRunTaskProvider taskProvider = ContainerUtil.find(getProviders(), provider -> task.getProviderId() == provider.getId()); if (taskProvider == null) { taskProvider = new UnknownBeforeRunTaskProvider(task.getProviderId().toString()); } TaskButton tag = createTag(taskProvider); tag.setTask(task); myTags.add(tag); } buildPanel(); }
|
reset
|
290,414
|
void () { remove(myAddPanel); remove(myAddLabel); int i = 1; for (TaskButton tag : myTags) { if (tag.isVisible() && tag.myTask != null) { tag.myOrder = i++; tag.updateButton(); } add(tag); } add(myAddPanel); add(myAddLabel); updateAddLabel(); }
|
buildPanel
|
290,415
|
void (RunnerAndConfigurationSettingsImpl s) { s.getManager().setBeforeRunTasks(s.getConfiguration(), getEnabledTasks()); }
|
apply
|
290,416
|
void (DnDEvent event) { TagButton replaceButton = getReplaceButton(event); if (replaceButton == null ) return; TaskButton button = (TaskButton)event.getAttachedObject(); int i = myTags.indexOf(replaceButton); myTags.remove(button); myTags.add(i, button); buildPanel(); myChangeListener.run(); IdeFocusManager.getInstance(myConfiguration.getProject()).requestFocus(button, false); }
|
drop
|
290,417
|
void () { //just for the case if it can be executed during superclass initialization //noinspection ConstantValue if (myTags != null) { myTags.forEach(button -> button.showDropPlace(false)); } myDropFirst.setVisible(false); }
|
cleanUpOnLeave
|
290,418
|
TagButton (DnDEvent event) { Object object = event.getAttachedObject(); if (!(object instanceof TaskButton)) { return null; } Rectangle area = new Rectangle(event.getPoint().x - 5, event.getPoint().y - 5, 10, 10); TaskButton button = ContainerUtil.find(myTags, tag -> tag.isVisible() && tag.getBounds().intersects(area)); if (button == null || button == object) return null; boolean left = button.getBounds().getCenterX() > event.getPoint().x; int i = myTags.indexOf(button); if (i < myTags.indexOf(object)) { if (!left) { button = ContainerUtil.find(myTags, b -> b.isVisible() && myTags.indexOf(b) > i); } } else if (left) { button = ContainerUtil.findLast(myTags, b -> b.isVisible() && myTags.indexOf(b) < i); } return button == object ? null : button; }
|
getReplaceButton
|
290,419
|
TagButton (TagButton replaceButton, DnDEvent event) { int i = myTags.indexOf(replaceButton); if (i > myTags.indexOf(event.getAttachedObject())) { return replaceButton; } return ContainerUtil.findLast(myTags, button -> button.isVisible() && myTags.indexOf(button) < i); }
|
getDropButton
|
290,420
|
boolean (DnDEvent event) { TagButton replace = getReplaceButton(event); if (replace != null) { TagButton dropButton = getDropButton(replace, event); myTags.forEach(button -> button.showDropPlace(button == dropButton)); myDropFirst.setVisible(dropButton == null); event.setDropPossible(true); return false; } myTags.forEach(button -> button.showDropPlace(false)); event.setDropPossible(false); return true; }
|
update
|
290,421
|
void () {}
|
dispose
|
290,422
|
void (MouseEvent e) { if (e.getClickCount() == 2) { BeforeRunTask clone = myTask.clone(); if (!DumbService.isDumb(myConfiguration.getProject()) || DumbService.isDumbAware(myProvider)) { myProvider.configureTask(DataManager.getInstance().getDataContext(TaskButton.this), myConfiguration, clone) .onSuccess(aBoolean -> { setTask(clone); updateButton(); }); } } }
|
mouseClicked
|
290,423
|
void () { super.layoutButtons(); if (myDropPlace == null) return; Rectangle bounds = myButton.getBounds(); Dimension size = myDropPlace.getPreferredSize(); int gap = JBUI.scale(2); setPreferredSize(new Dimension(bounds.width + size.width + 2 * gap, bounds.height)); myDropPlace.setBounds((int)(bounds.getMaxX() + gap), bounds.y + (bounds.height - size.height) / 2, size.width, size.height); }
|
layoutButtons
|
290,424
|
void (@Nullable BeforeRunTask<?> task) { myTask = task; setVisible(task != null); }
|
setTask
|
290,425
|
void () { if (myTask == null) return; setEnabled(!DumbService.isDumb(myConfiguration.getProject()) || DumbService.isDumbAware(myProvider)); updateButton(myOrder + ". " + myProvider.getDescription(myTask), myProvider.getTaskIcon(myTask)); }
|
updateButton
|
290,426
|
void (boolean show) { myDropPlace.setVisible(show); }
|
showDropPlace
|
290,427
|
boolean (DnDAction action, @NotNull Point dragOrigin) { return true; }
|
canStartDragging
|
290,428
|
DnDDragStartBean (DnDAction action, @NotNull Point dragOrigin) { return new DnDDragStartBean(this); }
|
startDragging
|
290,429
|
String () { return myProvider.getName(); }
|
toString
|
290,430
|
void (@NotNull AnActionEvent e) { createTask(e, myProvider); }
|
actionPerformed
|
290,431
|
boolean () { return DumbService.isDumbAware(myProvider); }
|
isDumbAware
|
290,432
|
String (TargetEnvironmentAwareRunProfile t) { ModuleBasedConfiguration<?, ?> configuration = (ModuleBasedConfiguration)t; if (configuration.getProjectPathOnTarget() != null) { return configuration.getProjectPathOnTarget(); } String targetName = TargetEnvironmentConfigurations.getEffectiveTargetName(t, configuration.getProject()); if (targetName == null) return ""; TargetEnvironmentConfiguration targetEnvironmentConfiguration = TargetEnvironmentsManager.getInstance(configuration.getProject()).getTargets().findByName(targetName); return targetEnvironmentConfiguration == null ? null : targetEnvironmentConfiguration.getProjectRootOnTarget(); }
|
getPath
|
290,433
|
void (TargetEnvironmentAwareRunProfile t, String path) { ModuleBasedConfiguration<?, ?> configuration = (ModuleBasedConfiguration)t; configuration.setProjectPathOnTarget(path); String targetName = TargetEnvironmentConfigurations.getEffectiveTargetName(t, configuration.getProject()); if (targetName == null) return; TargetEnvironmentConfiguration targetEnvironmentConfiguration = TargetEnvironmentsManager.getInstance(configuration.getProject()).getTargets().findByName(targetName); if (targetEnvironmentConfiguration != null && Comparing.strEqual(targetEnvironmentConfiguration.getProjectRootOnTarget(), path)) { configuration.setProjectPathOnTarget(null); } }
|
setPath
|
290,434
|
void (ActionEvent e) { myInputFile.setEnabled(myCheckBox.isSelected()); }
|
actionPerformed
|
290,435
|
TextFieldWithBrowseButton () { return myInputFile; }
|
getComponent
|
290,436
|
JComponent () { return myCheckBox.getAnchor(); }
|
getAnchor
|
290,437
|
void (@Nullable JComponent anchor) { myCheckBox.setAnchor(anchor); }
|
setAnchor
|
290,438
|
void (@NotNull InputRedirectAware.InputRedirectOptions configuration) { configuration.setRedirectInput(myCheckBox.isSelected()); final String filePath = myInputFile.getText(); configuration.setRedirectInputPath(StringUtil.isEmpty(filePath) ? null : FileUtil.toSystemIndependentName(filePath)); }
|
applyTo
|
290,439
|
void (@Nullable InputRedirectAware.InputRedirectOptions configuration) { final boolean isRedirectInput = configuration != null && configuration.isRedirectInput(); myCheckBox.setSelected(isRedirectInput); myInputFile.setEnabled(isRedirectInput); myInputFile.setText(configuration != null ? FileUtil.toSystemDependentName(StringUtil.notNullize(configuration.getRedirectInputPath())) : ""); }
|
reset
|
290,440
|
void (boolean withModuleDir) { if (this.withModuleDir == withModuleDir) return; this.withModuleDir = withModuleDir; if (macros == null) return; macros = createMacros(); fireContentsChanged(this, -1, -1); }
|
useModuleDir
|
290,441
|
Object () { return selected; }
|
getSelectedItem
|
290,442
|
void (Object item) { if (item == null ? selected == null : item.equals(selected)) return; selected = item; fireContentsChanged(this, -1, -1); }
|
setSelectedItem
|
290,443
|
int () { List<String> list = getMacros(); return list.size(); }
|
getSize
|
290,444
|
String (int index) { List<String> list = getMacros(); return 0 <= index && index < list.size() ? list.get(index) : null; }
|
getElementAt
|
290,445
|
List<String> () { if (macros == null) macros = createMacros(); return macros; }
|
getMacros
|
290,446
|
List<String> () { List<String> list = new SmartList<>(); for (String name : PathMacros.getInstance().getUserMacroNames()) { list.add("$" + name + "$"); } if (withModuleDir) { list.add(PathMacroUtil.MODULE_WORKING_DIR); } return list; }
|
createMacros
|
290,447
|
void (Component field) { field.setFont(EditorUtil.getEditorFont(JBUI.Fonts.label().getSize())); }
|
setMonospaced
|
290,448
|
JComponent (BeforeRunComponent component) { JPanel panel = new JPanel(new BorderLayout()); JPanel labelPanel = new JPanel(new BorderLayout()); JLabel label = new JLabel(ExecutionBundle.message("run.configuration.before.run.label")); label.setBorder(JBUI.Borders.empty(JBUI.scale(12), 0, 0, JBUI.scale(5))); labelPanel.add(label, BorderLayout.NORTH); panel.add(labelPanel, BorderLayout.WEST); panel.add(component, BorderLayout.CENTER); return panel; }
|
wrap
|
290,449
|
int () { return 100; }
|
getMenuPosition
|
290,450
|
void (boolean selected, AnActionEvent e) { super.setSelected(selected); if (selected) { myBeforeRunComponent.showPopup(); } }
|
toggle
|
290,451
|
void (@NotNull RunnerAndConfigurationSettingsImpl s) { myBeforeRunComponent.reset(s); }
|
doReset
|
290,452
|
void (@NotNull RunnerAndConfigurationSettingsImpl s) { if (isSelected()) { myBeforeRunComponent.apply(s); } else { s.getManager().setBeforeRunTasks(s.getConfiguration(), Collections.<BeforeRunTask<?>>emptyList()); } }
|
applyEditorTo
|
290,453
|
void (CustomizableActionGroupRegistrar registrar) { if (UIExperiment.isNewDebuggerUIEnabled()) { registrar.addCustomizableActionGroup(RunContentBuilder.RUN_TOOL_WINDOW_TOP_TOOLBAR_GROUP, ExecutionBundle.message("run.tool.window.header.toolbar")); registrar.addCustomizableActionGroup(RunContentBuilder.RUN_TOOL_WINDOW_TOP_TOOLBAR_MORE_GROUP, ExecutionBundle.message("run.tool.window.header.toolbar.more")); } else { registrar.addCustomizableActionGroup(RunContentBuilder.RUN_TOOL_WINDOW_TOP_TOOLBAR_OLD_GROUP, ExecutionBundle.message("run.tool.window.header.toolbar")); } }
|
registerGroups
|
290,454
|
void (PropertyChangeEvent evt) { if (ContentImpl.PROP_CONTENT_MANAGER.equals(evt.getPropertyName())) { ContentManager oldValue = (ContentManager)evt.getOldValue(); ContentManager newValue = (ContentManager)evt.getNewValue(); if (oldValue != null) oldValue.removeContentManagerListener(BaseContentCloseListener.this); if (newValue != null) newValue.addContentManagerListener(BaseContentCloseListener.this); } }
|
propertyChange
|
290,455
|
void (final @NotNull ContentManagerEvent event) { final Content content = event.getContent(); if (content == myContent && !Content.TEMPORARY_REMOVED_KEY.get(content, false)) { Disposer.dispose(this); } }
|
contentRemoved
|
290,456
|
void () { if (myContent == null) return; final Content content = myContent; myContent = null; final ContentManager contentManager = content.getManager(); if (contentManager != null) { contentManager.removeContentManagerListener(this); } ProjectManager.getInstance().removeProjectManagerListener(myProject, this); disposeContent(content); }
|
dispose
|
290,457
|
void (@NotNull ContentManagerEvent event) { if (event.getContent() == myContent) { boolean canClose = closeQuery(myContent, Boolean.TRUE.equals(myProject.getUserData(PROJECT_DISPOSING))); if (!canClose) { // Consume the event to reject the close request: // com.intellij.ui.content.impl.ContentManagerImpl.fireContentRemoveQuery event.consume(); } } }
|
contentRemoveQuery
|
290,458
|
void (@NotNull Project project) { if (myContent == null || project != myProject) { return; } ContentManager contentManager = myContent.getManager(); if (contentManager != null) { contentManager.removeContent(myContent, true); } // dispose content even if content manager refused to Disposer.dispose(this); }
|
projectClosed
|
290,459
|
void (@NotNull Project project) { project.putUserData(PROJECT_DISPOSING, true); }
|
projectClosing
|
290,460
|
boolean (@NotNull Project project) { if (myContent == null || project != myProject) { return true; } boolean canClose = closeQuery(myContent, true); // content could be removed during close query if (canClose && myContent != null) { Objects.requireNonNull(myContent.getManager()).removeContent(myContent, true); myContent = null; } return canClose; }
|
canClose
|
290,461
|
boolean (@NotNull ProcessHandler processHandler, @NotNull String sessionName, @NotNull WaitForProcessTask task) { Application application = ApplicationManager.getApplication(); if (application.isWriteAccessAllowed()) { // This might happen from Application.exit(force=true, ...) call. // Do not show any UI, destroy the process silently, do not wait for process termination. processHandler.destroyProcess(); LOG.info("Destroying process under write action (name: " + sessionName + ", " + processHandler.getClass() + ", " + processHandler + ")"); return true; } // Disable instant shutdown to show "Terminating <run configuration name>" dialog awaiting graceful process termination. // The dialog provides 'Kill process' action for cases when graceful process termination takes too long. return application.getService(InstantShutdown.class).computeWithDisabledInstantShutdown(() -> { return doAskUserAndWait(processHandler, sessionName, task); }); }
|
askUserAndWait
|
290,462
|
boolean (@NotNull ProcessHandler processHandler, @NotNull String sessionName, @NotNull WaitForProcessTask task) { ProcessCloseConfirmation rc = TerminateRemoteProcessDialog.show(myProject, sessionName, processHandler); if (rc == null) { // cancel return false; } boolean destroyProcess = rc == ProcessCloseConfirmation.TERMINATE; if (destroyProcess) { processHandler.destroyProcess(); } else { processHandler.detachProcess(); } ProgressManager.getInstance().run(task); return true; }
|
doAskUserAndWait
|
290,463
|
boolean () { return myModal; }
|
isConditionalModal
|
290,464
|
boolean () { return !myModal; }
|
shouldStartInBackground
|
290,465
|
void (@NotNull ProgressIndicator progressIndicator) { final Semaphore semaphore = new Semaphore(); semaphore.down(); ApplicationManager.getApplication().executeOnPooledThread(() -> { try { myProcessHandler.waitFor(); } finally { semaphore.up(); } }); progressIndicator.setText(ExecutionBundle.message("waiting.for.vm.detach.progress.text")); ApplicationManager.getApplication().executeOnPooledThread(new Runnable() { @Override public void run() { while (true) { if (progressIndicator.isCanceled() || !progressIndicator.isRunning()) { semaphore.up(); break; } try { //noinspection SynchronizeOnThis synchronized (this) { //noinspection SynchronizeOnThis wait(2000L); } } catch (InterruptedException ignore) { } } } }); semaphore.waitFor(); }
|
run
|
290,466
|
void () { while (true) { if (progressIndicator.isCanceled() || !progressIndicator.isRunning()) { semaphore.up(); break; } try { //noinspection SynchronizeOnThis synchronized (this) { //noinspection SynchronizeOnThis wait(2000L); } } catch (InterruptedException ignore) { } } }
|
run
|
290,467
|
boolean (@NotNull AnActionEvent e) { return myLayoutSettings.isSelected(); }
|
isSelected
|
290,468
|
ActionUpdateThread () { return ActionUpdateThread.EDT; }
|
getActionUpdateThread
|
290,469
|
void (@NotNull AnActionEvent e, boolean state) { myLayoutSettings.setSelected(state); }
|
setSelected
|
290,470
|
void (final @NotNull AnActionEvent e) { super.update(e); e.getPresentation().setText(myLayoutSettings.getDisplayName(), false); e.getPresentation().setEnabled(myLayoutSettings.isEnabled()); }
|
update
|
290,471
|
Content () { return myContent; }
|
getContent
|
290,472
|
boolean () { return myContent.isValid() && Objects.requireNonNull(myContent.getManager()).getIndexOfContent(myContent) != -1; }
|
isSelected
|
290,473
|
void (boolean state) { if (state) { myUi.restore(myContent); myUi.select(myContent, true); } else { myUi.minimize(myContent, null); } }
|
setSelected
|
290,474
|
void () { setSelected(true); }
|
restore
|
290,475
|
String () { return myContent.getDisplayName(); }
|
getDisplayName
|
290,476
|
boolean () { return !isSelected() || myUi.getContentManager().getContents().length > 1; }
|
isEnabled
|
290,477
|
void (AnActionEvent e, ViewContext context, Content[] content) { e.getPresentation().setEnabledAndVisible(isEnabled(context, content, e.getPlace())); }
|
update
|
290,478
|
void (AnActionEvent e, ViewContext context, Content[] content) { ContentManager manager = context.getContentManager(); for (Content c : manager.getContents()) { if (c.isCloseable() && isAccepted(c, content)) { manager.removeContent(c, context.isToDisposeRemovedContent()); } } }
|
actionPerformed
|
290,479
|
boolean (ViewContext context, Content[] selectedContents, String place) { for (Content c : context.getContentManager().getContents()) { if (c.isCloseable() && isAccepted(c, selectedContents)) return true; } return false; }
|
isEnabled
|
290,480
|
boolean (ViewContext context, Content[] selectedContents, String place) { int count = 0; for (Content c : context.getContentManager().getContents()) { if (c.isCloseable() && ++count > 1) return true; } return false; }
|
isEnabled
|
290,481
|
boolean (@NotNull Content c, Content @NotNull [] selectedContents) { return true; }
|
isAccepted
|
290,482
|
boolean (@NotNull Content c, Content @NotNull [] selectedContents) { return c != selectedContents[0]; }
|
isAccepted
|
290,483
|
void (final @NotNull AnActionEvent e) { RunnerContentUi ui = getRunnerUi(e); if (ui != null) { ui.restoreLayout(); } }
|
actionPerformed
|
290,484
|
ActionUpdateThread () { return ActionUpdateThread.BGT; }
|
getActionUpdateThread
|
290,485
|
void (final @NotNull AnActionEvent e) { RunnerContentUi runnerContentUi = getRunnerUi(e); boolean enabled = false; if (runnerContentUi != null) { enabled = true; if (ActionPlaces.DEBUGGER_TOOLBAR.equals(e.getPlace())) { // In this case the action has to available in ActionPlaces.RUNNER_LAYOUT_BUTTON_TOOLBAR only enabled = !runnerContentUi.isMinimizeActionEnabled(); } } e.getPresentation().setEnabledAndVisible(enabled); }
|
update
|
290,486
|
ActionUpdateThread () { return ActionUpdateThread.EDT; }
|
getActionUpdateThread
|
290,487
|
void (final AnActionEvent e, final ViewContext context, final Content[] content) { setEnabled(e, isEnabled(content)); boolean unpinAction = isUnpinAction(e, content); Presentation presentation = e.getPresentation(); if (unpinAction) { String text = RegistryManager.getInstance().is("ide.editor.tabs.interactive.pin.button") ? TextWithMnemonic.parse(IdeBundle.message("action.unpin.tab")).dropMnemonic(true).getText() : ""; presentation.setText(text); } presentation.setIcon(unpinAction ? AllIcons.Actions.PinTab : AllIcons.Actions.Close); presentation.setHoveredIcon(unpinAction ? AllIcons.Actions.PinTab : AllIcons.Actions.CloseHovered); }
|
update
|
290,488
|
void (final AnActionEvent e, final ViewContext context, final Content[] content) { if (isUnpinAction(e, content)) { if (Registry.get("ide.editor.tabs.interactive.pin.button").asBoolean()) { content[0].setPinned(false); } return; } perform(context, content[0]); }
|
actionPerformed
|
290,489
|
boolean (ViewContext context, Content content) { return context.getContentManager().removeContent(content, context.isToDisposeRemovedContent()); }
|
perform
|
290,490
|
boolean (Content[] content) { return content.length == 1 && content[0].isCloseable(); }
|
isEnabled
|
290,491
|
boolean (AnActionEvent e, Content[] content) { return content.length == 1 && content[0].isPinnable() && content[0].isPinned() && !ViewContext.isPopupPlace(e.getPlace()); }
|
isUnpinAction
|
290,492
|
void (final AnActionEvent e, final ViewContext context, final Content[] content) { setEnabled(e, isEnabled(context, content, e.getPlace())); e.getPresentation().setIcon(AllIcons.Actions.MoveToButton); }
|
update
|
290,493
|
void (final AnActionEvent e, final ViewContext context, final Content[] content) { for (Content each : content) { context.findCellFor(each).minimize(each); } }
|
actionPerformed
|
290,494
|
boolean (ViewContext context, Content[] content, String place) { if (!context.isMinimizeActionEnabled() || content.length == 0) { return false; } if (ViewContext.TAB_TOOLBAR_PLACE.equals(place) || ViewContext.TAB_POPUP_PLACE.equals(place)) { Tab tab = getTabFor(context, content); if (tab == null) { return false; } return !tab.isDefault() && content.length == 1; } else { return getTabFor(context, content) != null; } }
|
isEnabled
|
290,495
|
boolean () { return true; }
|
isDumbAware
|
290,496
|
Content () { return myContent; }
|
getContent
|
290,497
|
boolean () { return true; }
|
isDumbAware
|
290,498
|
boolean (@NotNull AnActionEvent e) { return myOption.isSelected(); }
|
isSelected
|
290,499
|
ActionUpdateThread () { return ActionUpdateThread.EDT; }
|
getActionUpdateThread
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.