code: function handleCurrentFileChange() {
          var newFile = MainViewManager.getCurrentlyViewedFile(MainViewManager.ACTIVE_PANE);
  
          if (newFile) {
              var newDocument = DocumentManager.getOpenDocumentForPath(newFile.fullPath);
  
              if (newDocument) {
                  _currentTitlePath = _shortTitleForDocument(newDocument);
              } else {
                  _currentTitlePath = ProjectManager.makeProjectRelativeIfPossible(newFile.fullPath);
              }
          } else {
              _currentTitlePath = null;
          }
  
          // Update title text & "dirty dot" display
          _updateTitle();
      }
docs: Handles currentFileChange and filenameChanged events and updates the titlebar