use of aQute.bnd.build.Project in project intellij-plugins by JetBrains.
the class BndProjectImporter method doReimportProjects.
private static void doReimportProjects(com.intellij.openapi.project.Project project, Collection<String> projectDirs, ProgressIndicator indicator) {
Workspace workspace = getWorkspace(project);
assert workspace != null : project;
Collection<Project> projects;
try {
refreshRepositories(workspace, indicator);
projects = ContainerUtil.newArrayListWithCapacity(projectDirs.size());
for (String dir : projectDirs) {
if (indicator != null)
indicator.checkCanceled();
Project p = workspace.getProject(PathUtil.getFileName(dir));
if (p != null) {
p.clear();
p.forceRefresh();
projects.add(p);
}
}
} catch (Exception e) {
LOG.error("ws=" + workspace.getBase() + " pr=" + projectDirs, e);
return;
}
Runnable task = () -> new BndProjectImporter(project, workspace, projects).resolve(true);
if (!isUnitTestMode()) {
ApplicationManager.getApplication().invokeLater(task, project.getDisposed());
} else {
task.run();
}
}
use of aQute.bnd.build.Project in project intellij-plugins by JetBrains.
the class BndProjectImporter method doReimportWorkspace.
private static void doReimportWorkspace(com.intellij.openapi.project.Project project, ProgressIndicator indicator) {
Workspace workspace = getWorkspace(project);
assert workspace != null : project;
Collection<Project> projects;
try {
workspace.clear();
workspace.forceRefresh();
refreshRepositories(workspace, indicator);
projects = getWorkspaceProjects(workspace);
for (Project p : projects) {
if (indicator != null)
indicator.checkCanceled();
p.clear();
p.forceRefresh();
}
} catch (Exception e) {
LOG.error("ws=" + workspace.getBase(), e);
return;
}
Runnable task = () -> {
BndProjectImporter importer = new BndProjectImporter(project, workspace, projects);
importer.setupProject();
importer.resolve(true);
};
if (!isUnitTestMode()) {
ApplicationManager.getApplication().invokeLater(task, project.getDisposed());
} else {
task.run();
}
}
use of aQute.bnd.build.Project in project bnd by bndtools.
the class WorkspaceTest method testPropertyDefaulting.
public void testPropertyDefaulting() throws Exception {
try (Workspace ws = Workspace.getWorkspace(IO.getFile("testresources/ws-defaulting"))) {
Project p = ws.getProject("p1");
assertEquals("defaults", p.getProperty("myprop1"));
assertEquals("workspace", p.getProperty("myprop2"));
assertEquals("project", p.getProperty("myprop3"));
assertEquals("src", p.mergeProperties("src"));
}
}
use of aQute.bnd.build.Project in project bnd by bndtools.
the class WorkspaceBundleVersionedDependencyTest method testWorkspaceVersionedDependencyWithSubbundle.
public static void testWorkspaceVersionedDependencyWithSubbundle() throws Exception {
IO.copy(IO.getFile("testresources/ws-versioneddependencies-withsubbundle"), IO.getFile("generated/ws-versioneddependencies-withsubbundle"));
Workspace ws = Workspace.getWorkspace(IO.getFile("generated/ws-versioneddependencies-withsubbundle"));
ws.getProject("mydependency").build();
Project project = ws.getProject("myconsumer");
project.clean();
project.build();
assertTrue(project.check());
}
use of aQute.bnd.build.Project in project bnd by bndtools.
the class WorkspaceBundleVersionedDependencyTest method testWorkspaceVersionedDependency.
public static void testWorkspaceVersionedDependency() throws Exception {
IO.copy(IO.getFile("testresources/ws-versioneddependencies"), IO.getFile("generated/ws-versioneddependencies"));
Workspace ws = Workspace.getWorkspace(IO.getFile("generated/ws-versioneddependencies"));
Project project = ws.getProject("myconsumer");
project.clean();
project.build();
assertTrue(project.check());
}
Aggregations