app/src/main/java/com/oracle/javafx/scenebuilder/app/menubar/MenuBarController.java
private void constructBuiltinPartOfInsertMenu() {
    assert insertMenu != null;
    insertMenu.getItems().clear();

    final Map<String, Set<LibraryItem>> sectionMap = new TreeMap<>(new BuiltinSectionComparator());

    for (LibraryItem li : BuiltinLibrary.getLibrary().getItems()) {
      Set<LibraryItem> sectionItems = sectionMap.get(li.getSection());
      if (sectionItems == null) {
        sectionItems = new TreeSet<>(new LibraryItemNameComparator());
        sectionMap.put(li.getSection(), sectionItems);
      }
      // Add all builtin Library items except the ContextMenu (see DTL-6831)
      if (!ContextMenu.class.getSimpleName().equals(li.getName())) {
        sectionItems.add(li);
      }
    }

    for (Map.Entry<String, Set<LibraryItem>> e : sectionMap.entrySet()) {
      final Menu sectionMenu = makeMenuForLibrarySection(e.getKey());
      insertMenu.getItems().add(sectionMenu);
      for (LibraryItem li : e.getValue()) {
        sectionMenu.getItems().add(makeMenuItemForLibraryItem(li));
      }
    }
  }
// unless its implementation is modified.
unless its implementation is modified.
unless its implementation is modified .
private void constructBuiltinPartOfInsertMenu() {
    assert insertMenu != null;
    insertMenu.getItems().clear();
    final Map<String, Set<LibraryItem>> sectionMap = new TreeMap<>(new BuiltinSectionComparator());
    for (LibraryItem li : BuiltinLibrary.getLibrary().getItems()) {
      Set<LibraryItem> sectionItems = sectionMap.get(li.getSection());
      if (sectionItems == null) {
        sectionItems = new TreeSet<>(new LibraryItemNameComparator());
        sectionMap.put(li.getSection(), sectionItems);
      }
      if (!ContextMenu.class.getSimpleName().equals(li.getName())) {
        sectionItems.add(li);
      }
    }
    for (Map.Entry<String, Set<LibraryItem>> e : sectionMap.entrySet()) {
      final Menu sectionMenu = makeMenuForLibrarySection(e.getKey());
      insertMenu.getItems().add(sectionMenu);
      for (LibraryItem li : e.getValue()) {
        sectionMenu.getItems().add(makeMenuItemForLibraryItem(li));
      }
    }
  }
private void constructBuiltinPartOfInsertMenu ( ) { assert insertMenu != null ; insertMenu . getItems ( ) . clear ( ) ; final Map < String , Set < LibraryItem > > sectionMap = new TreeMap < > ( new BuiltinSectionComparator ( ) ) ; for ( LibraryItem li : BuiltinLibrary . getLibrary ( ) . getItems ( ) ) { Set < LibraryItem > sectionItems = sectionMap . get ( li . getSection ( ) ) ; if ( sectionItems == null ) { sectionItems = new TreeSet < > ( new LibraryItemNameComparator ( ) ) ; sectionMap . put ( li . getSection ( ) , sectionItems ) ; } if ( ! ContextMenu . class . getSimpleName ( ) . equals ( li . getName ( ) ) ) { sectionItems . add ( li ) ; } } for ( Map . Entry < String , Set < LibraryItem > > e : sectionMap . entrySet ( ) ) { final Menu sectionMenu = makeMenuForLibrarySection ( e . getKey ( ) ) ; insertMenu . getItems ( ) . add ( sectionMenu ) ; for ( LibraryItem li : e . getValue ( ) ) { sectionMenu . getItems ( ) . add ( makeMenuItemForLibraryItem ( li ) ) ; } } }
unless its implementation is modified.
unless its implementation is modified .
// Add all builtin Library items except the ContextMenu (see DTL-6831)