Object (@NotNull String dataId) { if (ResourceBundle.ARRAY_DATA_KEY.is(dataId)) { return new ResourceBundle[]{myResourceBundle}; } else if (PlatformCoreDataKeys.BGT_DATA_PROVIDER.is(dataId)) { DataProvider superProvider = (DataProvider)super.getData(dataId); JBIterable<Object> selection = JBIterable.of(getTree().getSelectionPaths()).map(TreeUtil::getLastUserObject); return CompositeDataProvider.compose(slowId -> getSlowData(slowId, selection, myResourceBundle), superProvider); } else if (PlatformDataKeys.DELETE_ELEMENT_PROVIDER.is(dataId)) { return new DeleteProvider() { @Override public @NotNull ActionUpdateThread getActionUpdateThread() { return ActionUpdateThread.BGT; } @Override public void deleteElement(@NotNull DataContext dataContext) { PsiElement[] selectedPsiElements = PlatformCoreDataKeys.PSI_ELEMENT_ARRAY.getData(dataContext); if (selectedPsiElements == null) return; List<PsiFile> psiFiles = ContainerUtil.findAll(selectedPsiElements, PsiFile.class); DeleteProvider delegate; if (!psiFiles.isEmpty()) { delegate = new ResourceBundleDeleteProvider(); } else { IProperty[] properties = IProperty.ARRAY_KEY.getData(dataContext); if (properties != null && properties.length != 0) { delegate = new PropertiesDeleteProvider(((ResourceBundleEditor)getFileEditor()).getPropertiesInsertDeleteManager(), properties); } else { return; } } delegate.deleteElement(dataContext); } @Override public boolean canDeleteElement(@NotNull DataContext dataContext) { return CommonDataKeys.PROJECT.getData(dataContext) != null; } }; } else if (PlatformDataKeys.COPY_PROVIDER.is(dataId)) { return new CopyProvider() { @Override public @NotNull ActionUpdateThread getActionUpdateThread() { return ActionUpdateThread.BGT; } @Override public void performCopy(@NotNull DataContext dataContext) { PsiElement[] selectedPsiElements = PlatformCoreDataKeys.PSI_ELEMENT_ARRAY.getData(dataContext); if (selectedPsiElements != null) { List<String> names = new ArrayList<>(selectedPsiElements.length); for (PsiElement element : selectedPsiElements) { if (element instanceof PsiNamedElement) { names.add(((PsiNamedElement)element).getName()); } } CopyPasteManager.getInstance().setContents(new StringSelection(StringUtil.join(names, "\n"))); } } @Override public boolean isCopyEnabled(@NotNull DataContext dataContext) { return true; } @Override public boolean isCopyVisible(@NotNull DataContext dataContext) { return true; } }; } return super.getData(dataId); }