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

Unified Diff: pkg/docgen/lib/src/models/variable.dart

Issue 1364553002: remove docgen source and targets from build (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: remove scripts Created 5 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/docgen/lib/src/models/typedef.dart ('k') | pkg/docgen/lib/src/package_helpers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/lib/src/models/variable.dart
diff --git a/pkg/docgen/lib/src/models/variable.dart b/pkg/docgen/lib/src/models/variable.dart
deleted file mode 100644
index b4b83ac7bd4f641895fb9a670a3cd1aa51eb5de9..0000000000000000000000000000000000000000
--- a/pkg/docgen/lib/src/models/variable.dart
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library docgen.models.variable;
-
-import '../exports/source_mirrors.dart';
-
-import '../library_helpers.dart';
-
-import 'class.dart';
-import 'doc_gen_type.dart';
-import 'dummy_mirror.dart';
-import 'indexable.dart';
-import 'owned_indexable.dart';
-
-
-/// A class containing properties of a Dart variable.
-class Variable extends OwnedIndexable<VariableMirror> {
- final bool isFinal;
- final bool isStatic;
- final bool isConst;
- final DocGenType type;
- final String name;
-
- factory Variable(String name, VariableMirror mirror, Indexable owner) {
- var variable = getDocgenObject(mirror, owner);
- if (variable is DummyMirror) {
- return new Variable._(name, mirror, owner);
- }
- return variable;
- }
-
- Variable._(this.name, VariableMirror mirror, Indexable owner)
- : isFinal = mirror.isFinal,
- isStatic = mirror.isStatic,
- isConst = mirror.isConst,
- type = new DocGenType(mirror.type, owner.owningLibrary),
- super(mirror, owner);
-
- /// Generates a map describing the [Variable] object.
- Map toMap() => {
- 'name': name,
- 'qualifiedName': qualifiedName,
- 'comment': comment,
- 'final': isFinal,
- 'static': isStatic,
- 'constant': isConst,
- 'type': new List.filled(1, type.toMap()),
- 'annotations': annotations.map((a) => a.toMap()).toList()
- };
-
- String get typeName => 'property';
-
- String get comment {
- if (commentField != null) return commentField;
- if (owner is Class) {
- (owner as Class).ensureComments();
- }
- return super.comment;
- }
-
- bool isValidMirror(DeclarationMirror mirror) => mirror is VariableMirror;
-}
« no previous file with comments | « pkg/docgen/lib/src/models/typedef.dart ('k') | pkg/docgen/lib/src/package_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698