| Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/AnalysisServer.java
|
| diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/AnalysisServer.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/AnalysisServer.java
|
| index 566cd20e79c34be5ee8385985c1b06a422b4af2c..544bfb0b0f53c9c15966a2fef378e8b08ec12426 100644
|
| --- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/AnalysisServer.java
|
| +++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/AnalysisServer.java
|
| @@ -1,15 +1,18 @@
|
| /*
|
| * Copyright (c) 2014, the Dart project authors.
|
| - *
|
| + *
|
| * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
|
| * in compliance with the License. You may obtain a copy of the License at
|
| - *
|
| + *
|
| * http://www.eclipse.org/legal/epl-v10.html
|
| - *
|
| + *
|
| * Unless required by applicable law or agreed to in writing, software distributed under the License
|
| * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
| * or implied. See the License for the specific language governing permissions and limitations under
|
| * the License.
|
| + *
|
| + * This file has been automatically generated. Please do not edit it manually.
|
| + * To regenerate the file, use the script "pkg/analysis_server/spec/generate_files".
|
| */
|
| package com.google.dart.server;
|
|
|
| @@ -19,7 +22,7 @@ import java.util.Map;
|
| /**
|
| * The interface {@code AnalysisServer} defines the behavior of objects that interface to an
|
| * analysis server.
|
| - *
|
| + *
|
| * @coverage dart.server
|
| */
|
| public interface AnalysisServer {
|
| @@ -27,318 +30,374 @@ public interface AnalysisServer {
|
| /**
|
| * Add the given listener to the list of listeners that will receive notification when new
|
| * analysis results become available.
|
| - *
|
| + *
|
| * @param listener the listener to be added
|
| */
|
| public void addAnalysisServerListener(AnalysisServerListener listener);
|
|
|
| /**
|
| - * Performs the final validation and computes a change to apply the specific refactoring. This
|
| - * method may be invoked several times, for example after changing options using
|
| - * {@link #setRefactoringExtractLocalOptions(String, boolean, String)}. When done,
|
| - * {@link #deleteRefactoring(String)} should be invoked.
|
| - *
|
| - * @param refactoringId the identifier of the refactoring to apply
|
| - * @param consumer the results listener
|
| + * {@code analysis.getErrors}
|
| + *
|
| + * Return the errors associated with the given file. If the errors for the given file have not yet
|
| + * been computed, or the most recently computed errors for the given file are out of date, then the
|
| + * response for this request will be delayed until they have been computed. If some or all of the
|
| + * errors for the file cannot be computed, then the subset of the errors that can be computed will
|
| + * be returned and the response will contain an error to indicate why the errors could not be
|
| + * computed.
|
| + *
|
| + * This request is intended to be used by clients that cannot asynchronously apply updated error
|
| + * information. Clients that can apply error information as it becomes available should use the
|
| + * information provided by the 'analysis.errors' notification.
|
| + *
|
| + * @param file The file for which errors are being requested.
|
| */
|
| - public void applyRefactoring(String refactoringId, RefactoringApplyConsumer consumer);
|
| + public void analysis_getErrors(String file, GetErrorsConsumer consumer);
|
|
|
| /**
|
| - * Create a debugging context for the executable file with the given path. The context that is
|
| - * created will persist until debug.deleteContext is used to delete it. Clients, therefore, are
|
| - * responsible for managing the lifetime of debugging contexts.
|
| - *
|
| - * @param contextRoot the path of the Dart or HTML file that will be launched
|
| - * @param consumer the results listener
|
| + * {@code analysis.getHover}
|
| + *
|
| + * Return the hover information associate with the given location. If some or all of the hover
|
| + * information is not available at the time this request is processed the information will be
|
| + * omitted from the response.
|
| + *
|
| + * @param file The file in which hover information is being requested.
|
| + * @param offset The offset for which hover information is being requested.
|
| */
|
| - public void createDebugContext(String contextRoot, DebugCreateContextConsumer consumer);
|
| + public void analysis_getHover(String file, int offset, GetHoverConsumer consumer);
|
|
|
| /**
|
| - * Create a refactoring operation that can be applied at a later time. The operation that is
|
| - * created will persist until either {@code edit.applyRefactoring} or
|
| - * {@code edit.deleteRefactoring} is used to delete it. Clients, therefore, are responsible for
|
| - * managing the lifetime of refactoring operations.
|
| - *
|
| - * @param refactoringKind the refactoring kind
|
| - * @param file the file to create refactoring within
|
| - * @param offset the offset within the file
|
| - * @param length the length of the selected code within the file
|
| - * @param consumer the results listener
|
| + * {@code analysis.reanalyze}
|
| + *
|
| + * Force the re-analysis of everything contained in the existing analysis roots. This will cause
|
| + * all previously computed analysis results to be discarded and recomputed, and will cause all
|
| + * subscribed notifications to be re-sent.
|
| */
|
| - public void createRefactoring(String refactoringKind, String file, int offset, int length,
|
| - RefactoringCreateConsumer consumer);
|
| + public void analysis_reanalyze();
|
|
|
| /**
|
| - * Delete the debugging context with the given identifier. The context id is no longer valid after
|
| - * this command. The server is allowed to re-use ids when they are no longer valid.
|
| - *
|
| - * @param contextRoot the path of the Dart or HTML file that will be launched
|
| - * @param consumer the results listener
|
| + * {@code analysis.setAnalysisRoots}
|
| + *
|
| + * Sets the root paths used to determine which files to analyze. The set of files to be analyzed
|
| + * are all of the files in one of the root paths that are not also in one of the excluded paths.
|
| + *
|
| + * Note that this request determines the set of requested analysis roots. The actual set of
|
| + * analysis roots at any given time is the intersection of this set with the set of files and
|
| + * directories actually present on the filesystem. When the filesystem changes, the actual set of
|
| + * analysis roots is automatically updated, but the set of requested analysis roots is unchanged.
|
| + * This means that if the client sets an analysis root before the root becomes visible to server in
|
| + * the filesystem, there is no error; once the server sees the root in the filesystem it will start
|
| + * analyzing it. Similarly, server will stop analyzing files that are removed from the file system
|
| + * but they will remain in the set of requested roots.
|
| + *
|
| + * If an included path represents a file, then server will look in the directory containing the
|
| + * file for a pubspec.yaml file. If none is found, then the parents of the directory will be
|
| + * searched until such a file is found or the root of the file system is reached. If such a file is
|
| + * found, it will be used to resolve package: URI’s within the file.
|
| + *
|
| + * @param included A list of the files and directories that should be analyzed.
|
| + * @param excluded A list of the files and directories within the included directories that should
|
| + * not be analyzed.
|
| */
|
| - public void deleteDebugContext(String id);
|
| + public void analysis_setAnalysisRoots(List<String> included, List<String> excluded);
|
|
|
| /**
|
| - * Delete the refactoring with the given id. Future attempts to use the refactoring id will result
|
| - * in an error being returned.
|
| - *
|
| - * @param refactoringId the identifier of the refactoring to be deleted
|
| + * {@code analysis.setPriorityFiles}
|
| + *
|
| + * Set the priority files to the files in the given list. A priority file is a file that is given
|
| + * priority when scheduling which analysis work to do first. The list typically contains those
|
| + * files that are visible to the user and those for which analysis results will have the biggest
|
| + * impact on the user experience. The order of the files within the list is significant: the first
|
| + * file will be given higher priority than the second, the second higher priority than the third,
|
| + * and so on.
|
| + *
|
| + * Note that this request determines the set of requested priority files. The actual set of
|
| + * priority files is the intersection of the requested set of priority files with the set of files
|
| + * currently subject to analysis. (See analysis.setSubscriptions for a description of files that
|
| + * are subject to analysis.)
|
| + *
|
| + * If a requested priority file is a directory it is ignored, but remains in the set of requested
|
| + * priority files so that if it later becomes a file it can be included in the set of actual
|
| + * priority files.
|
| + *
|
| + * @param files The files that are to be a priority for analysis.
|
| */
|
| - public void deleteRefactoring(String refactoringId);
|
| + public void analysis_setPriorityFiles(List<String> files);
|
|
|
| /**
|
| - * Computes the set of assists that are available at the given location. An assist is
|
| - * distinguished from a refactoring primarily by the fact that it affects a single file and does
|
| - * not require user input in order to be performed. The given consumer is invoked asynchronously
|
| - * on a different thread.
|
| - *
|
| - * @param file the file containing the range for which assists are being requested
|
| - * @param offset the offset of the code for which assists are being requested
|
| - * @param length the length of the code for which assists are being requested
|
| - * @param consumer the results listener
|
| + * {@code analysis.setSubscriptions}
|
| + *
|
| + * Subscribe for services. All previous subscriptions are replaced by the current set of
|
| + * subscriptions. If a given service is not included as a key in the map then no files will be
|
| + * subscribed to the service, exactly as if the service had been included in the map with an
|
| + * explicit empty list of files.
|
| + *
|
| + * Note that this request determines the set of requested subscriptions. The actual set of
|
| + * subscriptions at any given time is the intersection of this set with the set of files currently
|
| + * subject to analysis. The files currently subject to analysis are the set of files contained
|
| + * within an actual analysis root but not excluded, plus all of the files transitively reachable
|
| + * from those files via import, export and part directives. (See analysis.setAnalysisRoots for an
|
| + * explanation of how the actual analysis roots are determined.) When the actual analysis roots
|
| + * change, the actual set of subscriptions is automatically updated, but the set of requested
|
| + * subscriptions is unchanged.
|
| + *
|
| + * If a requested subscription is a directory it is ignored, but remains in the set of requested
|
| + * subscriptions so that if it later becomes a file it can be included in the set of actual
|
| + * subscriptions.
|
| + *
|
| + * It is an error if any of the keys in the map are not valid services. If there is an error, then
|
| + * the existing subscriptions will remain unchanged.
|
| + *
|
| + * @param subscriptions A table mapping services to a list of the files being subscribed to the
|
| + * service.
|
| */
|
| - public void getAssists(String file, int offset, int length, AssistsConsumer consumer);
|
| + public void analysis_setSubscriptions(Map<String, List<String>> subscriptions);
|
|
|
| /**
|
| - * Computes code completion id for the given position in the file. The given consumer is invoked
|
| - * asynchronously on a different thread.
|
| - *
|
| - * @param file the file containing the point at which suggestions are to be made
|
| - * @param offset the offset within the {@code source}
|
| - * @param consumer the results listener
|
| + * {@code analysis.updateContent}
|
| + *
|
| + * Update the content of one or more files. Files that were previously updated but not included in
|
| + * this update remain unchanged. This effectively represents an overlay of the filesystem. The
|
| + * files whose content is overridden are therefore seen by server as being files with the given
|
| + * content, even if the files do not exist on the filesystem or if the file path represents the
|
| + * path to a directory on the filesystem.
|
| + *
|
| + * @param files A table mapping the files whose content has changed to a description of the content
|
| + * change. Each value should be one of the following types: AddContentOverlay,
|
| + * ChangeContentOverlay, or RemoveContentOverlay.
|
| */
|
| - public void getCompletionSuggestions(String file, int offset, CompletionIdConsumer consumer);
|
| + public void analysis_updateContent(Map<String, Object> files);
|
|
|
| /**
|
| - * Return the errors associated with the given file. If the errors for the given file have not yet
|
| - * been computed, or the most recently computed errors for the given file are out of date, then
|
| - * the response for this request will be delayed until they have been computed. If some or all of
|
| - * the errors for the file cannot be computed, then the subset of the errors that can be computed
|
| - * will be returned and the response will contain an error to indicate why the errors could not be
|
| - * computed.
|
| - * <p>
|
| - * This request is intended to be used by clients that cannot asynchronously apply updated error
|
| - * information. Clients that <b>can</b> apply error information as it becomes available should use
|
| - * the information provided by the 'analysis.errors' notification.
|
| - *
|
| - * @param file the file for which errors are being requested
|
| - * @param consumer the errors consumer
|
| + * {@code analysis.updateOptions}
|
| + *
|
| + * Update the options controlling analysis based on the given set of options. Any options that are
|
| + * not included in the analysis options will not be changed. If there are options in the analysis
|
| + * options that are not valid an error will be reported but the values of the valid options will
|
| + * still be updated.
|
| + *
|
| + * @param options The options that are to be used to control analysis.
|
| */
|
| - public void getErrors(String file, AnalysisErrorsConsumer consumer);
|
| + public void analysis_updateOptions(AnalysisOptions options);
|
|
|
| /**
|
| - * Return the set of fixes that are available for the errors at a given offset in a given file.
|
| - *
|
| - * @param file the file in which hover text is being requested
|
| - * @param offset the offset in the source used to determine hover text
|
| - * @param consumer the results listener
|
| + * {@code completion.getSuggestions}
|
| + *
|
| + * Request that completion suggestions for the given offset in the given file be returned.
|
| + *
|
| + * @param file The file containing the point at which suggestions are to be made.
|
| + * @param offset The offset within the file at which suggestions are to be made.
|
| */
|
| - public void getFixes(String file, int offset, FixesConsumer consumer);
|
| + public void completion_getSuggestions(String file, int offset, GetSuggestionsConsumer consumer);
|
|
|
| /**
|
| - * Computes the hover text to be displayed at the given location. The given consumer is invoked
|
| - * asynchronously on a different thread.
|
| - *
|
| - * @param file the file in which hover text is being requested
|
| - * @param offset the offset in the source used to determine hover text
|
| - * @param consumer the results listener
|
| + * {@code debug.createContext}
|
| + *
|
| + * Create a debugging context for the executable file with the given path. The context that is
|
| + * created will persist until debug.deleteContext is used to delete it. Clients, therefore, are
|
| + * responsible for managing the lifetime of debugging contexts.
|
| + *
|
| + * @param contextRoot The path of the Dart or HTML file that will be launched.
|
| */
|
| - public void getHover(String file, int offset, HoverConsumer consumer);
|
| + public void debug_createContext(String contextRoot, CreateContextConsumer consumer);
|
|
|
| /**
|
| - * Get a list of the kinds of refactorings that are valid for the given selection in the given
|
| - * file.
|
| - *
|
| - * @param file the file containing the code on which the refactoring would be based
|
| - * @param offset the offset of the code on which the refactoring would be based
|
| - * @param length the length of the code on which the refactoring would be based
|
| - * @param consumer the results listener
|
| + * {@code debug.deleteContext}
|
| + *
|
| + * Delete the debugging context with the given identifier. The context id is no longer valid after
|
| + * this command. The server is allowed to re-use ids when they are no longer valid.
|
| + *
|
| + * @param id The identifier of the debugging context that is to be deleted.
|
| */
|
| - public void getRefactorings(String file, int offset, int length, RefactoringGetConsumer consumer);
|
| + public void debug_deleteContext(String id);
|
|
|
| /**
|
| - * Computes a type hierarchy at the given location. The given consumer is invoked asynchronously
|
| - * on a different thread.
|
| - *
|
| - * @param file the file in which hierarchy is being requested
|
| - * @param offset the offset at which hierarchy is being requested
|
| - * @param consumer the results listener
|
| + * {@code debug.mapUri}
|
| + *
|
| + * Map a URI from the debugging context to the file that it corresponds to, or map a file to the
|
| + * URI that it corresponds to in the debugging context.
|
| + *
|
| + * Exactly one of the file and uri fields must be provided.
|
| + *
|
| + * @param id The identifier of the debugging context in which the URI is to be mapped.
|
| + * @param file The path of the file to be mapped into a URI.
|
| + * @param uri The URI to be mapped into a file path.
|
| */
|
| - public void getTypeHierarchy(String file, int offset, TypeHierarchyConsumer consumer);
|
| + public void debug_mapUri(String id, String file, String uri, MapUriConsumer consumer);
|
|
|
| /**
|
| - * Return the version number of the analysis server.
|
| - *
|
| - * @param consumer the results listener
|
| + * {@code debug.setSubscriptions}
|
| + *
|
| + * Subscribe for services. All previous subscriptions are replaced by the given set of services.
|
| + *
|
| + * It is an error if any of the elements in the list are not valid services. If there is an error,
|
| + * then the current subscriptions will remain unchanged.
|
| + *
|
| + * @param subscriptions A list of the services being subscribed to.
|
| */
|
| - public void getVersion(VersionConsumer consumer);
|
| + public void debug_setSubscriptions(List<String> subscriptions);
|
|
|
| /**
|
| - * Map a URI from the debugging context to the file that it corresponds to, or map a file to the
|
| - * URI that it corresponds to in the debugging context.
|
| - * <p>
|
| - * Exactly one of the file and uri fields must be provided.
|
| - *
|
| - * @param id the identifier of the debugging context in which the URI is to be mapped
|
| - * @param file the path of the file to be mapped into a URI
|
| - * @param uri the URI to be mapped into a file path
|
| - * @param consumer the results listener
|
| + * {@code edit.getAssists}
|
| + *
|
| + * Return the set of assists that are available at the given location. An assist is distinguished
|
| + * from a refactoring primarily by the fact that it affects a single file and does not require user
|
| + * input in order to be performed.
|
| + *
|
| + * @param file The file containing the code for which assists are being requested.
|
| + * @param offset The offset of the code for which assists are being requested.
|
| + * @param length The length of the code for which assists are being requested.
|
| */
|
| - public void mapUri(String id, String file, String uri, MapUriConsumer consumer);
|
| + public void edit_getAssists(String file, int offset, int length, GetAssistsConsumer consumer);
|
|
|
| /**
|
| - * Force the re-analysis of everything contained in the existing analysis roots. This will cause
|
| - * all previously computed analysis results to be discarded and recomputed, and will cause all
|
| - * subscribed notifications to be re-sent.
|
| + * {@code edit.getAvailableRefactorings}
|
| + *
|
| + * Get a list of the kinds of refactorings that are valid for the given selection in the given
|
| + * file.
|
| + *
|
| + * @param file The file containing the code on which the refactoring would be based.
|
| + * @param offset The offset of the code on which the refactoring would be based.
|
| + * @param length The length of the code on which the refactoring would be based.
|
| */
|
| - public void reanalyze();
|
| + public void edit_getAvailableRefactorings(String file, int offset, int length, GetAvailableRefactoringsConsumer consumer);
|
|
|
| /**
|
| - * Remove the given listener from the list of listeners that will receive notification when new
|
| - * analysis results become available.
|
| - *
|
| - * @param listener the listener to be removed
|
| + * {@code edit.getFixes}
|
| + *
|
| + * Return the set of fixes that are available for the errors at a given offset in a given file.
|
| + *
|
| + * @param file The file containing the errors for which fixes are being requested.
|
| + * @param offset The offset used to select the errors for which fixes will be returned.
|
| */
|
| - public void removeAnalysisServerListener(AnalysisServerListener listener);
|
| + public void edit_getFixes(String file, int offset, GetFixesConsumer consumer);
|
|
|
| /**
|
| - * Searches for declarations of class members with the given name. The given consumer is invoked
|
| - * asynchronously on a different thread.
|
| - *
|
| - * @param name the name of a member
|
| - * @param consumer the search id consumer
|
| + * {@code edit.getRefactoring}
|
| + *
|
| + * Get the changes required to perform a refactoring.
|
| + *
|
| + * @param kindId The identifier of the kind of refactoring to be performed.
|
| + * @param file The file containing the code involved in the refactoring.
|
| + * @param offset The offset of the region involved in the refactoring.
|
| + * @param length The length of the region involved in the refactoring.
|
| + * @param validateOnly True if the client is only requesting that the values of the options be
|
| + * validated and no change be generated.
|
| + * @param options Data used to provide values provided by the user. The structure of the data is
|
| + * dependent on the kind of refactoring being performed. The data that is expected is
|
| + * documented in the section titled Refactorings, labeled as “Options”. This field can be
|
| + * omitted if the refactoring does not require any options or if the values of those
|
| + * options are not known.
|
| */
|
| - public void searchClassMemberDeclarations(String name, SearchIdConsumer consumer);
|
| + public void edit_getRefactoring(String kindId, String file, int offset, int length, boolean validateOnly, Object options, GetRefactoringConsumer consumer);
|
|
|
| /**
|
| - * Searches for resolved and unresolved references to class members with the given name. The given
|
| - * consumer is invoked asynchronously on a different thread.
|
| - *
|
| - * @param name the name of a member
|
| - * @param consumer the search id consumer
|
| + * Remove the given listener from the list of listeners that will receive notification when new
|
| + * analysis results become available.
|
| + *
|
| + * @param listener the listener to be removed
|
| */
|
| - public void searchClassMemberReferences(String name, SearchIdConsumer consumer);
|
| + public void removeAnalysisServerListener(AnalysisServerListener listener);
|
|
|
| /**
|
| + * {@code search.findElementReferences}
|
| + *
|
| * Perform a search for references to the element defined or referenced at the given offset in the
|
| * given file.
|
| - * <p>
|
| - * If the element is a class member, then also references to all corresponding members in the
|
| - * class hierarchy are searched.
|
| - * <p>
|
| - * If the element is a class member and {@code includePotential} is {@code true}, then potential
|
| - * references should also be reported.
|
| - * <p>
|
| - * The given consumer is invoked asynchronously on a different thread.
|
| - *
|
| - * @param file the file containing the declaration of or a reference to the element used to define
|
| - * the search
|
| - * @param offset the offset within the file of the declaration of or reference to the element
|
| - * @param includePotential is {@code true} if potential matches are to be included in the results
|
| - * @param consumer the search id consumer
|
| - */
|
| - public void searchElementReferences(String file, int offset, boolean includePotential,
|
| - SearchIdConsumer consumer);
|
| -
|
| - /**
|
| - * Searches the given context for declarations of top-level elements with names matching the given
|
| - * pattern. The given consumer is invoked asynchronously on a different thread.
|
| - *
|
| - * @param pattern the regular expression to match names against, not {@code null}
|
| - * @param consumer the search id consumer
|
| + *
|
| + * An identifier is returned immediately, and individual results will be returned via the
|
| + * search.results notification as they become available.
|
| + *
|
| + * @param file The file containing the declaration of or reference to the element used to define
|
| + * the search.
|
| + * @param offset The offset within the file of the declaration of or reference to the element.
|
| + * @param includePotential True if potential matches are to be included in the results.
|
| */
|
| - public void searchTopLevelDeclarations(String pattern, SearchIdConsumer consumer);
|
| + public void search_findElementReferences(String file, int offset, boolean includePotential, FindElementReferencesConsumer consumer);
|
|
|
| /**
|
| - * Sets the root paths used to determine which files to analyze. The set of files to be analyzed
|
| - * are all of the files in one of the included paths that are not also in one of the excluded
|
| - * paths.
|
| - *
|
| - * @param includedPaths a list of the files and directories that should be analyzed
|
| - * @param excludedPaths a list of the files and directories within the included directories that
|
| - * should <em>not</em> be analyzed
|
| + * {@code search.findMemberDeclarations}
|
| + *
|
| + * Perform a search for declarations of members whose name is equal to the given name.
|
| + *
|
| + * An identifier is returned immediately, and individual results will be returned via the
|
| + * search.results notification as they become available.
|
| + *
|
| + * @param name The name of the declarations to be found.
|
| */
|
| - public void setAnalysisRoots(List<String> includedPaths, List<String> excludedPaths);
|
| + public void search_findMemberDeclarations(String name, FindMemberDeclarationsConsumer consumer);
|
|
|
| /**
|
| - * Subscribe for services. All previous subscriptions are replaced by the current set of
|
| - * subscriptions. If a given service is not included as a key in the map then no files will be
|
| - * subscribed to the service, exactly as if the service had been included in the map with an
|
| - * explicit empty list of files.
|
| - *
|
| - * @param subscriptions a list of the services being subscribed to.
|
| + * {@code search.findMemberReferences}
|
| + *
|
| + * Perform a search for references to members whose name is equal to the given name. This search
|
| + * does not check to see that there is a member defined with the given name, so it is able to find
|
| + * references to undefined members as well.
|
| + *
|
| + * An identifier is returned immediately, and individual results will be returned via the
|
| + * search.results notification as they become available.
|
| + *
|
| + * @param name The name of the references to be found.
|
| */
|
| - public void setAnalysisSubscriptions(Map<AnalysisService, List<String>> subscriptions);
|
| + public void search_findMemberReferences(String name, FindMemberReferencesConsumer consumer);
|
|
|
| /**
|
| - * Subscribe for services. All previous subscriptions are replaced by the given set of services.
|
| - * <p>
|
| - * It is an error if any of the elements in the list are not valid services. If there is an error,
|
| - * then the current subscriptions will remain unchanged.
|
| - *
|
| - * @param services a list of the services being subscribed to
|
| + * {@code search.findTopLevelDeclarations}
|
| + *
|
| + * Perform a search for declarations of top-level elements (classes, typedefs, getters, setters,
|
| + * functions and fields) whose name matches the given pattern.
|
| + *
|
| + * An identifier is returned immediately, and individual results will be returned via the
|
| + * search.results notification as they become available.
|
| + *
|
| + * @param pattern The regular expression used to match the names of the declarations to be found.
|
| */
|
| - public void setDebugSubscriptions(List<DebugService> services);
|
| + public void search_findTopLevelDeclarations(String pattern, FindTopLevelDeclarationsConsumer consumer);
|
|
|
| /**
|
| - * Set the priority files to the files in the given list. A priority file is a file that is given
|
| - * priority when scheduling which analysis work to do first. The list typically contains those
|
| - * files that are visible to the user and those for which analysis results will have the biggest
|
| - * impact on the user experience.
|
| - *
|
| - * @param files the files that are to be a priority for analysis
|
| + * {@code search.getTypeHierarchy}
|
| + *
|
| + * Return the type hierarchy of the class declared or referenced at the given location.
|
| + *
|
| + * @param file The file containing the declaration or reference to the type for which a hierarchy
|
| + * is being requested.
|
| + * @param offset The offset of the name of the type within the file.
|
| */
|
| - public void setPriorityFiles(List<String> files);
|
| + public void search_getTypeHierarchy(String file, int offset, GetTypeHierarchyConsumer consumer);
|
|
|
| /**
|
| - * Set the options for a refactoring operation. Clients are required to set the options before the
|
| - * refactoring is applied if the refactoring has options. Clients are allowed to set the options
|
| - * multiple times in order to allow users to fix any problems that might prevent the refactoring
|
| - * from completing.
|
| - *
|
| - * @param refactoringId the identifier of the refactoring whose options are to be set
|
| - * @param refactoringOptions options for this refactoring kind
|
| - * @param consumer the results listener
|
| + * {@code server.getVersion}
|
| + *
|
| + * Return the version number of the analysis server.
|
| */
|
| - public void setRefactoringOptions(String refactoringId, Map<String, Object> refactoringOptions,
|
| - RefactoringSetOptionsConsumer consumer);
|
| + public void server_getVersion(GetVersionConsumer consumer);
|
|
|
| /**
|
| - * Subscribe for server services.
|
| - * <p>
|
| - * All previous subscriptions are replaced by the given set of subscriptions.
|
| - *
|
| - * @param subscriptions a list of the services being subscribed to.
|
| + * {@code server.setSubscriptions}
|
| + *
|
| + * Subscribe for services. All previous subscriptions are replaced by the given set of services.
|
| + *
|
| + * It is an error if any of the elements in the list are not valid services. If there is an error,
|
| + * then the current subscriptions will remain unchanged.
|
| + *
|
| + * @param subscriptions A list of the services being subscribed to.
|
| */
|
| - public void setServerSubscriptions(List<ServerService> subscriptions);
|
| + public void server_setSubscriptions(List<String> subscriptions);
|
|
|
| /**
|
| - * Cleanly shutdown the analysis server.
|
| + * {@code server.shutdown}
|
| + *
|
| + * Cleanly shutdown the analysis server. Requests that are received after this request will not be
|
| + * processed. Requests that were received before this request, but for which a response has not yet
|
| + * been sent, will not be responded to. No further responses or notifications will be sent after
|
| + * the response to this request has been sent.
|
| */
|
| - public void shutdown();
|
| + public void server_shutdown();
|
|
|
| /**
|
| * Start the analysis server.
|
| - *
|
| + *
|
| * @param millisToRestart the number of milliseconds to wait for an unresponsive server before
|
| * restarting it, or zero if the server should not be restarted.
|
| */
|
| public void start(long millisToRestart) throws Exception;
|
| -
|
| - /**
|
| - * Update the options controlling analysis based on the given set of options. Any options that are
|
| - * {@code null} will not be changed. If there are options that are not valid an error will be
|
| - * reported but the values of the valid options will still be updated.
|
| - *
|
| - * @param options the options that are to control analysis
|
| - */
|
| - public void updateAnalysisOptions(AnalysisOptions options);
|
| -
|
| - /**
|
| - * Update the content of one or more files. Files that were previously updated but not included in
|
| - * this update remain unchanged.
|
| - *
|
| - * @param files a table mapping the files whose content has changed to a description of the
|
| - * content
|
| - */
|
| - public void updateContent(Map<String, ContentChange> files);
|
| }
|
|
|