use of org.eclipse.n4js.n4mf.ProjectDependency in project n4js by eclipse.
the class N4JSEclipseModel method doGetLibraries.
protected ImmutableList<? extends IN4JSEclipseArchive> doGetLibraries(N4JSEclipseProject project, URI location) {
ImmutableList.Builder<IN4JSEclipseArchive> result = ImmutableList.builder();
ProjectDescription description = getProjectDescription(location);
if (description != null) {
List<ProjectDependency> dependencies = description.getAllProjectDependencies();
for (ProjectDependency dependency : dependencies) {
URI dependencyLocation = getInternalWorkspace().getLocation(location, dependency, N4JSSourceContainerType.ARCHIVE);
if (dependencyLocation != null) {
IFile archive = workspace.getFile(new Path(dependencyLocation.toPlatformString(true)));
result.add(getN4JSArchive(project, archive));
}
}
}
return result.build();
}
use of org.eclipse.n4js.n4mf.ProjectDependency in project n4js by eclipse.
the class AbstractInternalWorkspaceTest method testGetLocation_04.
@SuppressWarnings("javadoc")
@Test
public void testGetLocation_04() {
ProjectDescription description = getWorkspace().getProjectDescription(myProjectURI);
ProjectDependency dependencyOnArchive = description.getAllProjectDependencies().get(0);
URI expectedToBeNull = getWorkspace().getLocation(myProjectURI, dependencyOnArchive, N4JSSourceContainerType.ARCHIVE);
assertNull(expectedToBeNull);
}
use of org.eclipse.n4js.n4mf.ProjectDependency in project n4js by eclipse.
the class AbstractInternalWorkspaceTest method testGetLocation_01.
@SuppressWarnings("javadoc")
@Test
public void testGetLocation_01() {
ProjectDescription description = getWorkspace().getProjectDescription(myProjectURI);
ProjectDependency dependency = description.getAllProjectDependencies().get(0);
URI resolvedLocation = getWorkspace().getLocation(myProjectURI, dependency, N4JSSourceContainerType.PROJECT);
assertEquals(libProjectURI, resolvedLocation);
}
use of org.eclipse.n4js.n4mf.ProjectDependency in project n4js by eclipse.
the class AbstractInternalWorkspaceTest method testGetLocation_02.
@SuppressWarnings("javadoc")
@Test
public void testGetLocation_02() {
ProjectDescription description = getWorkspace().getProjectDescription(myProjectURI);
ProjectDependency dependencyOnArchive = description.getAllProjectDependencies().get(1);
URI resolvedArchiveLocation = getWorkspace().getLocation(myProjectURI, dependencyOnArchive, N4JSSourceContainerType.ARCHIVE);
assertEquals(archiveFileURI, resolvedArchiveLocation);
}
use of org.eclipse.n4js.n4mf.ProjectDependency in project n4js by eclipse.
the class AbstractInternalWorkspaceTest method testGetLocation_03.
@SuppressWarnings("javadoc")
@Test
public void testGetLocation_03() {
ProjectDescription description = getWorkspace().getProjectDescription(myProjectURI);
ProjectDependency dependencyOnArchive = description.getAllProjectDependencies().get(1);
URI expectedToBeNull = getWorkspace().getLocation(myProjectURI, dependencyOnArchive, N4JSSourceContainerType.PROJECT);
assertNull(expectedToBeNull);
}
Aggregations