OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012, the Dart project authors. | 2 * Copyright (c) 2012, the Dart project authors. |
3 * | 3 * |
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
6 * | 6 * |
7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
8 * | 8 * |
9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
(...skipping 21 matching lines...) Expand all Loading... |
32 public class PackageUriResolver extends UriResolver { | 32 public class PackageUriResolver extends UriResolver { |
33 | 33 |
34 /** | 34 /** |
35 * The package directories that {@code package} URI's are assumed to be relati
ve to. | 35 * The package directories that {@code package} URI's are assumed to be relati
ve to. |
36 */ | 36 */ |
37 private File[] packagesDirectories; | 37 private File[] packagesDirectories; |
38 | 38 |
39 /** | 39 /** |
40 * The name of the {@code package} scheme. | 40 * The name of the {@code package} scheme. |
41 */ | 41 */ |
42 private static final String PACKAGE_SCHEME = "package"; | 42 public static final String PACKAGE_SCHEME = "package"; |
43 | 43 |
44 /** | 44 /** |
45 * Log exceptions thrown with the message "Required key not available" only on
ce. | 45 * Log exceptions thrown with the message "Required key not available" only on
ce. |
46 */ | 46 */ |
47 private static boolean CanLogRequiredKeyIoException = true; | 47 private static boolean CanLogRequiredKeyIoException = true; |
48 | 48 |
49 /** | 49 /** |
50 * Return {@code true} if the given URI is a {@code package} URI. | 50 * Return {@code true} if the given URI is a {@code package} URI. |
51 * | 51 * |
52 * @param uri the URI being tested | 52 * @param uri the URI being tested |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 if (!e.getMessage().contains("Required key not available")) { | 160 if (!e.getMessage().contains("Required key not available")) { |
161 AnalysisEngine.getInstance().getLogger().logError("Canonical failed: " +
pkgDir, e); | 161 AnalysisEngine.getInstance().getLogger().logError("Canonical failed: " +
pkgDir, e); |
162 } else if (CanLogRequiredKeyIoException) { | 162 } else if (CanLogRequiredKeyIoException) { |
163 CanLogRequiredKeyIoException = false; | 163 CanLogRequiredKeyIoException = false; |
164 AnalysisEngine.getInstance().getLogger().logError("Canonical failed: " +
pkgDir, e); | 164 AnalysisEngine.getInstance().getLogger().logError("Canonical failed: " +
pkgDir, e); |
165 } | 165 } |
166 } | 166 } |
167 return new File(pkgDir, relPath.replace('/', File.separatorChar)); | 167 return new File(pkgDir, relPath.replace('/', File.separatorChar)); |
168 } | 168 } |
169 } | 169 } |
OLD | NEW |