private void fillPredefinedStylesAndLanguages(JPopupMenu copyMenu) {
    fillPredefinedStyles(copyMenu);
    LanguageCodeStyleSettingsProvider provider = getProvider();
    int n = 0;
    if (provider != null) n = provider.getApplicableLanguages().size();
    if (n > 0) {
      copyMenu.addSeparator();
      if (n <= 15) {
        fillLanguages(copyMenu);
      }
      else {
        JMenu langs = new JMenu(ApplicationBundle.message("code.style.set.from.menu.language")) {
          @Override
          public void paint(Graphics g) {
            GraphicsUtil.setupAntialiasing(g);
            super.paint(g);
          }
        };
        copyMenu.add(langs);
        fillLanguages(langs);
      }
    }
  }
private void fillPredefinedStylesAndLanguages(JPopupMenu copyMenu)