Remove specificity caching now handled by clear-cut

This commit is contained in:
Kevin Sawicki
2015-04-13 17:47:25 -07:00
parent 7cd263dfb7
commit 5449658011
2 changed files with 2 additions and 4 deletions

View File

@@ -5,7 +5,6 @@ _ = require 'underscore-plus'
{validateSelector} = require './selector-validator'
SequenceCount = 0
SpecificityCache = {}
# Public: Associates listener functions with commands in a
# context-sensitive way using CSS selectors. You can access a global instance of
@@ -241,7 +240,7 @@ class CommandRegistry
class SelectorBasedListener
constructor: (@selector, @callback) ->
@specificity = (SpecificityCache[@selector] ?= specificity(@selector))
@specificity = specificity(@selector)
@sequenceNumber = SequenceCount++
compare: (other) ->

View File

@@ -9,7 +9,6 @@ MenuHelpers = require './menu-helpers'
{validateSelector} = require './selector-validator'
platformContextMenu = require('../package.json')?._atomMenu?['context-menu']
SpecificityCache = {}
# Extended: Provides a registry for commands that you'd like to appear in the
# context menu.
@@ -208,4 +207,4 @@ class ContextMenuManager
class ContextMenuItemSet
constructor: (@selector, @items) ->
@specificity = (SpecificityCache[@selector] ?= specificity(@selector))
@specificity = specificity(@selector)