Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Side by Side Diff: pkg/analysis_server/lib/src/generated_protocol.dart

Issue 684183002: Refactor CompletionSuggestionKind (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/lib/src/protocol_server.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // This file has been automatically generated. Please do not edit it manually. 5 // This file has been automatically generated. Please do not edit it manually.
6 // To regenerate the file, use the script 6 // To regenerate the file, use the script
7 // "pkg/analysis_server/tool/spec/generate_files". 7 // "pkg/analysis_server/tool/spec/generate_files".
8 8
9 part of protocol; 9 part of protocol;
10 /** 10 /**
(...skipping 5543 matching lines...) Expand 10 before | Expand all | Expand 10 after
5554 hash = _JenkinsSmiHash.combine(hash, parameterType.hashCode); 5554 hash = _JenkinsSmiHash.combine(hash, parameterType.hashCode);
5555 return _JenkinsSmiHash.finish(hash); 5555 return _JenkinsSmiHash.finish(hash);
5556 } 5556 }
5557 } 5557 }
5558 5558
5559 /** 5559 /**
5560 * CompletionSuggestionKind 5560 * CompletionSuggestionKind
5561 * 5561 *
5562 * enum { 5562 * enum {
5563 * ARGUMENT_LIST 5563 * ARGUMENT_LIST
5564 * CLASS
5565 * CLASS_ALIAS
5566 * CONSTRUCTOR
5567 * FIELD
5568 * FUNCTION
5569 * FUNCTION_TYPE_ALIAS
5570 * GETTER
5571 * IMPORT 5564 * IMPORT
5565 * IDENTIFIER
5566 * INVOCATION
5572 * KEYWORD 5567 * KEYWORD
5573 * LABEL
5574 * LIBRARY_PREFIX
5575 * LOCAL_VARIABLE
5576 * METHOD
5577 * METHOD_NAME
5578 * NAMED_ARGUMENT 5568 * NAMED_ARGUMENT
5579 * OPTIONAL_ARGUMENT 5569 * OPTIONAL_ARGUMENT
5580 * PARAMETER 5570 * PARAMETER
5581 * SETTER
5582 * TOP_LEVEL_VARIABLE
5583 * TYPE_PARAMETER
5584 * } 5571 * }
5585 */ 5572 */
5586 class CompletionSuggestionKind implements Enum { 5573 class CompletionSuggestionKind implements Enum {
5587 static const ARGUMENT_LIST = const CompletionSuggestionKind._("ARGUMENT_LIST") ; 5574 static const ARGUMENT_LIST = const CompletionSuggestionKind._("ARGUMENT_LIST") ;
5588 5575
5589 static const CLASS = const CompletionSuggestionKind._("CLASS");
5590
5591 static const CLASS_ALIAS = const CompletionSuggestionKind._("CLASS_ALIAS");
5592
5593 static const CONSTRUCTOR = const CompletionSuggestionKind._("CONSTRUCTOR");
5594
5595 static const FIELD = const CompletionSuggestionKind._("FIELD");
5596
5597 static const FUNCTION = const CompletionSuggestionKind._("FUNCTION");
5598
5599 static const FUNCTION_TYPE_ALIAS = const CompletionSuggestionKind._("FUNCTION_ TYPE_ALIAS");
5600
5601 static const GETTER = const CompletionSuggestionKind._("GETTER");
5602
5603 static const IMPORT = const CompletionSuggestionKind._("IMPORT"); 5576 static const IMPORT = const CompletionSuggestionKind._("IMPORT");
5604 5577
5578 /**
5579 * The element identifier should be inserted at the completion location. For
5580 * example "someMethod" in import 'myLib.dart' show someMethod; . For
5581 * suggestions of this kind, the element attribute is defined and the
5582 * completion field is the element's identifier.
5583 */
5584 static const IDENTIFIER = const CompletionSuggestionKind._("IDENTIFIER");
5585
5586 /**
5587 * The element is being invoked at the completion location. For example,
5588 * "someMethod" in x.someMethod(); . For suggestions of this kind, the
5589 * element attribute is defined and the completion field is the element's
5590 * identifier.
5591 */
5592 static const INVOCATION = const CompletionSuggestionKind._("INVOCATION");
5593
5594 /**
5595 * A keyword is being suggested. For suggestions of this kind, the completion
5596 * is the keyword.
5597 */
5605 static const KEYWORD = const CompletionSuggestionKind._("KEYWORD"); 5598 static const KEYWORD = const CompletionSuggestionKind._("KEYWORD");
5606 5599
5607 static const LABEL = const CompletionSuggestionKind._("LABEL");
5608
5609 static const LIBRARY_PREFIX = const CompletionSuggestionKind._("LIBRARY_PREFIX ");
5610
5611 static const LOCAL_VARIABLE = const CompletionSuggestionKind._("LOCAL_VARIABLE ");
5612
5613 static const METHOD = const CompletionSuggestionKind._("METHOD");
5614
5615 static const METHOD_NAME = const CompletionSuggestionKind._("METHOD_NAME");
5616
5617 static const NAMED_ARGUMENT = const CompletionSuggestionKind._("NAMED_ARGUMENT "); 5600 static const NAMED_ARGUMENT = const CompletionSuggestionKind._("NAMED_ARGUMENT ");
5618 5601
5619 static const OPTIONAL_ARGUMENT = const CompletionSuggestionKind._("OPTIONAL_AR GUMENT"); 5602 static const OPTIONAL_ARGUMENT = const CompletionSuggestionKind._("OPTIONAL_AR GUMENT");
5620 5603
5621 static const PARAMETER = const CompletionSuggestionKind._("PARAMETER"); 5604 static const PARAMETER = const CompletionSuggestionKind._("PARAMETER");
5622 5605
5623 static const SETTER = const CompletionSuggestionKind._("SETTER");
5624
5625 static const TOP_LEVEL_VARIABLE = const CompletionSuggestionKind._("TOP_LEVEL_ VARIABLE");
5626
5627 static const TYPE_PARAMETER = const CompletionSuggestionKind._("TYPE_PARAMETER ");
5628
5629 final String name; 5606 final String name;
5630 5607
5631 const CompletionSuggestionKind._(this.name); 5608 const CompletionSuggestionKind._(this.name);
5632 5609
5633 factory CompletionSuggestionKind(String name) { 5610 factory CompletionSuggestionKind(String name) {
5634 switch (name) { 5611 switch (name) {
5635 case "ARGUMENT_LIST": 5612 case "ARGUMENT_LIST":
5636 return ARGUMENT_LIST; 5613 return ARGUMENT_LIST;
5637 case "CLASS":
5638 return CLASS;
5639 case "CLASS_ALIAS":
5640 return CLASS_ALIAS;
5641 case "CONSTRUCTOR":
5642 return CONSTRUCTOR;
5643 case "FIELD":
5644 return FIELD;
5645 case "FUNCTION":
5646 return FUNCTION;
5647 case "FUNCTION_TYPE_ALIAS":
5648 return FUNCTION_TYPE_ALIAS;
5649 case "GETTER":
5650 return GETTER;
5651 case "IMPORT": 5614 case "IMPORT":
5652 return IMPORT; 5615 return IMPORT;
5616 case "IDENTIFIER":
5617 return IDENTIFIER;
5618 case "INVOCATION":
5619 return INVOCATION;
5653 case "KEYWORD": 5620 case "KEYWORD":
5654 return KEYWORD; 5621 return KEYWORD;
5655 case "LABEL":
5656 return LABEL;
5657 case "LIBRARY_PREFIX":
5658 return LIBRARY_PREFIX;
5659 case "LOCAL_VARIABLE":
5660 return LOCAL_VARIABLE;
5661 case "METHOD":
5662 return METHOD;
5663 case "METHOD_NAME":
5664 return METHOD_NAME;
5665 case "NAMED_ARGUMENT": 5622 case "NAMED_ARGUMENT":
5666 return NAMED_ARGUMENT; 5623 return NAMED_ARGUMENT;
5667 case "OPTIONAL_ARGUMENT": 5624 case "OPTIONAL_ARGUMENT":
5668 return OPTIONAL_ARGUMENT; 5625 return OPTIONAL_ARGUMENT;
5669 case "PARAMETER": 5626 case "PARAMETER":
5670 return PARAMETER; 5627 return PARAMETER;
5671 case "SETTER":
5672 return SETTER;
5673 case "TOP_LEVEL_VARIABLE":
5674 return TOP_LEVEL_VARIABLE;
5675 case "TYPE_PARAMETER":
5676 return TYPE_PARAMETER;
5677 } 5628 }
5678 throw new Exception('Illegal enum value: $name'); 5629 throw new Exception('Illegal enum value: $name');
5679 } 5630 }
5680 5631
5681 factory CompletionSuggestionKind.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) { 5632 factory CompletionSuggestionKind.fromJson(JsonDecoder jsonDecoder, String json Path, Object json) {
5682 if (json is String) { 5633 if (json is String) {
5683 try { 5634 try {
5684 return new CompletionSuggestionKind(json); 5635 return new CompletionSuggestionKind(json);
5685 } catch(_) { 5636 } catch(_) {
5686 // Fall through 5637 // Fall through
(...skipping 4583 matching lines...) Expand 10 before | Expand all | Expand 10 after
10270 return false; 10221 return false;
10271 } 10222 }
10272 10223
10273 @override 10224 @override
10274 int get hashCode { 10225 int get hashCode {
10275 int hash = 0; 10226 int hash = 0;
10276 hash = _JenkinsSmiHash.combine(hash, newName.hashCode); 10227 hash = _JenkinsSmiHash.combine(hash, newName.hashCode);
10277 return _JenkinsSmiHash.finish(hash); 10228 return _JenkinsSmiHash.finish(hash);
10278 } 10229 }
10279 } 10230 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/doc/api.html ('k') | pkg/analysis_server/lib/src/protocol_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698