void (@NotNull String moduleName, @NotNull DependencyScope scope, boolean testJar) { myLibrariesTable = null; Module m = findModuleByName(moduleName); ModuleOrderEntry e; if (m != null) { e = myRootModel.addModuleOrderEntry(m); } else { e = ReadAction.compute(() -> myRootModel.addInvalidModuleEntry(moduleName)); } e.setScope(scope); if (testJar) { e.setProductionOnTestDependency(true); } if (myOrderEntriesBeforeJdk.contains(moduleName)) { moveLastOrderEntryBeforeJdk(); } }