code: function handleFileNew() {
          //var defaultExtension = PreferencesManager.get("defaultExtension");
          //if (defaultExtension) {
          //    defaultExtension = "." + defaultExtension;
          //}
          var defaultExtension = "";  // disable preference setting for now
  
          var doc = DocumentManager.createUntitledDocument(_nextUntitledIndexToUse++, defaultExtension);
          MainViewManager._edit(MainViewManager.ACTIVE_PANE, doc);
  
          HealthLogger.sendAnalyticsData(
              HealthLogger.commonStrings.USAGE +
              HealthLogger.commonStrings.FILE_OPEN +
              HealthLogger.commonStrings.FILE_NEW,
              HealthLogger.commonStrings.USAGE,
              HealthLogger.commonStrings.FILE_OPEN,
              HealthLogger.commonStrings.FILE_NEW
          );
  
          return new $.Deferred().resolve(doc).promise();
      }
docs: Create a new untitled document in the workingset, and make it the current document.
  Promise is resolved (synchronously) with the newly-created Document.