Unnamed: 0
int64 0
305k
| body
stringlengths 7
52.9k
| name
stringlengths 1
185
|
|---|---|---|
6,400
|
JComponent () { return myForm.getAntsList(); }
|
getPreferredFocusedComponent
|
6,401
|
void () { final Set<String> names = new HashSet<>(); final ListModel<AntInstallation> model = myForm.getAntsList().getModel(); for (int idx = 0; idx < model.getSize(); idx++) { final AntInstallation inst = model.getElementAt(idx); @NlsSafe final String name = AntInstallation.NAME.get(myForm.getProperties(inst)); if (names.contains(name)) { Messages.showErrorDialog(AntBundle.message("dialog.message.duplicate.ant.installation.name", name), getTitle()); return; } names.add(name); } super.doOKAction(); }
|
doOKAction
|
6,402
|
Object (AbstractProperty property) { if (myModifications.containsKey(property)) return myModifications.get(property); AbstractProperty.AbstractPropertyContainer container = findContainerOf(property); if (container == null) return property.getDefault(this); Object originalValue = delegateGet(container, property); property.copy(originalValue); return originalValue; }
|
getValueOf
|
6,403
|
boolean (AbstractProperty property) { return findContainerOf(property) != null; }
|
hasProperty
|
6,404
|
void (AbstractProperty property, Object value) { if (myParent.hasProperty(property)) delegateSet(myParent, property, value); else myModifications.put(property, value); }
|
setValueOf
|
6,405
|
void () { for (AbstractProperty property : myModifications.keySet()) { AbstractProperty.AbstractPropertyContainer container = findContainerOf(property); if (container != null) delegateSet(container, property, myModifications.get(property)); } myModifications.clear(); }
|
apply
|
6,406
|
void (final Factory<? extends T> newItemFactory) { ReorderableListController<T>.AddActionDescription description = myForm.getListActionsBuilder().addAddAction( AntBundle.message("add.action.name"), newItemFactory, true); description.addPostHandler(new ReorderableListController.ActionNotification<>() { @Override public void afterActionPerformed(T value) { myAdded.add(value); } }); description.setShowText(true); }
|
addAddAction
|
6,407
|
void (T value) { myAdded.add(value); }
|
afterActionPerformed
|
6,408
|
void (final Condition<? super T> removeCondition, @NlsActions.ActionText String actionName) { final ReorderableListController<T>.RemoveActionDescription description = myForm.getListActionsBuilder().addRemoveAction(actionName); description.addPostHandler(new ReorderableListController.ActionNotification<>() { @Override public void afterActionPerformed(List<T> list) { for (T item : list) { if (myAdded.contains(item)) { myAdded.remove(item); } else { myRemoved.add(item); } } } }); description.setEnableCondition(removeCondition); description.setConfirmation(list -> { if (list.size() == 1) { return Messages.showOkCancelDialog(description.getList(), AntBundle.message("delete.selected.ant.configuration.confirmation.text"), AntBundle.message("delete.confirmation.dialog.title"), Messages.getQuestionIcon()) == Messages.OK; } else { return Messages.showOkCancelDialog(description.getList(), AntBundle.message("delete.selected.ant.configurations.confirmation.text"), AntBundle.message("delete.confirmation.dialog.title"), Messages.getQuestionIcon()) == Messages.OK; } }); description.setShowText(true); }
|
addRemoveButtonForAnt
|
6,409
|
void (List<T> list) { for (T item : list) { if (myAdded.contains(item)) { myAdded.remove(item); } else { myRemoved.add(item); } } }
|
afterActionPerformed
|
6,410
|
T () { return myForm.myList.getSelectedValue(); }
|
getSelectedItem
|
6,411
|
void (T item) { myForm.select(item); }
|
setSelection
|
6,412
|
JList<T> () { return myForm.myList; }
|
getList
|
6,413
|
ArrayList<T> () { return myAdded; }
|
getAdded
|
6,414
|
ArrayList<T> () { return myRemoved; }
|
getRemoved
|
6,415
|
void (Collection<? extends T> items) { DefaultListModel<T> model = myForm.getListModel(); model.removeAllElements(); for (T item : items) { model.addElement(item); } ScrollingUtil.ensureSelectionExists(getList()); }
|
setItems
|
6,416
|
void (T item) { myForm.updateItem(item); }
|
updateItem
|
6,417
|
void () { if (ApplicationManager.getApplication() == null) return; myForm.createToolbar(); }
|
actionsBuilt
|
6,418
|
void () { myActionsPlace.removeAll(); myActionsPlace.setLayout(new BorderLayout()); myActionsPlace.add(myListController.createActionToolbar(true).getComponent(), BorderLayout.CENTER); }
|
createToolbar
|
6,419
|
ReorderableListController<T> () { return myListController; }
|
getListActionsBuilder
|
6,420
|
DefaultListModel<T> () { return (DefaultListModel<T>)myList.getModel(); }
|
getListModel
|
6,421
|
void (T item) { if (item != null) { ScrollingUtil.selectItem(myList, item); } else { ScrollingUtil.ensureSelectionExists(myList); } }
|
select
|
6,422
|
void (T item) { DefaultListModel<T> model = getListModel(); model.setElementAt(item, model.indexOf(item)); }
|
updateItem
|
6,423
|
void (ActionEvent e) { resetList(openConfigureDialog(myItems.get(getSelectedString()), getCombobox())); }
|
actionPerformed
|
6,424
|
void (Item selection) { Ref selectedItem = getSelectedString(); myItems.clear(); myItems.putAll(ContainerUtil.newMapFromValues(getAllListItems(), myToString)); SortedComboBoxModel<Ref> model = getModel(); model.setAll(myItems.keySet()); if (selection != null) model.setSelectedItem(myToString.convert(selection)); else model.setSelectedItem(selectedItem); }
|
resetList
|
6,425
|
Ref () { return (Ref)getCombobox().getSelectedItem(); }
|
getSelectedString
|
6,426
|
JComboBox () { return myCombobox.getComboBox(); }
|
getCombobox
|
6,427
|
SortedComboBoxModel<Ref> () { return ((SortedComboBoxModel<Ref>)getCombobox().getModel()); }
|
getModel
|
6,428
|
void (ListCellRenderer renderer) { myCombobox.getComboBox().setRenderer(renderer); }
|
setRenderer
|
6,429
|
Ref () { return (Ref)myCombobox.getComboBox().getSelectedItem(); }
|
getSelectedItem
|
6,430
|
void (@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { AntInstallation ant = (AntInstallation)value; if (ant == null) return; AbstractProperty.AbstractPropertyContainer container = myEditor.getProperties(ant); customizeAnt(container, this); }
|
customizeCellRenderer
|
6,431
|
void (@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { if (value == null) return; customizeReference((AntReference)value, this, myConfiguration); }
|
customizeCellRenderer
|
6,432
|
void (AntReference antReference, SimpleColoredComponent component, GlobalAntConfiguration configuration) { AntInstallation antInstallation = antReference.find(configuration); if (antInstallation != null) customizeAnt(antInstallation.getProperties(), component); else { component.setIcon(PlatformIcons.INVALID_ENTRY_ICON); component.append(antReference.getName(), SimpleTextAttributes.ERROR_ATTRIBUTES); } }
|
customizeReference
|
6,433
|
void (AbstractProperty.AbstractPropertyContainer antProperties, SimpleColoredComponent component) { component.setIcon(AntIcons.Build); String name = AntInstallation.NAME.get(antProperties); component.append(name, SimpleTextAttributes.REGULAR_ATTRIBUTES); String versionString = AntInstallation.VERSION.get(antProperties); if (!name.contains(versionString)) component.append(" (" + versionString + ")", SimpleTextAttributes.SYNTHETIC_ATTRIBUTES); }
|
customizeAnt
|
6,434
|
void (@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { AntClasspathEntry entry = (AntClasspathEntry)value; entry.getAppearance().customize(this); }
|
customizeCellRenderer
|
6,435
|
void (ActionEvent e) { MacrosDialog.show(getChildComponent()); }
|
actionPerformed
|
6,436
|
Object () { return getChildComponent().getText(); }
|
getCellEditorValue
|
6,437
|
void (Object value) { getChildComponent().setText((String)value); }
|
initializeEditor
|
6,438
|
JTextField () { return myComponent.getChildComponent(); }
|
getChildComponent
|
6,439
|
Component (JTable table, Object value, boolean isSelected, int row, int column) { getChildComponent().setText((String)value); return myComponent; }
|
getTableCellEditorComponent
|
6,440
|
void (@NotNull JList list, Object value, int index, boolean selected, boolean hasFocus) { String jdkName = (String)value; if (jdkName == null || jdkName.length() == 0) jdkName = ""; Sdk jdk = GlobalAntConfiguration.findJdk(jdkName); if (jdk == null) { if (myProjectJdkName.length() > 0) { setIcon(AllIcons.Nodes.PpJdk); append(AntBundle.message("project.jdk.project.jdk.name.list.column.value", myProjectJdkName), selected && !(SystemInfoRt.isWindows && UIManager.getLookAndFeel().getName().contains("Windows")) ? SimpleTextAttributes.SELECTED_SIMPLE_CELL_ATTRIBUTES : SimpleTextAttributes.SIMPLE_CELL_ATTRIBUTES); } else { setIcon(PlatformIcons.INVALID_ENTRY_ICON); append(AntBundle.message("project.jdk.not.specified.list.column.value"), SimpleTextAttributes.ERROR_ATTRIBUTES); } } else { OrderEntryAppearanceService.getInstance().forJdk(jdk, myInComboBox, selected, true).customize(this); } }
|
customizeCellRenderer
|
6,441
|
void (final AntBuildFileBase buildFile) { myBuildFile = buildFile; buildFile.updateProperties(); myForm.reset(myBuildFile); }
|
reset
|
6,442
|
void () { myForm.apply(myBuildFile); myBuildFile.updateConfig(); }
|
apply
|
6,443
|
boolean () { DialogBuilder builder = new DialogBuilder(myBuildFile.getProject()); builder.setCenterPanel(myForm.myWholePanel); builder.setDimensionServiceKey(DIMENSION_SERVICE_KEY); builder.setPreferredFocusComponent(myForm.getPreferedFocusComponent()); builder.setTitle(AntBundle.message("build.file.properties.dialog.title")); builder.removeAllActions(); builder.addOkAction(); builder.addCancelAction(); builder.setHelpId("reference.dialogs.buildfileproperties"); boolean isOk = builder.show() == DialogWrapper.OK_EXIT_CODE; if (isOk) { apply(); } beforeClose(); return isOk; }
|
showDialog
|
6,444
|
void () { myForm.beforeClose(myBuildFile); Disposer.dispose(myForm); }
|
beforeClose
|
6,445
|
boolean (AntBuildFileBase buildFile) { BuildFilePropertiesPanel panel = new BuildFilePropertiesPanel(); panel.reset(buildFile); return panel.showDialog(); }
|
editBuildFile
|
6,446
|
void (AbstractProperty.AbstractPropertyContainer options) { myBinding.loadValues(options); }
|
reset
|
6,447
|
void (AbstractProperty.AbstractPropertyContainer options) { myBinding.apply(options); }
|
apply
|
6,448
|
void (AbstractProperty.AbstractPropertyContainer options) { myBinding.beforeClose(options); }
|
beforeClose
|
6,449
|
JComponent () { return myWholePanel; }
|
getComponent
|
6,450
|
JComponent () { return myTabs[0].getPreferedFocusComponent(); }
|
getPreferedFocusComponent
|
6,451
|
void (final AntBuildFileBase buildFile) { myBinding.loadValues(buildFile.getAllOptions()); myBuildFileName.setText(buildFile.getPresentableUrl()); for (Tab tab : myTabs) { tab.reset(buildFile.getAllOptions()); } }
|
reset
|
6,452
|
void (AntBuildFileBase buildFile) { myBinding.apply(buildFile.getAllOptions()); for (Tab tab : myTabs) { tab.apply(buildFile.getAllOptions()); } }
|
apply
|
6,453
|
void (AntBuildFileBase buildFile) { myBinding.beforeClose(buildFile.getAllOptions()); for (Tab tab : myTabs) { tab.beforeClose(buildFile.getAllOptions()); } }
|
beforeClose
|
6,454
|
void () { }
|
dispose
|
6,455
|
String (BuildFileProperty buildFileProperty) { return buildFileProperty.getPropertyName(); }
|
valueOf
|
6,456
|
boolean (BuildFileProperty buildFileProperty) { return true; }
|
isCellEditable
|
6,457
|
void (BuildFileProperty buildFileProperty, String name) { buildFileProperty.setPropertyName(name); }
|
setValue
|
6,458
|
boolean (BuildFileProperty buildFileProperty) { return true; }
|
isCellEditable
|
6,459
|
String (BuildFileProperty buildFileProperty) { return buildFileProperty.getPropertyValue(); }
|
valueOf
|
6,460
|
void (BuildFileProperty buildFileProperty, String value) { buildFileProperty.setPropertyValue(value); }
|
setValue
|
6,461
|
TableCellEditor (BuildFileProperty item) { return new AntUIUtil.PropertyValueCellEditor(); }
|
getEditor
|
6,462
|
void (AnActionButton button) { if (myPropertiesTable.isEditing() && !myPropertiesTable.getCellEditor().stopCellEditing()) { return; } BuildFileProperty item = new BuildFileProperty(); ListTableModel<BuildFileProperty> model = (ListTableModel<BuildFileProperty>)myPropertiesTable.getModel(); ArrayList<BuildFileProperty> items = new ArrayList<>(model.getItems()); items.add(item); model.setItems(items); int newIndex = model.indexOf(item); ListSelectionModel selectionModel = myPropertiesTable.getSelectionModel(); selectionModel.clearSelection(); selectionModel.setSelectionInterval(newIndex, newIndex); ColumnInfo[] columns = model.getColumnInfos(); for (int i = 0; i < columns.length; i++) { ColumnInfo column = columns[i]; if (column.isCellEditable(item)) { myPropertiesTable.requestFocusInWindow(); myPropertiesTable.editCellAt(newIndex, i); break; } } }
|
run
|
6,463
|
JComponent () { return myWholePanel; }
|
getComponent
|
6,464
|
String () { return AntBundle.message("edit.ant.properties.tab.display.name"); }
|
getDisplayName
|
6,465
|
JComponent () { return myPropertiesTable; }
|
getPreferedFocusComponent
|
6,466
|
Boolean (TargetFilter targetFilter) { return targetFilter.isVisible(); }
|
valueOf
|
6,467
|
void (TargetFilter targetFilter, Boolean aBoolean) { targetFilter.setVisible(aBoolean.booleanValue()); }
|
setValue
|
6,468
|
int (JTable table) { return PREFERRED_CHECKBOX_COLUMN_WIDTH; }
|
getWidth
|
6,469
|
Class () { return Boolean.class; }
|
getColumnClass
|
6,470
|
boolean (TargetFilter targetFilter) { return true; }
|
isCellEditable
|
6,471
|
String (TargetFilter targetFilter) { return targetFilter.getTargetName(); }
|
valueOf
|
6,472
|
Comparator<TargetFilter> () { return NAME_COMPARATOR; }
|
getComparator
|
6,473
|
String (TargetFilter targetFilter) { return targetFilter.getDescription(); }
|
valueOf
|
6,474
|
Comparator<TargetFilter> () { return DESCRIPTION_COMPARATOR; }
|
getComparator
|
6,475
|
JComponent () { return myWholePanel; }
|
getComponent
|
6,476
|
String () { return AntBundle.message("edit.ant.properties.filters.tab.display.name"); }
|
getDisplayName
|
6,477
|
JComponent () { return myFiltersTable; }
|
getPreferedFocusComponent
|
6,478
|
Iterator<Sdk> () { Application application = ApplicationManager.getApplication(); if (application == null) { return Collections.singletonList((Sdk)null).iterator(); } ArrayList<Sdk> allJdks = new ArrayList<>(Arrays.asList(ProjectJdkTable.getInstance().getAllJdks())); allJdks.add(0, null); return allJdks.iterator(); }
|
getAllListItems
|
6,479
|
Sdk (Sdk jdk, JComponent parent) { ProjectJdksEditor editor = new ProjectJdksEditor(jdk, myJDKs.getComboBox()); editor.show(); return editor.getSelectedJdk(); }
|
openConfigureDialog
|
6,480
|
void (ActionEvent e) { AntSetPanel antSetPanel = new AntSetPanel(myAntGlobalConfiguration); antSetPanel.reset(); antSetPanel.setSelection(myProjectDefaultAnt.find(myAntGlobalConfiguration)); AntInstallation antInstallation = antSetPanel.showDialog(mySetDefaultAnt); if (antInstallation == null) { return; } myProjectDefaultAnt = antInstallation.getReference(); updateDefaultAnt(); }
|
actionPerformed
|
6,481
|
JComponent () { return myWholePanel; }
|
getComponent
|
6,482
|
String () { return AntBundle.message("edit.ant.properties.execution.tab.display.name"); }
|
getDisplayName
|
6,483
|
void (AbstractProperty.AbstractPropertyContainer options) { String projectJdkName = AntConfigurationImpl.DEFAULT_JDK_NAME.get(options); myJDKsController.setRenderer(new AntUIUtil.ProjectJdkRenderer(true, projectJdkName)); super.reset(options); myJDKsController.resetList(null); myProjectDefaultAnt = AntConfigurationImpl.DEFAULT_ANT.get(options); updateDefaultAnt(); }
|
reset
|
6,484
|
void () { myDefaultAnt.clear(); AntUIUtil.customizeReference(myProjectDefaultAnt, myDefaultAnt, myAntGlobalConfiguration); myDefaultAnt.revalidate(); myDefaultAnt.repaint(); }
|
updateDefaultAnt
|
6,485
|
void (AbstractProperty.AbstractPropertyContainer options) { AntConfigurationImpl.DEFAULT_ANT.set(options, myProjectDefaultAnt); super.apply(options); }
|
apply
|
6,486
|
JComponent () { return myAntCommandLine.getTextField(); }
|
getPreferedFocusComponent
|
6,487
|
JComponent () { return myWholePanel; }
|
getComponent
|
6,488
|
String () { return AntBundle.message("edit.ant.properties.additional.classpath.tab.display.name"); }
|
getDisplayName
|
6,489
|
JComponent () { return myClasspath.getPreferedFocusComponent(); }
|
getPreferedFocusComponent
|
6,490
|
void (JLabel label, ComponentWithBrowseButton component) { label.setLabelFor(component.getChildComponent()); }
|
setLabelFor
|
6,491
|
void (AbstractProperty.AbstractPropertyContainer container) { }
|
beforeClose
|
6,492
|
void (JToggleButton toggleButton, AbstractProperty<Boolean> property) { ToggleButtonBinding binding = new ToggleButtonBinding(toggleButton, property); myBindings.add(binding); }
|
bindBoolean
|
6,493
|
void (JTextComponent textComponent, AbstractProperty<Integer> property) { myBindings.add(new IntTextBinding(textComponent, property)); }
|
bindInt
|
6,494
|
TextBinding (JTextComponent textComponent, AbstractProperty<@Nls String> property) { TextBinding textBinding = new TextBinding(textComponent, property); myBindings.add(textBinding); return textBinding; }
|
bindString
|
6,495
|
void (AbstractProperty.AbstractPropertyContainer container) { for (final UIPropertyBinding binding : myBindings) { binding.loadValues(container); } }
|
loadValues
|
6,496
|
void (AbstractProperty.AbstractPropertyContainer container) { for (final UIPropertyBinding propertyBinding : myBindings) { propertyBinding.apply(container); } }
|
apply
|
6,497
|
void (AbstractProperty.AbstractPropertyContainer container) { for (final UIPropertyBinding binding : myBindings) { binding.beforeClose(container); } }
|
beforeClose
|
6,498
|
void (JComboBox comboBox, AbstractProperty<@Nls String> property) { myBindings.add(new ComboBoxBinding(comboBox, property)); }
|
bindString
|
6,499
|
void (UIPropertyBinding binding) { myBindings.add(binding); }
|
addBinding
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.