code: private void menuOpenFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuOpenFileActionPerformed
      final File file = DialogProviderManager.getInstance().getDialogProvider().msgOpenFileDialog(null, "open-file", "Open file", null, true, MMDEditor.MMD_FILE_FILTER, "Open");
      if (file != null) {
        if (openFileAsTab(file, -1)) {
          try {
            FileHistoryManager.getInstance().registerOpenedProject(file);
          } catch (IOException ex) {
            LOGGER.error("Can't register last opened file", ex); //NOI18N
          }
        }
      }
    }
docs: GEN-LAST:event_menuPreferencesActionPerformed