OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, the Dart project authors. | 2 * Copyright (c) 2013, 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 |
11 * or implied. See the License for the specific language governing permissions a
nd limitations under | 11 * or implied. See the License for the specific language governing permissions a
nd limitations under |
12 * the License. | 12 * the License. |
13 */ | 13 */ |
14 package com.google.dart.tools.core.analysis.model; | 14 package com.google.dart.tools.core.analysis.model; |
15 | 15 |
16 import com.google.dart.engine.sdk.DartSdk; | 16 import com.google.dart.engine.sdk.DartSdk; |
17 import com.google.dart.tools.core.internal.analysis.model.InvertedSourceContaine
r; | 17 import com.google.dart.tools.core.internal.analysis.model.InvertedSourceContaine
r; |
18 import com.google.dart.tools.core.pub.PubspecModel; | 18 import com.google.dart.tools.core.pub.PubspecModel; |
19 | 19 |
20 import org.eclipse.core.runtime.CoreException; | 20 import org.eclipse.core.runtime.CoreException; |
21 | 21 |
22 import java.io.IOException; | 22 import java.io.IOException; |
23 | 23 |
24 /** | 24 /** |
25 * Represents a project or folder within a project containing a pubspec file. | 25 * Represents a project or folder within a project containing a pubspec file. |
26 * | 26 * |
27 * @coverage dart.tools.core.model | 27 * @coverage dart.tools.core.model |
28 */ | 28 */ |
29 public interface PubFolder extends ResourceMap { | 29 public interface PubFolder extends ResourceMap { |
30 | 30 |
31 /** | 31 /** |
32 * Answer a source container that can be used to determine which sources are n
ot contained in the | 32 * Answer a source container that can be used to determine which sources are n
ot contained in the |
33 * pub folder. Because the canonical location of a removed package is not avai
lable (the symlink | 33 * pub folder. Because the canonical location of a removed package is not avai
lable (the symlink |
34 * has been removed), this "inverted" source container is used to remove sourc
es from the | 34 * has been removed), this "inverted" source container is used to remove sourc
es from the |
35 * associated context. | 35 * associated context. |
36 */ | 36 */ |
37 InvertedSourceContainer getInvertedSourceContainer(); | 37 InvertedSourceContainer getInvertedSourceContainer(); |
38 | 38 |
39 /** | 39 /** |
40 * The pubspec model representing the pubspec.yaml file | 40 * The pubspec model representing the pubspec.yaml file |
41 * | 41 * |
42 * @return the pubspec model, not {@code null} | 42 * @return the pubspec model, not {@code null} |
43 */ | 43 */ |
44 PubspecModel getPubspec() throws CoreException, IOException; | 44 PubspecModel getPubspec() throws CoreException, IOException; |
45 | 45 |
46 /** | 46 /** |
47 * Answer the {@link DartSdk} used when constructing the analysis context. | 47 * Answer the {@link DartSdk} used when constructing the analysis context. |
48 * | 48 * |
49 * @return the sdk (not {@code null}) | 49 * @return the sdk (not {@code null}) |
50 */ | 50 */ |
51 DartSdk getSdk(); | 51 DartSdk getSdk(); |
52 | 52 |
53 /** | 53 /** |
54 * Updates the pubspec model, called when the pubspec.yaml file is changed | 54 * Updates the pubspec model, called when the pubspec.yaml file is changed |
55 */ | 55 */ |
56 void invalidatePubspec() throws CoreException, IOException; | 56 void invalidatePubspec() throws CoreException, IOException; |
57 | 57 |
| 58 /** |
| 59 * Answer a package path or {@code null} for the given resource path |
| 60 * |
| 61 * @param path |
| 62 * @return the package uri path |
| 63 */ |
| 64 String resolvePathToPackage(String path); |
| 65 |
58 } | 66 } |
OLD | NEW |