use of com.perl5.lang.perl.idea.project.PerlProjectManager in project Perl5-IDEA by Camelcade.
the class PerlLightTestCase method setUpLibrary.
protected void setUpLibrary() {
Application application = ApplicationManager.getApplication();
application.invokeAndWait(() -> application.runWriteAction(() -> {
VirtualFile libdir = LocalFileSystem.getInstance().refreshAndFindFileByPath("testData/testlib");
assert libdir != null;
PerlProjectManager perlProjectManager = PerlProjectManager.getInstance(getProject());
perlProjectManager.setProjectSdk(new ProjectJdkImpl("test", PerlSdkType.INSTANCE));
perlProjectManager.addExternalLibrary(libdir);
CodeInsightTestFixtureImpl.ensureIndexesUpToDate(getProject());
}));
}
use of com.perl5.lang.perl.idea.project.PerlProjectManager in project Perl5-IDEA by Camelcade.
the class PerlLightTestCase method addTestLibrary.
/**
* Adds a library from testData/testLibSets as external dependency
*
* @param testLibraryName library name
*/
protected void addTestLibrary(@NotNull String testLibraryName) {
Application application = ApplicationManager.getApplication();
application.invokeAndWait(() -> application.runWriteAction(() -> {
VirtualFile libdir = LocalFileSystem.getInstance().refreshAndFindFileByPath(FileUtil.join("testData", "testLibSets", testLibraryName));
assert libdir != null;
PerlProjectManager perlProjectManager = PerlProjectManager.getInstance(getProject());
perlProjectManager.addExternalLibrary(libdir);
CodeInsightTestFixtureImpl.ensureIndexesUpToDate(getProject());
}));
}
Aggregations