Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8098001

ContextMenuController should creates its FX objects lazily

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • javafx
    • None

      Today ContextMenuController creates all its FX objects in its constructor.
      This makes EditorController construction slower.

      ContextMenuController should defer its creation operations until contextMenu is needed.

      This could be done in getContextMenu() :

          public ContextMenu getContextMenu() {
              if (contextMenu == null) {
                   … create everything…
              }
              return contextMenu;
          }

      … then all the remaining code should use getContextMenu() in place of "this.contextMenu".


            Unassigned Unassigned
            eleponn Eric Le Ponner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: