     @selectTab key
   handleSelectDropdown: (e, key) ->
     @selectTab key
-    @selectTab 'plugin' if !@state.doubleTabbed
-  handleSelectMenuItem: (e, key) ->
-    e.preventDefault()
-    if @state.doubleTabbed
-      @setState
-        pluginKey: key
-    else
-      @setState
-        key: key
-        pluginKey: key
   handleCtrlOrCmdTabKeyDown: ->
     @selectTab 'mainView'
   handleCtrlOrCmdNumberKeyDown: (num) ->

      Boolean)[0]

  setNewKey: (nxtKey, force=false) ->
    if !force
      nowKey = @state.nowKey || @props.children[0]?.key
      return if (nowKey && nxtKey == nowKey) || !@findChildByKey nxtKey
    @setState
      nowKey: nxtKey
    @props.onChange? nxtKey

  activeKey: ->
    @state.nowKey || @props.children[0]?.key

  componentDidUpdate: (prevProps, prevState) ->
    cur = (new Date()).getTime()
    console.log "the cost of tab-module's render: #{cur-@nowTime}ms" if process.env.DEBUG?
  cachePluginList: async ->
    plugins = yield PluginManager.getValidPlugins()
    plugins = plugins.filter (plugin) ->
      plugin.show isnt false
    plugins = _.sortBy plugins, 'priority'
    if @isMounted()
      @setState
        plugins: plugins
  selectTab: (key) ->
    return if !key?
    event = new CustomEvent 'TabContentsUnion.show',
