Package org.eclipse.lemminx.client
Class AbstractXMLNotifier
java.lang.Object
org.eclipse.lemminx.client.AbstractXMLNotifier
- Direct Known Subclasses:
InvalidPathWarner,LimitExceededWarner
Sends a notification to the client via a jsonrpc notification
while managing cache
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCache(IXMLSettingFeature key, String value) Addsvalueto the cache set identified bykeyIf such cache set does not exist, this method will initialize it withvalueaddedvoidEvicts the set identified by the provided key, from the cachevoidevictValue(String value) Evicts the provided value from all cached setsbooleanexistsInCache(IXMLSettingFeature key, String value) Returns true ifvalueexists in the cache set identified bykeyand false otherwisebooleanexistsInCache(IXMLSettingFeature key, Set<String> values) Returns true ifvaluesis equal to the cache set identified bykeyand false otherwiseprotected SharedSettingsprotected voidsendNotification(String message, org.eclipse.lsp4j.MessageType messageType, org.eclipse.lsp4j.Command... commands) voidsetCacheValues(IXMLSettingFeature key, Set<String> values) Sets the cache set identified bykey
-
Field Details
-
cache
-
-
Constructor Details
-
AbstractXMLNotifier
-
-
Method Details
-
existsInCache
Returns true ifvalueexists in the cache set identified bykeyand false otherwise- Parameters:
key- the key for the cache setvalue- the value to check- Returns:
- true if
valueexists in the cache set identified bykeyand false otherwise
-
existsInCache
Returns true ifvaluesis equal to the cache set identified bykeyand false otherwise- Parameters:
key- the key for the cache setvalues- the values set to check- Returns:
- true if
valuesis equal to the cache set identified bykeyand false otherwise
-
addToCache
Addsvalueto the cache set identified bykeyIf such cache set does not exist, this method will initialize it withvalueadded- Parameters:
key- the key for the cache set to add tovalue- the value to add
-
setCacheValues
Sets the cache set identified bykey- Parameters:
key- the key for the cache setvalues- the cache set
-
evictKey
Evicts the set identified by the provided key, from the cache- Parameters:
key-
-
evictValue
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)
-