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

Unified Diff: compiler/java/com/google/dart/compiler/SystemLibrariesReader.java

Issue 10984082: Fix to exclude patch files from search results (dartbug.com/5492). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
Index: compiler/java/com/google/dart/compiler/SystemLibrariesReader.java
===================================================================
--- compiler/java/com/google/dart/compiler/SystemLibrariesReader.java (revision 12972)
+++ compiler/java/com/google/dart/compiler/SystemLibrariesReader.java (working copy)
@@ -36,7 +36,9 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
+import java.net.URI;
import java.nio.charset.Charset;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -157,6 +159,10 @@
library.setImplementation(((DartBooleanLiteral)expression).getValue());
} else if (name.equals(DOCUMENTED)){
library.setDocumented(((DartBooleanLiteral)expression).getValue());
+ } else if (name.equals(PATCH_PATH)) {
+ String path = ((DartStringLiteral) expression).getValue();
+ URI uri = sdkLibPath.getAbsoluteFile().toURI().resolve(URI.create(path));
+ patchPaths.add(uri);
} else if (name.equals(PLATFORMS)){
if (expression instanceof DartIdentifier){
String identifier = ((DartIdentifier)expression).getName();
@@ -183,15 +189,17 @@
private static final String IMPLEMENTATION = "implementation";
private static final String DOCUMENTED = "documented";
private static final String CATEGORY = "category";
+ private static final String PATCH_PATH = "dart2jsPatchPath";
private static final String PLATFORMS = "platforms";
+
private static final int DART2JS_PLATFORM = 1;
private static final int VM_PLATFORM = 2;
private final File sdkLibPath;
private final Map<String, DartLibrary> librariesMap = new HashMap<String, DartLibrary>();
+ private final List<URI> patchPaths = new ArrayList<URI>();
-
public SystemLibrariesReader(File sdkLibPath) {
this.sdkLibPath =sdkLibPath;
loadLibraryInfo();
@@ -201,6 +209,10 @@
return librariesMap;
}
+ public List<URI> getPatchPaths() {
+ return patchPaths;
+ }
+
private void loadLibraryInfo(){
File librariesFile = getLibrariesFile();

Powered by Google App Engine
This is Rietveld 408576698