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

Unified Diff: dart/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/analysis/model/ProjectManagerImpl.java

Issue 126303002: Version 1.1.0-dev.5.3 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 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: dart/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/analysis/model/ProjectManagerImpl.java
===================================================================
--- dart/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/analysis/model/ProjectManagerImpl.java (revision 31563)
+++ dart/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/analysis/model/ProjectManagerImpl.java (working copy)
@@ -1,11 +1,11 @@
/*
* Copyright 2013 Dart project authors.
- *
+ *
* Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
- *
+ *
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
@@ -67,7 +67,7 @@
/**
* Concrete implementation of {@link ProjectManager}.
- *
+ *
* @coverage dart.tools.core.model
*/
public class ProjectManagerImpl extends ContextManagerImpl implements ProjectManager {
@@ -211,8 +211,9 @@
// into the dart:core files in the project, which leads to a large number of false
// positives.
//
- result = new ProjectImpl(resource, new DirectoryBasedDartSdk(
- resource.getLocation().toFile()));
+ result = new ProjectImpl(
+ resource,
+ new DirectoryBasedDartSdk(resource.getLocation().toFile()));
} else {
result = new ProjectImpl(resource, getSdk());
}
@@ -374,6 +375,15 @@
}
@Override
+ public String resolvePathToPackage(IResource resource, String path) {
+ Project project = getProject(resource.getProject());
+ if (project != null) {
+ return project.resolvePathToPackage(path);
+ }
+ return null;
+ }
+
+ @Override
public IFileInfo resolveUriToFileInfo(IResource relativeTo, String uri) {
Project project = getProject(relativeTo.getProject());
if (project != null) {
@@ -468,7 +478,8 @@
}
return true;
}
- }, 0);
+ },
+ 0);
} catch (CoreException e) {
DartCore.logError(e);
}
@@ -515,10 +526,8 @@
for (Source source : sources) {
AnalysisErrorInfo errorInfo = context.getErrors(source);
if (errorInfo.getErrors().length > 0) {
- AnalysisMarkerManager.getInstance().queueErrors(
- getResource(source),
- errorInfo.getLineInfo(),
- errorInfo.getErrors());
+ AnalysisMarkerManager.getInstance()
+ .queueErrors(getResource(source), errorInfo.getLineInfo(), errorInfo.getErrors());
}
Project project = getProject(resource.getProject());
if (project == null) {

Powered by Google App Engine
This is Rietveld 408576698