ServerPlugin class

The abstract superclass of any class implementing a plugin for the analysis server.

Clients may not implement or mix-in this class, but are expected to extend it.

Constructors

ServerPlugin(ResourceProvider provider)
Initialize a newly created analysis server plugin. If a resource provider is given, then it will be used to access the file system. Otherwise a resource provider that accesses the physical file system will be used.

Properties

analysisDriverScheduler ↔ AnalysisDriverScheduler
The scheduler used by any analysis drivers that are created.
read / write
byteStore → ByteStore
Return the byte store used by any analysis drivers that are created, or null if the cache location isn't known because the 'plugin.version' request has not yet been received.
read-only
channel PluginCommunicationChannel
Return the communication channel being used to communicate with the analysis server, or null if the plugin has not been started.
read-only
contactInfo → String
Return the user visible information about how to contact the plugin authors with any problems that are found, or null if there is no contact info.
read-only
driverMap → Map<ContextRoot, AnalysisDriverGeneric>
A table mapping the current context roots to the analysis driver created for that root.
final
fileContentOverlay → FileContentOverlay
The file content overlay used by any analysis drivers that are created.
final
fileGlobsToAnalyze → List<String>
Return a list of glob patterns selecting the files that this plugin is interested in analyzing.
read-only
name → String
Return the user visible name of this plugin.
read-only
performanceLog → PerformanceLog
The performance log used by any analysis drivers that are created.
final
resourceProvider ResourceProvider
The resource provider used to access the file system.
final
sdkManager → DartSdkManager
Return the SDK manager used to manage SDKs.
read-only
subscriptionManager SubscriptionManager
The object used to manage analysis subscriptions.
final
version → String
Return the version number of this plugin, encoded as a string.
read-only
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

contentChanged(String path) → void
Handle the fact that the file with the given path has been modified.
contextRootContaining(String filePath) ContextRoot
Return the context root containing the file at the given filePath.
createAnalysisDriver(ContextRoot contextRoot) → AnalysisDriverGeneric
Create an analysis driver that can analyze the files within the given contextRoot.
driverForPath(String path) → AnalysisDriverGeneric
Return the driver being used to analyze the file with the given path.
getResolvedUnitResult(String path) → Future<ResolvedUnitResult>
Return the result of analyzing the file with the given path. [...]
getResolveResult(String path) → Future<ResolveResult>
Return the result of analyzing the file with the given path. [...]
handleAnalysisGetNavigation(AnalysisGetNavigationParams params) → Future<AnalysisGetNavigationResult>
Handle an 'analysis.getNavigation' request. [...]
handleAnalysisHandleWatchEvents(AnalysisHandleWatchEventsParams parameters) → Future<AnalysisHandleWatchEventsResult>
Handle an 'analysis.handleWatchEvents' request. [...]
handleAnalysisSetContextRoots(AnalysisSetContextRootsParams parameters) → Future<AnalysisSetContextRootsResult>
Handle an 'analysis.setContextRoots' request. [...]
handleAnalysisSetPriorityFiles(AnalysisSetPriorityFilesParams parameters) → Future<AnalysisSetPriorityFilesResult>
Handle an 'analysis.setPriorityFiles' request. [...]
handleAnalysisSetSubscriptions(AnalysisSetSubscriptionsParams parameters) → Future<AnalysisSetSubscriptionsResult>
Handle an 'analysis.setSubscriptions' request. Most subclasses should not override this method, but should instead use the subscriptionManager to access the list of subscriptions for any given file. [...]
handleAnalysisUpdateContent(AnalysisUpdateContentParams parameters) → Future<AnalysisUpdateContentResult>
Handle an 'analysis.updateContent' request. Most subclasses should not override this method, but should instead use the contentCache to access the current content of overlaid files. [...]
handleCompletionGetSuggestions(CompletionGetSuggestionsParams parameters) → Future<CompletionGetSuggestionsResult>
Handle a 'completion.getSuggestions' request. [...]
handleEditGetAssists(EditGetAssistsParams parameters) → Future<EditGetAssistsResult>
Handle an 'edit.getAssists' request. [...]
handleEditGetAvailableRefactorings(EditGetAvailableRefactoringsParams parameters) → Future<EditGetAvailableRefactoringsResult>
Handle an 'edit.getAvailableRefactorings' request. Subclasses that override this method in order to participate in refactorings must also override the method handleEditGetRefactoring. [...]
handleEditGetFixes(EditGetFixesParams parameters) → Future<EditGetFixesResult>
Handle an 'edit.getFixes' request. [...]
handleEditGetRefactoring(EditGetRefactoringParams parameters) → Future<EditGetRefactoringResult>
Handle an 'edit.getRefactoring' request. [...]
handleKytheGetKytheEntries(KytheGetKytheEntriesParams parameters) → Future<KytheGetKytheEntriesResult>
Handle a 'kythe.getKytheEntries' request. [...]
handlePluginShutdown(PluginShutdownParams parameters) → Future<PluginShutdownResult>
Handle a 'plugin.shutdown' request. Subclasses can override this method to perform any required clean-up, but cannot prevent the plugin from shutting down. [...]
handlePluginVersionCheck(PluginVersionCheckParams parameters) → Future<PluginVersionCheckResult>
Handle a 'plugin.versionCheck' request. [...]
isCompatibleWith(Version serverVersion) → bool
Return true if this plugin is compatible with an analysis server that is using the given version of the plugin API.
onDone() → void
The method that is called when the analysis server closes the communication channel. This method will not be invoked under normal conditions because the server will send a shutdown request and the plugin will stop listening to the channel before the server closes the channel.
onError(Object exception, StackTrace stackTrace) → void
The method that is called when an error has occurred in the analysis server. This method will not be invoked under normal conditions.
sendFoldingNotification(String path) → Future<void>
If the plugin provides folding information, send a folding notification for the file with the given path to the server.
sendHighlightsNotification(String path) → Future<void>
If the plugin provides highlighting information, send a highlights notification for the file with the given path to the server.
sendNavigationNotification(String path) → Future<void>
If the plugin provides navigation information, send a navigation notification for the file with the given path to the server.
sendNotificationsForFile(String path) → void
Send notifications for the services subscribed to for the file with the given path. [...]
sendNotificationsForSubscriptions(Map<String, List<AnalysisService>> subscriptions) → void
Send notifications corresponding to the given description of subscriptions. The map is keyed by the path of each file for which notifications should be sent and has values representing the list of services associated with the notifications to send. [...]
sendOccurrencesNotification(String path) → Future<void>
If the plugin provides occurrences information, send an occurrences notification for the file with the given path to the server.
sendOutlineNotification(String path) → Future<void>
If the plugin provides outline information, send an outline notification for the file with the given path to the server.
start(PluginCommunicationChannel channel) → void
Start this plugin by listening to the given communication channel.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Constants

M → const int
A megabyte.
1024 * 1024