@Override
          public void run(@NotNull ProgressIndicator indicator) {
            try {
              try (ObjectOutputStream out = new ObjectOutputStream(Files.newOutputStream(serializedEmojiPath, StandardOpenOption.CREATE))) {
                out.writeObject(emojiData.myEmoji);
                out.writeObject(emojiData.myCategories);
              }
              try (ObjectOutputStream out = new ObjectOutputStream(Files.newOutputStream(serializedNamesPath, StandardOpenOption.CREATE))) {
                out.writeObject(names);
              }
              indicator.setText(message("message.EmojiPicker.BuildingIndex"));
              indicator.setIndeterminate(false);
              Locale[] locales = Locale.getAvailableLocales();
              double multiplier = 1.0 / (double)locales.length;
              for (int i = 0; i < locales.length; i++) {
                indicator.setFraction((double)i * multiplier);
                if (!locales[i].equals(baseLocale)) cldr.read(locales[i], null);
              }
              indicator.setIndeterminate(true);
              SearchIndex searchIndex = new SearchIndex(cldr.indexTree.buildIndex());
              indicator.setText(message("message.EmojiPicker.SavingIndexData"));
              try (ObjectOutputStream out = new ObjectOutputStream(Files.newOutputStream(serializedIndexPath, StandardOpenOption.CREATE))) {
                out.writeObject(searchIndex.myIndex);
              }
              myEmojiSearchIndex = searchIndex;
            }
            catch (IOException e) {
              throw new UncheckedIOException(e);
            }
            catch (SAXException e) {
              throw new RuntimeException(e);
            }
          }
@Override
          public void run(@NotNull ProgressIndicator indicator)