| OLD | NEW | 
|    1 // Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file |    1 // Copyright (c) 2011, 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 package com.google.dart.compiler; |    5 package com.google.dart.compiler; | 
|    6  |    6  | 
|    7 import java.io.File; |    7 import java.io.File; | 
|    8 import java.io.IOException; |    8 import java.io.IOException; | 
|    9 import java.net.MalformedURLException; |    9 import java.net.MalformedURLException; | 
|   10 import java.net.URI; |   10 import java.net.URI; | 
|   11 import java.net.URISyntaxException; |   11 import java.net.URISyntaxException; | 
|   12 import java.net.URL; |   12 import java.net.URL; | 
|   13 import java.util.ArrayList; |   13 import java.util.ArrayList; | 
|   14 import java.util.HashMap; |   14 import java.util.HashMap; | 
|   15 import java.util.Map; |   15 import java.util.Map; | 
|   16 import java.util.jar.JarFile; |   16 import java.util.jar.JarFile; | 
|   17  |   17  | 
|   18 /** |   18 /** | 
|   19  * Manages the collection of {@link SystemLibrary}s. |   19  * Manages the collection of {@link SystemLibrary}s. | 
|   20  */ |   20  */ | 
|   21 public class SystemLibraryManager { |   21 public class SystemLibraryManager { | 
|   22   private enum SystemLibraryPath { |   22   private enum SystemLibraryPath { | 
|   23     CORE("core", "core", "com/google/dart/corelib/", "corelib.dart", "corelib.ja
     r", true),  |   23     CORE("core", "core", "com/google/dart/corelib/", "corelib.dart", "corelib.ja
     r", true),  | 
|   24     COREIMPL("core", "coreimpl", "com/google/dart/corelib/", "corelib_impl.dart"
     , "corelib.jar", |   24     COREIMPL("core", "coreimpl", "com/google/dart/corelib/", "corelib_impl.dart"
     , "corelib.jar", | 
|   25         CORE, true),  |   25         CORE, true),  | 
|   26     DOM("dom", "dom", "dom/", "dom.dart", "domlib.jar"), |   26     DOM("dom", "dom", "dom/", "dom.dart", "domlib.jar"), | 
|   27     HTML("html", "html", "html/", "html.dart", "htmllib.jar"), |   27     HTML("html", "html", "html/", "html.dart", "htmllib.jar"), | 
|   28     HTMLIMPL("html", "htmlimpl", "html/", "htmlimpl.dart", "htmllib.jar"), |   28     HTMLIMPL("html", "htmlimpl", "html/", "htmlimpl.dart", "htmllib.jar"), | 
|   29     JSON("json", "json", "json/", "json.dart", "jsonlib.jar"); |   29     JSON("json", "json", "json/", "json.dart", "jsonlib.jar"), | 
 |   30     ISOLATE("isolate", "isolate", "isolate/", "isolate_compiler.dart", "isolatel
     ib.jar"); | 
|   30  |   31  | 
|   31     final String hostName; |   32     final String hostName; | 
|   32     final SystemLibraryPath base; |   33     final SystemLibraryPath base; | 
|   33     final String shortName; |   34     final String shortName; | 
|   34     final String jar; |   35     final String jar; | 
|   35     final String lib; |   36     final String lib; | 
|   36     final boolean failIfMissing; |   37     final boolean failIfMissing; | 
|   37  |   38  | 
|   38     SystemLibraryPath(String hostName, String shortName, String path, String fil
     e, String jar, |   39     SystemLibraryPath(String hostName, String shortName, String path, String fil
     e, String jar, | 
|   39         boolean failIfMissing) { |   40         boolean failIfMissing) { | 
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  306         if (library != null) { |  307         if (library != null) { | 
|  307           defaultLibraries.add(library); |  308           defaultLibraries.add(library); | 
|  308           baseFiles[path.ordinal()] = library.getFile(); |  309           baseFiles[path.ordinal()] = library.getFile(); | 
|  309         } |  310         } | 
|  310       } |  311       } | 
|  311     } |  312     } | 
|  312  |  313  | 
|  313     return defaultLibraries.toArray(new SystemLibrary[defaultLibraries.size()]); |  314     return defaultLibraries.toArray(new SystemLibrary[defaultLibraries.size()]); | 
|  314   } |  315   } | 
|  315 } |  316 } | 
| OLD | NEW |