Class AbstractXMLNotifier

java.lang.Object
org.eclipse.lemminx.client.AbstractXMLNotifier
Direct Known Subclasses:
InvalidPathWarner, LimitExceededWarner

public abstract class AbstractXMLNotifier extends Object
Sends a notification to the client via a jsonrpc notification while managing cache
  • Field Details

  • Constructor Details

  • Method Details

    • existsInCache

      public boolean existsInCache(IXMLSettingFeature key, String value)
      Returns true if value exists in the cache set identified by key and false otherwise
      Parameters:
      key - the key for the cache set
      value - the value to check
      Returns:
      true if value exists in the cache set identified by key and false otherwise
    • existsInCache

      public boolean existsInCache(IXMLSettingFeature key, Set<String> values)
      Returns true if values is equal to the cache set identified by key and false otherwise
      Parameters:
      key - the key for the cache set
      values - the values set to check
      Returns:
      true if values is equal to the cache set identified by key and false otherwise
    • addToCache

      public void addToCache(IXMLSettingFeature key, String value)
      Adds value to the cache set identified by key If such cache set does not exist, this method will initialize it with value added
      Parameters:
      key - the key for the cache set to add to
      value - the value to add
    • setCacheValues

      public void setCacheValues(IXMLSettingFeature key, Set<String> values)
      Sets the cache set identified by key
      Parameters:
      key - the key for the cache set
      values - the cache set
    • evictKey

      public void evictKey(IXMLSettingFeature key)
      Evicts the set identified by the provided key, from the cache
      Parameters:
      key -
    • evictValue

      public void evictValue(String value)
      Evicts the provided value from all cached sets
      Parameters:
      value -
    • sendNotification

      protected void sendNotification(String message, org.eclipse.lsp4j.MessageType messageType, org.eclipse.lsp4j.Command... commands)
    • getSharedSettings

      protected SharedSettings getSharedSettings()