jwren@google.com
fcd28b2eee
Fixes for comments in CL 474193003
...
isIsCondition() now generates to isCondition()
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//493363007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39620 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-27 21:22:44 +00:00
paulberry@google.com
f556420f97
Rename some bools in the analysis server API.
...
R=brianwilkerson@google.com , jwren@google.com
Review URL: https://codereview.chromium.org//508203002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39604 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-27 16:39:49 +00:00
paulberry@google.com
0c0fd777a6
Finish modifying analysis server to make use of code generation.
...
Generated code is used to produce the response to these requests:
- analysis.updateOptions
- analysis.updateContent
- analysis.setSubscriptions
- analysis.setPriorityFiles
- analysis.setAnalysisRoots
- server.shutdown
- server.setSubscriptions
Generated code is used to produce these requests:
- server.shutdown
- server.getVersion
- server.shutdown
- server.connected
Generated code is used to produce these notifications:
- completion.results
- analysis.overrides
- analysis.outline
- analysis.occurrences
Generated code is used to decode these notifications:
- server.status
In addition, some dead code was removed, the 'protocol.dart' and
'protocol2.dart' files were combined, and the fields Response.result,
Request.params, and Notification.params were made private (to
encourage future use of the generated code). Also, some overly
verbose import statements were cleaned up by using "hide" rather than
"show".
R=danrubel@google.com
Review URL: https://codereview.chromium.org//506433002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39516 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-25 10:48:16 +00:00
jwren@google.com
de778f35a3
Generate hashcode on the java types.
...
R=brianwilkerson@google.com , paulberry@google.com
Review URL: https://codereview.chromium.org//498593003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39513 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-24 18:40:39 +00:00
jwren@google.com
9f2e374200
Make more use of generated code in Java analysis server.
...
These request/responses are now up to date with the spec:
- server.status
- analysis.setSubscriptions
- analysis.updateContent
- analysis.flushResults
- analysis.highlights
- analysis.navigation
- analysis.overrides
Type generation was updated so getters of boolean types would be isX instead of getX
HighlightRegion, NavigationRegion and Outline now have the method containsInclusive generated.
Occurrences now has the additional method contains(int) generated.
AddContentOverlay, ChangeContentOverlay and RemoveContentOverlay no longer take a String type as an input to the type.
Removal of many non-generated types defined in spec.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//474193003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39512 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-24 12:11:02 +00:00
paulberry@google.com
e18327f317
Make more use of generated code in analysis server.
...
The following generated classes are now used:
- CompletionRelevance
- CompletionSuggestion
- CompletionSuggestionKind
- ErrorFixes
- HighlightRegion
- HighlightRegionType
- HoverInformation
- LinkedEditGroup
- LinkedEditSuggestion
- LinkedEditSuggestionKind
- SourceChange
Generated code is used to produce these notifications:
- analysis.errors
- analysis.highlights
- analysis.navigation
- search.results
- server.error
- server.status
Generated code is used to produce the response to these requests:
- analysis.getErrors
- analysis.getHover
- edit.getAssists
- edit.getFixes
- server.getVersion
Generated code is used to handle these notifications in unit testing:
- analysis.highlights
- analysis.navigation
In addition, these methods have been removed, since they are no longer
needed:
- Notification.getParameter
- Result.setEmptyResult
- Result.setResult
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//497393002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39511 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-24 08:39:41 +00:00
paulberry@google.com
665da3d948
Make certain generated constructor parameters optional.
...
The following constructor parameters are optional as a convenience to
callers. They default to empty lists:
- SourceFileEdit.edits
- TypeHierarchyItem.interfaces
- TypeHierarchyItem.mixins
- TypeHierarchyItem.subclasses
R=scheglov@google.com
Review URL: https://codereview.chromium.org//499073002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39510 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-23 23:56:24 +00:00
paulberry@google.com
3e65f940a6
Improve error reporting in analysis server code generation.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//499693002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39508 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-23 18:06:30 +00:00
paulberry@google.com
10fdb7677a
Change analysis server protocol to omit empty lists when optional.
...
For object fields of type List that are marked as optional, FromJson
code automatically populates the data structure with an empty list
when the field is omitted. ToJson code automatically omits the field
when its value is an empty list.
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//482573004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39507 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-23 18:03:34 +00:00
scheglov@google.com
39a38da0e7
Move Location factories and RefactoringProblemSeverity.max into the generated classes.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//462403005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39499 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-22 17:27:19 +00:00
scheglov@google.com
71d70c2de3
Rename 'getRefactoring.return.status' to 'problems'.
...
It is a list, and we name lists with plurals.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//495273002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39495 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-22 14:47:30 +00:00
jwren@google.com
8da909345e
Initial factory constructors for generated objects in Java server.
...
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//488413003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39481 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-22 03:33:08 +00:00
scheglov@google.com
436a6b725b
Make RefactoringProblem.location optional.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//496113002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39476 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 21:44:08 +00:00
scheglov@google.com
47b813e4ec
Rename 'kindId' to 'kind' in 'edit.getRefactoring'.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//473763003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39474 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 20:57:14 +00:00
paulberry@google.com
caf0592503
Make more use of generated code in analysis server.
...
The following generated classes are now used:
- Element
- Location
- Occurrences
- Outline
- OverriddenMember
- Override
- Position
- SearchResult
- SearchResultKind
- SourceFileEdit
- TypeHierarchyItem
Generated code is used to produce the responses to these requests:
- completion.getSuggestions
- search.findElementReferences
- search.findMemberDeclarations
- search.findMemberReferences
- search.findTopLevelDeclarations
- search.getTypeHierarchy
Generated code is used to handle these notifications in unit testing:
- analysis.navigation
- analysis.occurrences
- analysis.outline
- analysis.overrides
- search.results
In addition, we no longer bother to test the JSON conversion code on
AnalysisError, since it is code generated.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//479683005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39470 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 20:04:06 +00:00
paulberry@google.com
1fed61127e
Introduce convenience methods into generated analysis server classes.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//492243002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39453 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 15:49:35 +00:00
jwren@google.com
2c2419eddf
Generate a toJson method onto our generated types, int is now represented as the wrapped Integer in class
...
R=brianwilkerson@google.com , paulberry@google.com
Review URL: https://codereview.chromium.org//485213004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39428 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-20 20:53:40 +00:00
paulberry@google.com
e4a9df7b12
Don't use "final" in analysis server protocol classes.
...
Doing so makes it harder to use these classes because we sometimes don't have
complete information about an object at the time we need to create it.
R=jwren@google.com
Review URL: https://codereview.chromium.org//495623002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39420 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-20 18:53:26 +00:00
paulberry@google.com
721b435ba6
Add SearchResultKind.UNKNOWN to the analysis server API.
...
This resolves an inconsistency between the spec and the analysis
server behavior: the server returns a SearchResultKind of UNKNOWN if
the MatchKind from the analysis engine is one of the following types:
- ANGULAR_REFERENCE
- ANGULAR_CLOSING_TAG_REFERENCE
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//488103003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39411 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-20 15:32:39 +00:00
paulberry@google.com
c5ff06636b
Make more use of generated classes in analysis server.
...
Generated code is now used to process input JSON, and to create
requests and process responses in unit tests. In addition, the
handwritten classes for ElementKind and SourceEdit have been replaced
with the gennerated versions.
Also some dead code has been removed.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//492563002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39404 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-20 12:39:31 +00:00
paulberry@google.com
344ff2c03b
Make search.findElementReferences.result.element field optional.
...
This resolves an inconsistency between the spec and the analysis
server behavior: the server doesn't populete the "element" field if no
element could be found.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//484313002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39388 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 21:56:29 +00:00
paulberry@google.com
a54eafb037
Allow null as a synonym for {} when decoding JSON objects.
...
The spec allows this (for interoprability with Lisp-based clients),
and we had been doing it correctly for lists and maps, but not for
arbitrary objects.
R=jwren@google.com
Review URL: https://codereview.chromium.org//483613006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39382 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 21:13:31 +00:00
paulberry@google.com
570b2f115e
Change analysis.updateOptions to use generated classes.
...
Note that there is a small change in behavior: unrecognized options
are now silently ignored; they no longer generate an error.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//492483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39380 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 19:57:43 +00:00
paulberry@google.com
81e274fccb
Analysis server code generation improvements
...
- Make generated code implement the HasToJson interface.
- Add toRequest() convenience methods to classes representing request
parameters.
- Fix toJson() for objects containing lists (forgot to call toList()).
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//483393002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39375 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 18:26:42 +00:00
paulberry@google.com
64b53a4b5c
Code generate Dart classes representing the analysis server API.
...
These classes support:
- Conversion to JSON
- Conversion from JSON, with error handling via the Request object.
- operator== and hashCode
In addition, convenience functions are generated which extract and
convert the variant contents of a Request, Response, Notification,
EditGetRefactoringResult, or EditGetRefactoringParams once the type is
known.
The generated code is not yet used; it will be used by future CL's.
R=brianwilkerson@google.com , danrubel@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//479043002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39361 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 23:44:05 +00:00
jwren@google.com
164902b8ae
Change type boolean to Boolean in Java generated code
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//484833003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39358 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 22:08:27 +00:00
jwren@google.com
9c900edd7e
Ignore hidden files in implementation of GeneratedDirectory.check()
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//469253006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39353 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 21:06:44 +00:00
jwren@google.com
ebf9caabfc
Add additional flag methods and fields onto the generated Element type.
...
R=brianwilkerson@google.com , paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//482833002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39342 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-18 18:12:48 +00:00
brianwilkerson@google.com
54edbcc686
Support potential edits
...
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//472373002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39309 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-15 18:51:16 +00:00
paulberry@google.com
4ab9bde919
Add an integration test for analysis.overrides.
...
Also remove the note from the API documentation saying that
analysis.overrides only works for overrides of a superclass.
Interface overrides work too.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//476163002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39302 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-15 16:56:45 +00:00
danrubel@google.com
fa2f2ec46d
add keyword suggestions
...
BUG=
R=brianwilkerson@google.com , paulberry@google.com
Review URL: https://codereview.chromium.org//461063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39284 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-15 03:37:01 +00:00
paulberry@google.com
d2f6dddc57
Fix code generated matchers to handle recursive objects.
...
This requires using a wrapper that creating the matchers lazily (when
they're first used), so that a matcher can refer to itself without
causing a circularity during initialization.
R=jwren@google.com
Review URL: https://codereview.chromium.org//475143003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39274 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 22:45:01 +00:00
paulberry@google.com
c38a23704c
Write an integration test for analysis.navigation notification.
...
Also, add the missing ElementKind "PARAMETER", and sort the
ElementKinds.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//468233003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39267 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 21:06:50 +00:00
jwren@google.com
7540279401
Nit fixes in codegen_java_types.dart to clean up nits in generated code.
...
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//473793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39262 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 18:43:28 +00:00
jwren@google.com
6eb410fe93
Fixed TODOs/bugs in codegen_tools.dart for code generation of a directory.
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//476623002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39258 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 18:15:06 +00:00
paulberry@google.com
2e9c206530
Output javadoc for enumerated values; suppress empty javadoc.
...
R=jwren@google.com
Review URL: https://codereview.chromium.org//473733003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39254 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 16:56:58 +00:00
scheglov@google.com
8bbd86fd11
Proposal for RefactoringMethodParameter.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//470723003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39253 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 16:46:55 +00:00
jwren@google.com
53889222d5
Generate public static EMPTY_ARRAY fields for each object.
...
Order the fields by the ordering in the spec instead of alphabetically.
R=paulberry@google.com
Review URL: https://codereview.chromium.org//475673002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39243 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 06:21:44 +00:00
jwren@google.com
a75c2b7458
Pub buildbot fix, TBR- Paul
...
Review URL: https://codereview.chromium.org//474883002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39241 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 05:32:18 +00:00
jwren@google.com
20ed9dd253
Initial cut at having the enum objects from the spec generated as classes with public static strings.
...
Type/enum aren't being generated yet.
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//462253005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39240 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 05:22:55 +00:00
jwren@google.com
7c370bf74c
Initial code to generate the Java types from the spec. A constructor, the fields, getters, toString, and equals are all implemented. hashCode is not yet generated for each class.
...
This doesn't do anything with enum types.
The main source is in codegen_java_types.dart
The types are not yet used in the Java server.
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//473533003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39228 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-13 22:37:17 +00:00
paulberry@google.com
17a5250955
Document the fact that client must filter results from completion.results.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//474583002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39220 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-13 20:36:55 +00:00
paulberry@google.com
96d5bd1bf0
Add union types to the analysis server API spec.
...
R=brianwilkerson@google.com , jwren@google.com
Review URL: https://codereview.chromium.org//469673002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39208 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-13 17:38:11 +00:00
paulberry@google.com
d03c364236
Add a test to verify that analysis server code generation is up to date.
...
This test will run on the Windows, Linux, and MacOS buildbots, so it
should help ensure that code generation works properly on all of those
platforms.
R=jwren@google.com
Review URL: https://codereview.chromium.org//469543002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39201 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-13 15:29:04 +00:00
brianwilkerson@google.com
7ab0a914ba
Improve spec style and minor changes
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//461283002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39199 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-13 14:46:56 +00:00
jwren@google.com
a6dd18a2d7
Cleanup in CodegenJavaVisitor.javaType(...), no functional change.
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//452313004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39166 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 21:35:46 +00:00
jwren@google.com
b685fa31ee
Get the RemoteAnalysisServer to compile against the new generated AnalysisServer interface.
...
This disables any and all functionality that is not up to date with the current server spec.
R=brianwilkerson@google.com , paulberry@google.com
Review URL: https://codereview.chromium.org//460423003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39164 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 21:14:24 +00:00
paulberry@google.com
5731ca607a
Use hanging indentation when code generating Javadoc @params.
...
R=jwren@google.com
Review URL: https://codereview.chromium.org//468563003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39160 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 19:52:54 +00:00
jwren@google.com
6e66a26763
Initial cut at generating the AnalysisServer.java interface. Currently this generates a commented out interface as the java server is not up to date with the spec.
...
This work iterates on the work that Paul started.
R=brianwilkerson@google.com , paulberry@google.com
Review URL: https://codereview.chromium.org//463163002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39155 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 18:33:59 +00:00
paulberry@google.com
153e73e155
Add an integration test for analysis.highlights.
...
Also fix sort order in the API definition of HighlightRegionType.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//463643002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39152 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 18:16:37 +00:00