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

Side by Side Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/source/PackageUriResolver.java

Issue 15736020: generate suggestions during analysis (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698