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

Unified Diff: pkg/analyzer/lib/src/generated/sdk.dart

Issue 725143004: Format and sort analyzer and analysis_server packages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/generated/scanner.dart ('k') | pkg/analyzer/lib/src/generated/sdk_io.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/sdk.dart
diff --git a/pkg/analyzer/lib/src/generated/sdk.dart b/pkg/analyzer/lib/src/generated/sdk.dart
index 494021cf427bd93ed8eaaa5795f7bbb6a24e2133..9bd5a7f8910982de6f24510f9580be7392f03758 100644
--- a/pkg/analyzer/lib/src/generated/sdk.dart
+++ b/pkg/analyzer/lib/src/generated/sdk.dart
@@ -8,9 +8,10 @@
library engine.sdk;
import 'dart:collection';
-import 'source.dart' show ContentCache, Source, UriKind;
+
import 'ast.dart';
import 'engine.dart' show AnalysisContext;
+import 'source.dart' show ContentCache, Source, UriKind;
/**
* Instances of the class `DartSdk` represent a Dart SDK installed in a specified location.
@@ -37,16 +38,6 @@ abstract class DartSdk {
static final String DEFAULT_VERSION = "0";
/**
- * Return a source representing the given file: URI if the file is in this SDK, or `null` if
- * the file is not in this SDK.
- *
- * @param uri the file URI for which a source is to be returned
- * @return the source representing the given URI
- * @throws
- */
- Source fromFileUri(Uri uri);
-
- /**
* Return the [AnalysisContext] used for all of the sources in this [DartSdk].
*
* @return the [AnalysisContext] used for all of the sources in this [DartSdk]
@@ -61,15 +52,6 @@ abstract class DartSdk {
List<SdkLibrary> get sdkLibraries;
/**
- * Return the library representing the library with the given `dart:` URI, or `null`
- * if the given URI does not denote a library in this SDK.
- *
- * @param dartUri the URI of the library to be returned
- * @return the SDK library object
- */
- SdkLibrary getSdkLibrary(String dartUri);
-
- /**
* Return the revision number of this SDK, or `"0"` if the revision number cannot be
* discovered.
*
@@ -85,6 +67,25 @@ abstract class DartSdk {
List<String> get uris;
/**
+ * Return a source representing the given file: URI if the file is in this SDK, or `null` if
+ * the file is not in this SDK.
+ *
+ * @param uri the file URI for which a source is to be returned
+ * @return the source representing the given URI
+ * @throws
+ */
+ Source fromFileUri(Uri uri);
+
+ /**
+ * Return the library representing the library with the given `dart:` URI, or `null`
+ * if the given URI does not denote a library in this SDK.
+ *
+ * @param dartUri the URI of the library to be returned
+ * @return the SDK library object
+ */
+ SdkLibrary getSdkLibrary(String dartUri);
+
+ /**
* Return the source representing the library with the given `dart:` URI, or `null` if
* the given URI does not denote a library in this SDK.
*
@@ -102,15 +103,8 @@ class LibraryMap {
/**
* A table mapping Dart library URI's to the library.
*/
- HashMap<String, SdkLibraryImpl> _libraryMap = new HashMap<String, SdkLibraryImpl>();
-
- /**
- * Return the library with the given URI, or `null` if the URI does not map to a library.
- *
- * @param dartUri the URI of the library to be returned
- * @return the library with the given URI
- */
- SdkLibrary getLibrary(String dartUri) => _libraryMap[dartUri];
+ HashMap<String, SdkLibraryImpl> _libraryMap =
+ new HashMap<String, SdkLibraryImpl>();
/**
* Return an array containing all the sdk libraries [SdkLibraryImpl] in the mapping
@@ -130,6 +124,14 @@ class LibraryMap {
* Return the library with the given URI, or `null` if the URI does not map to a library.
*
* @param dartUri the URI of the library to be returned
+ * @return the library with the given URI
+ */
+ SdkLibrary getLibrary(String dartUri) => _libraryMap[dartUri];
+
+ /**
+ * Return the library with the given URI, or `null` if the URI does not map to a library.
+ *
+ * @param dartUri the URI of the library to be returned
* @param library the library with the given URI
*/
void setLibrary(String dartUri, SdkLibraryImpl library) {
@@ -268,21 +270,6 @@ abstract class SdkLibrary {
String get category;
/**
- * Return the path to the file defining the library. The path is relative to the `lib`
- * directory within the SDK.
- *
- * @return the path to the file defining the library
- */
- String get path;
-
- /**
- * Return the short name of the library. This is the URI of the library, including `dart:`.
- *
- * @return the short name of the library
- */
- String get shortName;
-
- /**
* Return `true` if this library can be compiled to JavaScript by dart2js.
*
* @return `true` if this library can be compiled to JavaScript by dart2js
@@ -323,6 +310,21 @@ abstract class SdkLibrary {
* @return `true` if this library can be run on the VM
*/
bool get isVmLibrary;
+
+ /**
+ * Return the path to the file defining the library. The path is relative to the `lib`
+ * directory within the SDK.
+ *
+ * @return the path to the file defining the library
+ */
+ String get path;
+
+ /**
+ * Return the short name of the library. This is the URI of the library, including `dart:`.
+ *
+ * @return the short name of the library
+ */
+ String get shortName;
}
/**
@@ -331,6 +333,18 @@ abstract class SdkLibrary {
*/
class SdkLibraryImpl implements SdkLibrary {
/**
+ * The bit mask used to access the bit representing the flag indicating whether a library is
+ * intended to work on the dart2js platform.
+ */
+ static int DART2JS_PLATFORM = 1;
+
+ /**
+ * The bit mask used to access the bit representing the flag indicating whether a library is
+ * intended to work on the VM platform.
+ */
+ static int VM_PLATFORM = 2;
+
+ /**
* The short name of the library. This is the name used after `dart:` in a URI.
*/
String _shortName = null;
@@ -363,30 +377,33 @@ class SdkLibraryImpl implements SdkLibrary {
int _platforms = 0;
/**
- * The bit mask used to access the bit representing the flag indicating whether a library is
- * intended to work on the dart2js platform.
+ * Initialize a newly created library to represent the library with the given name.
+ *
+ * @param name the short name of the library
*/
- static int DART2JS_PLATFORM = 1;
+ SdkLibraryImpl(String name) {
+ this._shortName = name;
+ }
/**
- * The bit mask used to access the bit representing the flag indicating whether a library is
- * intended to work on the VM platform.
+ * Set whether the library is documented to match the given value.
+ *
+ * @param documented `true` if the library is documented
*/
- static int VM_PLATFORM = 2;
+ void set documented(bool documented) {
+ this._documented = documented;
+ }
/**
- * Initialize a newly created library to represent the library with the given name.
+ * Set whether the library is an implementation library to match the given value.
*
- * @param name the short name of the library
+ * @param implementation `true` if the library is an implementation library
*/
- SdkLibraryImpl(String name) {
- this._shortName = name;
+ void set implementation(bool implementation) {
+ this._implementation = implementation;
}
@override
- String get shortName => _shortName;
-
- @override
bool get isDart2JsLibrary => (_platforms & DART2JS_PLATFORM) != 0;
@override
@@ -412,6 +429,9 @@ class SdkLibraryImpl implements SdkLibrary {
@override
bool get isVmLibrary => (_platforms & VM_PLATFORM) != 0;
+ @override
+ String get shortName => _shortName;
+
/**
* Record that this library can be compiled to JavaScript by dart2js.
*/
@@ -420,27 +440,9 @@ class SdkLibraryImpl implements SdkLibrary {
}
/**
- * Set whether the library is documented to match the given value.
- *
- * @param documented `true` if the library is documented
- */
- void set documented(bool documented) {
- this._documented = documented;
- }
-
- /**
- * Set whether the library is an implementation library to match the given value.
- *
- * @param implementation `true` if the library is an implementation library
- */
- void set implementation(bool implementation) {
- this._implementation = implementation;
- }
-
- /**
* Record that this library can be run on the VM.
*/
void setVmLibrary() {
_platforms |= VM_PLATFORM;
}
-}
+}
« no previous file with comments | « pkg/analyzer/lib/src/generated/scanner.dart ('k') | pkg/analyzer/lib/src/generated/sdk_io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698