| 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) {
|
|
|