Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
23,600 | Configuration (Project project) { return project.getService(Configuration.class); } | getProjectInstance |
23,601 | List<BaseInjection> () { return Collections.emptyList(); } | getDefaultInjections |
23,602 | Collection<BaseInjection> (String languageId) { return myInjectionsById.getValue().get(languageId); } | getInjectionsByLanguageId |
23,603 | void (final List<BaseInjection> injections) { final Map<String, Set<BaseInjection>> map = ContainerUtil.classify(injections.iterator(), o -> o.getSupportId()); List<BaseInjection> originalInjections = new ArrayList<>(); List<BaseInjection> newInjections = new ArrayList<>(); for (String supportId : InjectorUtils.getActi... | importPlaces |
23,604 | void (final Collection<? extends BaseInjection> existingInjections, final Collection<? extends BaseInjection> importingInjections, final Collection<? super BaseInjection> originalInjections, final Collection<? super BaseInjection> newInjections) { final MultiValuesMap<InjectionPlace, BaseInjection> placeMap = new Multi... | importInjections |
23,605 | void () { incModificationCount(); } | configurationModified |
23,606 | BaseInjection (@NotNull final BaseInjection injection) { final List<BaseInjection> list = getInjections(injection.getSupportId()); for (BaseInjection cur : list) { if (cur.intersectsWith(injection)) return cur; } return null; } | findExistingInjection |
23,607 | boolean (final PsiLanguageInjectionHost host, final Collection<String> languages, final boolean enabled) { List<BaseInjection> originalInjections = new ArrayList<>(); List<BaseInjection> newInjections = new ArrayList<>(); for (LanguageInjectionSupport support : InjectorUtils.getActiveInjectionSupports()) { for (BaseInj... | setHostInjectionEnabled |
23,608 | void (Collection<? extends BaseInjection> injections) { for (BaseInjection injection : injections) { myInjections.get(injection.getSupportId()).add(injection); } } | setInjections |
23,609 | List<BaseInjection> (final String injectorId) { return Collections.unmodifiableList(myInjections.get(injectorId)); } | getInjections |
23,610 | void (Project project, @Nullable PsiFile hostFile, List<? extends BaseInjection> newInjections, List<? extends BaseInjection> originalInjections, List<? extends PsiElement> psiElementsToRemove) { replaceInjectionsWithUndo(project, hostFile, newInjections, originalInjections, true, psiElementsToRemove, (add, remove) -> ... | replaceInjectionsWithUndo |
23,611 | void (final List<? extends BaseInjection> add, final List<? extends BaseInjection> remove) { replaceInjections(add, remove, false); } | replaceInjectionsWithUndoInner |
23,612 | void () { actualProcessor.process(remove, add); } | undo |
23,613 | void () { actualProcessor.process(add, remove); } | redo |
23,614 | boolean () { return global; } | isGlobal |
23,615 | boolean (List<? extends BaseInjection> newInjections, List<? extends BaseInjection> originalInjections, boolean forceLevel) { boolean changed = false; for (BaseInjection injection : originalInjections) { changed |= myInjections.get(injection.getSupportId()).remove(injection); } for (BaseInjection injection : newInjecti... | replaceInjections |
23,616 | void (List<? extends BaseInjection> injections, Runnable runnable) { replaceInjections(injections, ContainerUtil.emptyList(), true); try { runnable.run(); } finally { replaceInjections(ContainerUtil.emptyList(), injections, true); } } | withInjections |
23,617 | String () { return myLanguageAnnotation; } | getLanguageAnnotationClass |
23,618 | String () { return myPatternAnnotation; } | getPatternAnnotationClass |
23,619 | String () { return mySubstAnnotation; } | getSubstAnnotationClass |
23,620 | void (@Nullable String type) { if (type != null) { setInstrumentationType(InstrumentationType.valueOf(type)); } } | setInstrumentationType |
23,621 | void (@NotNull InstrumentationType type) { myInstrumentationType = type; } | setInstrumentationType |
23,622 | void (@Nullable String languageAnnotation) { if (languageAnnotation == null) return; myLanguageAnnotation = languageAnnotation; myLanguageAnnotationPair = Pair.create(languageAnnotation, Collections.singleton(languageAnnotation)); } | setLanguageAnnotation |
23,623 | void (@Nullable String patternAnnotation) { if (patternAnnotation == null) return; myPatternAnnotation = patternAnnotation; myPatternAnnotationPair = Pair.create(patternAnnotation, Collections.singleton(patternAnnotation)); } | setPatternAnnotation |
23,624 | void (@Nullable String substAnnotation) { if (substAnnotation == null) return; mySubstAnnotation = substAnnotation; mySubstAnnotationPair = Pair.create(substAnnotation, Collections.singleton(substAnnotation)); } | setSubstAnnotation |
23,625 | boolean () { return myIncludeUncomputablesAsLiterals; } | isIncludeUncomputablesAsLiterals |
23,626 | void (boolean flag) { myIncludeUncomputablesAsLiterals = flag; } | setIncludeUncomputablesAsLiterals |
23,627 | DfaOption () { return myDfaOption; } | getDfaOption |
23,628 | void (@NotNull final DfaOption dfaOption) { myDfaOption = dfaOption; } | setDfaOption |
23,629 | boolean () { return mySourceModificationAllowed; } | isSourceModificationAllowed |
23,630 | void (boolean sourceModificationAllowed) { mySourceModificationAllowed = sourceModificationAllowed; } | setSourceModificationAllowed |
23,631 | InstrumentationType () { return myInstrumentationType; } | getInstrumentation |
23,632 | void (@NotNull Element element) { AdvancedConfiguration defaults = new AdvancedConfiguration(); if (myInstrumentationType != defaults.myInstrumentationType) { JDOMExternalizerUtil.writeField(element, INSTRUMENTATION_TYPE_NAME, myInstrumentationType.toString()); } JDOMExternalizerUtil.writeField(element, LANGUAGE_ANNOTA... | writeState |
23,633 | void (final Element element) { setInstrumentationType(JDOMExternalizerUtil.readField(element, INSTRUMENTATION_TYPE_NAME)); setLanguageAnnotation(JDOMExternalizerUtil.readField(element, LANGUAGE_ANNOTATION_NAME)); setPatternAnnotation(JDOMExternalizerUtil.readField(element, PATTERN_ANNOTATION_NAME)); setSubstAnnotation(... | loadState |
23,634 | void (ToolbarDecorator decorator) { final Consumer<BaseInjection> consumer = this::addInjection; final Factory<BaseInjection> producer = (NullableFactory<BaseInjection>)() -> { final InjInfo info = getSelectedInjection(); return info == null? null : info.injection; }; for (LanguageInjectionSupport support : InjectorUti... | createActions |
23,635 | boolean () { return getEditAction() != null; } | isEnabled |
23,636 | void (@NotNull AnActionEvent e) { final InjInfo injection = getSelectedInjection(); if (injection != null) { addInjection(injection.injection.copy()); //performEditAction(e); } } | actionPerformed |
23,637 | void (@NotNull final AnActionEvent e) { performSelectedInjectionsEnabled(true); } | actionPerformed |
23,638 | void (@NotNull final AnActionEvent e) { performSelectedInjectionsEnabled(false); } | actionPerformed |
23,639 | void (@NotNull AnActionEvent e) { SpeedSearchSupply supply = SpeedSearchSupply.getSupply(myInjectionsTable); e.getPresentation().setEnabled(supply == null || !supply.isPopupActive()); } | update |
23,640 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
23,641 | void (@NotNull final AnActionEvent e) { performToggleAction(); } | actionPerformed |
23,642 | void (@NotNull final AnActionEvent e) { final List<InjInfo> injections = getSelectedInjections(); final CfgInfo cfg = getTargetCfgInfo(injections); if (cfg == null) return; for (InjInfo info : injections) { if (info.cfgInfo == cfg) continue; if (info.bundled) continue; info.cfgInfo.injectionInfos.remove(info); cfg.addI... | actionPerformed |
23,643 | CfgInfo (final List<InjInfo> injections) { CfgInfo cfg = null; for (InjInfo info : injections) { if (info.bundled) { continue; } if (cfg == null) cfg = info.cfgInfo; else if (cfg != info.cfgInfo) return info.cfgInfo; } if (cfg == null) return null; for (CfgInfo info : myInfos) { if (info != cfg) return info; } throw ne... | getTargetCfgInfo |
23,644 | void (@NotNull final AnActionEvent e) { doImportAction(e.getDataContext()); updateCountLabel(); } | actionPerformed |
23,645 | void (@NotNull final AnActionEvent e) { List<BaseInjection> injections = getInjectionList(getSelectedInjections()); VirtualFileWrapper wrapper = FileChooserFactory.getInstance() .createSaveFileDialog(new FileSaverDescriptor(IntelliLangBundle.message("dialog.title.export.selected.injections.to.file"), "", "xml"), myProj... | actionPerformed |
23,646 | boolean () { return !getSelectedInjections().isEmpty(); } | isEnabled |
23,647 | void () { final AnAction action = getEditAction(); if (action != null) { final int row = myInjectionsTable.getSelectedRow(); action.actionPerformed(new AnActionEvent(null, DataManager.getInstance().getDataContext(myInjectionsTable), ActionPlaces.UNKNOWN, new Presentation(""), ActionManager.getInstance(), 0)); myInjecti... | performEditAction |
23,648 | void () { int placesCount = 0; int enablePlacesCount = 0; final List<InjInfo> items = myInjectionsTable.getListTableModel().getItems(); if (!items.isEmpty()) { for (InjInfo injection : items) { for (InjectionPlace place : injection.injection.getInjectionPlaces()) { placesCount++; if (place.isEnabled()) enablePlacesCoun... | updateCountLabel |
23,649 | AnAction () { final InjInfo info = getSelectedInjection(); final String supportId = info == null? null : info.injection.getSupportId(); return supportId == null? null : myEditActions.get(supportId); } | getEditAction |
23,650 | void (final BaseInjection injection) { final InjInfo info = getDefaultCfgInfo().addInjection(injection); myInjectionsTable.getListTableModel().setItems(getInjInfoList(myInfos)); final int index = myInjectionsTable.convertRowIndexToView(myInjectionsTable.getListTableModel().getItems().indexOf(info)); myInjectionsTable.g... | addInjection |
23,651 | CfgInfo () { return myInfos[0]; } | getDefaultCfgInfo |
23,652 | boolean () { return true; } | hasOwnContent |
23,653 | Configurable[] () { final ArrayList<Configurable> configurables = new ArrayList<>(); for (LanguageInjectionSupport support : InjectorUtils.getActiveInjectionSupports()) { ContainerUtil.addAll(configurables, support.createSettings(myProject, myConfiguration)); } configurables.sort((o1, o2) -> Comparing.compare(o1.getDis... | buildConfigurables |
23,654 | String () { return "IntelliLang.Configuration"; } | getId |
23,655 | void (final List<? extends BaseInjection> injections) { injections.sort((o1, o2) -> { final int support = Comparing.compare(o1.getSupportId(), o2.getSupportId()); if (support != 0) return support; final int lang = Comparing.compare(o1.getInjectedLanguageId(), o2.getInjectedLanguageId()); if (lang != 0) return lang; ret... | sortInjections |
23,656 | JComponent () { return myRoot; } | createComponent |
23,657 | void () { for (CfgInfo info : myInfos) { info.reset(); } myInjectionsTable.getListTableModel().setItems(getInjInfoList(myInfos)); updateCountLabel(); } | reset |
23,658 | void () { for (CfgInfo info : myInfos) { info.apply(); } reset(); } | apply |
23,659 | boolean () { return ContainerUtil.exists(myInfos, CfgInfo::isModified); } | isModified |
23,660 | void (final boolean enabled) { for (InjInfo info : getSelectedInjections()) { info.injection.setPlaceEnabled(null, enabled); } myInjectionsTable.updateUI(); updateCountLabel(); } | performSelectedInjectionsEnabled |
23,661 | void () { final List<InjInfo> selectedInjections = getSelectedInjections(); boolean enabledExists = false; boolean disabledExists = false; for (InjInfo info : selectedInjections) { if (info.injection.isEnabled()) enabledExists = true; else disabledExists = true; if (enabledExists && disabledExists) break; } boolean all... | performToggleAction |
23,662 | void () { final int selectedRow = myInjectionsTable.getSelectedRow(); if (selectedRow < 0) return; final List<InjInfo> selected = getSelectedInjections(); for (InjInfo info : selected) { if (info.bundled) continue; info.cfgInfo.injectionInfos.remove(info); } myInjectionsTable.getListTableModel().setItems(getInjInfoList... | performRemove |
23,663 | List<InjInfo> () { List<InjInfo> toRemove = new ArrayList<>(); for (int row : myInjectionsTable.getSelectedRows()) { toRemove.add(myInjectionsTable.getItems().get(myInjectionsTable.convertRowIndexToModel(row))); } return toRemove; } | getSelectedInjections |
23,664 | InjInfo () { final int row = myInjectionsTable.getSelectedRow(); return row < 0? null : myInjectionsTable.getItems().get(myInjectionsTable.convertRowIndexToModel(row)); } | getSelectedInjection |
23,665 | void (AnActionButton e) { DefaultActionGroup group = new DefaultActionGroup(myAddActions); JBPopupFactory.getInstance() .createActionGroupPopup(null, group, e.getDataContext(), JBPopupFactory.ActionSelectionAid.NUMBERING, true, this::updateCountLabel, -1) .show(e.getPreferredPopupPoint()); } | performAdd |
23,666 | String () { return IntelliLangBundle.message("configurable.InjectionsSettingsUI.display.name"); } | getDisplayName |
23,667 | String () { return "reference.settings.injection.language.injection.settings"; } | getHelpTopic |
23,668 | boolean (@NotNull MouseEvent e) { final int row = rowAtPoint(e.getPoint()); if (row < 0) return false; if (columnAtPoint(e.getPoint()) <= 0) return false; myInjectionsTable.getSelectionModel().setSelectionInterval(row, row); performEditAction(); return true; } | onDoubleClick |
23,669 | String (@NotNull InjInfo element) { final BaseInjection injection = element.injection; return injection.getSupportId() + " " + injection.getInjectedLanguageId() + " " + injection.getDisplayName(); } | getItemText |
23,670 | ColumnInfo[] () { final TableCellRenderer booleanCellRenderer = createBooleanCellRenderer(); final TableCellRenderer displayNameCellRenderer = createDisplayNameCellRenderer(); final TableCellRenderer languageCellRenderer = createLanguageCellRenderer(); final Comparator<InjInfo> languageComparator = (o1, o2) -> Comparin... | createInjectionColumnInfos |
23,671 | Class () { return Boolean.class; } | getColumnClass |
23,672 | Boolean (final InjInfo o) { return o.injection.isEnabled(); } | valueOf |
23,673 | boolean (final InjInfo injection) { return true; } | isCellEditable |
23,674 | void (final InjInfo injection, final Boolean value) { injection.injection.setPlaceEnabled(null, value.booleanValue()); } | setValue |
23,675 | TableCellRenderer (final InjInfo injection) { return booleanCellRenderer; } | getRenderer |
23,676 | InjInfo (final InjInfo info) { return info; } | valueOf |
23,677 | Comparator<InjInfo> () { return displayNameComparator; } | getComparator |
23,678 | TableCellRenderer (final InjInfo injection) { return displayNameCellRenderer; } | getRenderer |
23,679 | InjInfo (final InjInfo info) { return info; } | valueOf |
23,680 | Comparator<InjInfo> () { return languageComparator; } | getComparator |
23,681 | TableCellRenderer (final InjInfo info) { return languageCellRenderer; } | getRenderer |
23,682 | String (final InjInfo info) { return info.bundled ? "Built-in" : info.cfgInfo.title; } | valueOf |
23,683 | TableCellRenderer (final InjInfo injInfo) { return typeRenderer; } | getRenderer |
23,684 | int (final JTable table) { return table.getFontMetrics(table.getFont()).stringWidth(StringUtil.repeatSymbol('m', 6)); } | getWidth |
23,685 | Comparator<InjInfo> () { return (o1, o2) -> Comparing.compare(valueOf(o1), valueOf(o2)); } | getComparator |
23,686 | BooleanTableCellRenderer () { return new BooleanTableCellRenderer() { @Override public Component getTableCellRendererComponent(final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column) { return setLabelColors(super.getTableCellRendererComponent(table, val... | createBooleanCellRenderer |
23,687 | Component (final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column) { return setLabelColors(super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column), table, isSelected, row); } | getTableCellRendererComponent |
23,688 | TableCellRenderer () { return new TableCellRenderer() { final JLabel myLabel = new JLabel(); @Override public Component getTableCellRendererComponent(final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column) { final InjInfo injection = (InjInfo)value; // ... | createLanguageCellRenderer |
23,689 | Component (final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column) { final InjInfo injection = (InjInfo)value; // fix for a marvellous Swing peculiarity: AccessibleJTable likes to pass null here if (injection == null) return myLabel; final String langua... | getTableCellRendererComponent |
23,690 | TableCellRenderer () { return new TableCellRenderer() { final SimpleColoredComponent myLabel = new SimpleColoredComponent(); final SimpleColoredText myText = new SimpleColoredText(); @Override public Component getTableCellRendererComponent(final JTable table, final Object value, final boolean isSelected, final boolean ... | createDisplayNameCellRenderer |
23,691 | Component (final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column) { myLabel.clear(); final InjInfo info = (InjInfo)value; // fix for a marvellous Swing peculiarity: AccessibleJTable likes to pass null here if (info == null) return myLabel; final Simple... | getTableCellRendererComponent |
23,692 | TableCellRenderer () { return new TableCellRenderer() { final SimpleColoredComponent myLabel = new SimpleColoredComponent(); @Override public Component getTableCellRendererComponent(final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column) { myLabel.clear... | createTypeRenderer |
23,693 | Component (final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column) { myLabel.clear(); final String info = (String)value; if (info == null) return myLabel; final SimpleTextAttributes grayAttrs = isSelected ? SimpleTextAttributes.REGULAR_ATTRIBUTES : Simp... | getTableCellRendererComponent |
23,694 | Component (final Component label, final JTable table, final boolean isSelected, final int row) { if (label instanceof JComponent) { ((JComponent)label).setOpaque(true); } label.setForeground(isSelected ? table.getSelectionForeground() : table.getForeground()); label.setBackground(isSelected ? table.getSelectionBackgrou... | setLabelColors |
23,695 | void (final DataContext dataContext) { final FileChooserDescriptor descriptor = new FileChooserDescriptor(true, false, false, false, true, false) { @Override public boolean isFileVisible(VirtualFile file, boolean showHiddenFiles) { return super.isFileVisible(file, showHiddenFiles) && (file.isDirectory() || "xml".equals... | doImportAction |
23,696 | boolean (VirtualFile file, boolean showHiddenFiles) { return super.isFileVisible(file, showHiddenFiles) && (file.isDirectory() || "xml".equals(file.getExtension()) || FileTypeRegistry.getInstance().isFileOfType(file, ArchiveFileType.INSTANCE)); } | isFileVisible |
23,697 | boolean (@Nullable VirtualFile file) { return file != null && FileTypeRegistry.getInstance().isFileOfType(file, StdFileTypes.XML); } | isFileSelectable |
23,698 | void () { final List<BaseInjection> injectionList = getInjectionList(injectionInfos); cfg.replaceInjections(injectionList, originalInjections, true); originalInjections.clear(); originalInjections.addAll(injectionList); sortInjections(originalInjections); FileContentUtil.reparseOpenedFiles(); } | apply |
23,699 | void () { injectionInfos.clear(); for (BaseInjection injection : originalInjections) { injectionInfos.add(new InjInfo(injection.copy(), this, bundledInjections.contains(injection))); } } | reset |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.