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

ContextMenuController should creates its FX objects lazily

    XMLWordPrintable

Details

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

    Description

      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".


      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:
              Imported: