Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
19,300
String () { String sourcesDir = System.getProperty("maven.sources.dir", PluginPathManager.getPluginHomePath("maven")); return FileUtil.toSystemIndependentName(sourcesDir + "/src/test/data"); }
getOriginalTestDataPath
19,301
String (String relativePath) { String path = getTestData(relativePath).getPath(); return FileUtil.toSystemIndependentName(path); }
getTestDataPath
19,302
File (String relativePath) { return new File(myWorkingData, relativePath); }
getTestData
19,303
void (String relativePath) { FileUtil.delete(new File(getTestDataPath(relativePath))); }
delete
19,304
void () { assertEquals("org.apache.maven.plugins", p.getGroupId()); assertEquals("maven-compiler-plugin", p.getArtifactId()); assertEquals("2.0.2", p.getVersion()); }
testLoadingPluginInfo
19,305
void () { assertEquals("compiler", p.getGoalPrefix()); List<String> qualifiedGoals = new ArrayList<>(); List<String> displayNames = new ArrayList<>(); List<String> goals = new ArrayList<>(); for (MavenPluginInfo.Mojo m : p.getMojos()) { goals.add(m.getGoal()); qualifiedGoals.add(m.getQualifiedGoal()); displayNames.add(...
testGoals
19,306
void () { myFixture.configureByText("pom.xml", """ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</mode...
testCompletion
19,307
void () { myFixture.configureByText("pom.xml", """ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</mode...
testCompletion
19,308
void () { myFixture.configureByText("pom.xml", """ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</mode...
testCompletion
19,309
void () { myFixture.configureByText("pom.xml", """ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</mode...
testCompletion2
19,310
void () { myFixture.configureByText("pom.xml", """ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</mode...
testCompletion3
19,311
void () { myFixture.configureByText("pom.xml", """ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</mode...
testInjectionVariables
19,312
void () { myFixture.configureByText("pom.xml", """ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</mode...
testHighlighting
19,313
void (IOException e) { throw new RuntimeException(e); }
onReadError
19,314
void () { fail("syntax error"); }
onSyntaxError
19,315
void () { var in = List.of(1, 2, 3, 4, 5); var out = new ArrayList<Integer>(); ParallelRunner.runSequentially(in, out::add); assertEquals(in, out); }
testSequential
19,316
void () { Exception rethrown = null; var text = "should be rethrown"; var in = List.of(1, 2, 3, 4, 5); try { ParallelRunner.<Integer, Exception>runSequentiallyRethrow(in, it -> { throw new Exception(text); }); } catch (Exception e) { rethrown = e; } assertNotNull(rethrown); assertEquals(text, rethrown.getMessage()); }
testSequentialRethrow
19,317
void () { var text = "should be rethrown"; var in = List.of(1, 2, 3, 4, 5); ParallelRunner.runSequentiallyRethrow(in, it -> { throw new IOException(text); }); }
testSequentialSneakyRethrow
19,318
void () { var in = Set.of(1, 2, 3, 4, 5); var out = new ConcurrentHashMap<Integer, Integer>(); ParallelRunner.runInParallel(in, it -> out.put(it, it)); assertEquals(in, out.keySet()); }
testParallel
19,319
void () { Exception rethrown = null; var text = "should be rethrown"; var in = List.of(1, 2, 3, 4, 5); try { ParallelRunner.runInParallel(in, it -> { throw new RuntimeException(text); }); } catch (RuntimeException e) { rethrown = e; } assertNotNull(rethrown); assertEquals(text, rethrown.getMessage()); }
testParallelRethrowRuntimeException
19,320
void () { Exception rethrown = null; var text = "should be rethrown"; var in = List.of(1, 2, 3, 4, 5); try { ParallelRunner.<Integer, MyTestException>runInParallelRethrow(in, it -> { throw new MyTestException(text); }); } catch (MyTestException e) { rethrown = e; } assertNotNull(rethrown); assertEquals(text, rethrown.g...
testParallelRethrow
19,321
void () { var text = "should be rethrown"; var in = List.of(1, 2, 3, 4, 5); ParallelRunner.runInParallelRethrow(in, it -> { throw new IOException(text); }); }
testParallelSneakyThrow
19,322
String () { return message; }
getMessage
19,323
void () { assertClassSearchResults("TestCas", "TestCase(junit.framework) junit:junit:4.0 junit:junit:3.8.2 junit:junit:3.8.1", "TestCaseClassLoader(junit.runner) junit:junit:3.8.2 junit:junit:3.8.1"); assertClassSearchResults("TESTcase", "TestCase(junit.framework) junit:junit:4.0 junit:junit:3.8.2 junit:junit:3.8.1", "...
testClassSearch
19,324
void () { if (ignore()) return; assertArtifactSearchResults(""); assertArtifactSearchResults("j:j", Stream.concat(Arrays.stream(JMOCK_VERSIONS), Arrays.stream(JUNIT_VERSIONS)).toArray(String[]::new)); assertArtifactSearchResults("junit", JUNIT_VERSIONS); assertArtifactSearchResults("junit 3.", JUNIT_VERSIONS); assertAr...
testArtifactSearch
19,325
void () { if (ignore()) return; assertArtifactSearchResults("commons", COMMONS_IO_VERSIONS); assertArtifactSearchResults("commons-", COMMONS_IO_VERSIONS); assertArtifactSearchResults("commons-io", COMMONS_IO_VERSIONS); }
testArtifactSearchDash
19,326
void (String pattern, String... expected) { assertOrderedElementsAreEqual(getClassSearchResults(pattern), expected); }
assertClassSearchResults
19,327
List<String> (String pattern) { List<String> actualArtifacts = new ArrayList<>(); for (MavenClassSearchResult eachResult : new MavenClassSearcher().search(myProject, pattern, 100)) { StringBuilder s = new StringBuilder(eachResult.getClassName() + "(" + eachResult.getPackageName() + ")"); for (MavenDependencyCompletionI...
getClassSearchResults
19,328
void (String pattern, String... expected) { List<String> actual = new ArrayList<>(); StringBuilder s; for (MavenArtifactSearchResult eachResult : new MavenArtifactSearcher().search(myProject, pattern, 100)) { for (MavenDependencyCompletionItem eachVersion : eachResult.getSearchResults().getItems()) { s = new StringBuil...
assertArtifactSearchResults
19,329
void () { MavenRepositoryInfo localRepo = new MavenRepositoryInfo(LOCAL_REPOSITORY_ID, "/home/user/.m2/repository", IndexKind.LOCAL); localDiff = MavenIndices.getLocalDiff(localRepo, myContext, null); Assert.assertNotNull(localDiff.newIndices); Assert.assertEquals(localRepo.getUrl(), localDiff.newIndices.getRepositoryP...
testGetLocalInitAndNoDiff
19,330
void () { MavenRepositoryInfo localRepo = new MavenRepositoryInfo(LOCAL_REPOSITORY_ID, "/home/user/.m2/repository", IndexKind.LOCAL); localDiff = MavenIndices.getLocalDiff(localRepo, myContext, null); Assert.assertNotNull(localDiff.newIndices); Assert.assertEquals(localRepo.getUrl(), localDiff.newIndices.getRepositoryP...
testGetLocalInitAndDiff
19,331
void () { MavenRepositoryInfo localRepo = new MavenRepositoryInfo(LOCAL_REPOSITORY_ID, "/home/user/.m4/repository", IndexKind.LOCAL); localDiff = MavenIndices.getLocalDiff(localRepo, myContext, null); Assert.assertNotNull(localDiff.newIndices); Assert.assertEquals(localRepo.getUrl(), localDiff.newIndices.getRepositoryP...
testGetLocalCreateNew
19,332
void () { MavenRepositoryInfo remoteRepo = new MavenRepositoryInfo("central", "https://repo.maven.apache.org/maven2", IndexKind.LOCAL); Map<String, Set<String>> remoteRepositoryIdsByUrl = Map.of(remoteRepo.getUrl(), Collections.singleton(remoteRepo.getId())); remoteDiff = MavenIndices.getRemoteDiff(remoteRepositoryIdsB...
testGetRemoteInitAndNoDiff
19,333
void () { MavenRepositoryInfo remoteRepo = new MavenRepositoryInfo("central", "https://repo.maven.apache.org/maven2", IndexKind.LOCAL); Map<String, Set<String>> remoteRepositoryIdsByUrl = Map.of(remoteRepo.getUrl(), Collections.singleton(remoteRepo.getId())); remoteDiff = MavenIndices.getRemoteDiff(remoteRepositoryIdsB...
testGetRemoteInitAndDiff
19,334
void () { MavenRepositoryInfo remoteRepo = new MavenRepositoryInfo("milestone", "https://repo.maven.apache.org/milestone", IndexKind.REMOTE); Map<String, Set<String>> remoteRepositoryIdsByUrl = Map.of(remoteRepo.getUrl(), Collections.singleton(remoteRepo.getUrl())); remoteDiff = MavenIndices.getRemoteDiff(remoteReposit...
testGetRemoteCreateNew
19,335
void () { myFixture.addFileToProject("Indices/Index10/index.properties", """ #Sun Oct 31 18:51:24 MSK 2021 dataDirName=data0 kind=REMOTE id=central pathOrUrl=https://repo.maven.apache.org/maven2 version=5""").getVirtualFile(); MavenRepositoryInfo remoteRepo = new MavenRepositoryInfo("central", "https://repo.maven.apach...
testGetRemoteDiffWithDuplicates
19,336
void () { MavenRemoteRepository remote1 = new MavenRemoteRepository("id1", "name", "http://foo/bar", null, null, null); MavenRemoteRepository remote2 = new MavenRemoteRepository("id2", "name", " http://foo\\bar\\\\ ", null, null, null); MavenRemoteRepository remote3 = new MavenRemoteRepository("id3", "name", "http://fo...
testGroupRemoteRepositoriesByUrl
19,337
void () { assertArchetypeExists("org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE"); }
testDefaultArchetypes
19,338
void () { MavenArchetype mavenArchetype = new MavenArchetype("myGroup", "myArtifact", "666", null, null); MavenIndicesManager.addArchetype(mavenArchetype); assertArchetypeExists("myGroup:myArtifact:666"); }
testAddingArchetypes
19,339
void (Set<File> added, Set<File> failedToAdd) { addedFiles.addAll(added); failedToAddFiles.addAll(failedToAdd); latch.countDown(); }
indexUpdated
19,340
void (String archetypeId) { Set<MavenArchetype> achetypes = myIndicesFixture.getArchetypeManager().getArchetypes(); List<String> actualNames = new ArrayList<>(); for (MavenArchetype each : achetypes) { actualNames.add(each.groupId + ":" + each.artifactId); } MavenId id = new MavenId(archetypeId); assertTrue(actualNames...
assertArchetypeExists
19,341
void () { MavenSystemIndicesManager.getInstance().setTestIndicesDir(myDir.resolve("MavenIndices")); getIndicesManager().scheduleUpdateIndicesList(null); getIndicesManager().waitForBackgroundTasksInTests(); UIUtil.dispatchAllInvocationEvents(); }
setUpAfterImport
19,342
void () { MavenServerManager.getInstance().shutdown(true); Disposer.dispose(getIndicesManager()); }
tearDown
19,343
MavenIndicesManager () { return MavenIndicesManager.getInstance(myProject); }
getIndicesManager
19,344
MavenArchetypeManager () { return MavenArchetypeManager.getInstance(myProject); }
getArchetypeManager
19,345
MavenCustomRepositoryHelper () { return myRepositoryHelper; }
getRepositoryHelper
19,346
boolean (@NotNull String category, @NotNull String message, Throwable t) { fail(message + t); return false; }
processWarn
19,347
TestCaseBuilder (String... lines) { return new TestCaseBuilder().withLines(lines); }
testCase
19,348
TestCaseBuilder (String... lines) { List<String> joinedAndSplitted = List.of(StringUtil.join(lines, "\n").split("\n")); myLines.addAll(joinedAndSplitted); return this; }
withLines
19,349
TestCaseBuilder (MavenLoggedEventParser... parsers) { ContainerUtil.addAll(myParsers, parsers); return this; }
withParsers
19,350
TestCaseBuilder (String message) { myExpectedEvents.add(event(message, StartEventMatcher::new)); myExpectedEvents.add(event(message, FinishSuccessEventMatcher::new)); return this; }
expectSucceed
19,351
TestCaseBuilder (String message, Function<String, Matcher<BuildEvent>> creator) { myExpectedEvents.add(event(message, creator)); return this; }
expect
19,352
TestCaseBuilder (String message, Matcher<BuildEvent> matcher) { myExpectedEvents.add(Pair.create(message, matcher)); return this; }
expect
19,353
void () { check(false); }
check
19,354
void (boolean checkFinishEvent) { Iterator<BuildEvent> events = collect().iterator(); Iterator<Pair<String, Matcher<BuildEvent>>> expectedEvents = myExpectedEvents.iterator(); while (events.hasNext()) { if (!expectedEvents.hasNext()) { BuildEvent next = events.next(); if (next instanceof FinishBuildEvent && !checkFinis...
check
19,355
String () { List<BuildEvent> events = collect(); Map<Object, Integer> levelMap = new HashMap<>(); Map<Object, String> result = new LinkedHashMap<>(); for (BuildEvent event : events) { if (event instanceof FinishEvent) { Integer value = levelMap.get(event.getId()); if (value == null) { fail("Finish event for non-registe...
runAndFormatToString
19,356
List<BuildEvent> () { MavenRunConfiguration configuration = (MavenRunConfiguration)new MavenRunConfigurationType.MavenRunConfigurationFactory(MavenRunConfigurationType.getInstance()) .createTemplateConfiguration(getProject()); CollectConsumer collectConsumer = new CollectConsumer(); MavenLogOutputParser parser = new Ma...
collect
19,357
TestCaseBuilder () { mySkipOutput = true; return this; }
withSkippedOutput
19,358
void (BuildEvent buildEvent) { myReceivedEvents.add(buildEvent); }
accept
19,359
boolean (Object item) { return item instanceof FinishEvent && ((FinishEvent)item).getMessage().equals(myMessage) && ((FinishEvent)item).getResult() instanceof SuccessResult; }
matches
19,360
void (@NotNull Description description) { description.appendText("Expected successful FinishEvent " + myMessage); }
describeTo
19,361
boolean (Object item) { return item instanceof StartEvent && ((StartEvent)item).getMessage().equals(myMessage); }
matches
19,362
void (@NotNull Description description) { description.appendText("Expected StartEvent " + myMessage); }
describeTo
19,363
boolean (Object item) { return item instanceof MessageEvent && StringUtil.equalsTrimWhitespaces(myMessage, ((MessageEvent)item).getDescription()) && ((MessageEvent)item).getKind() == WARNING; }
matches
19,364
void (@NotNull Description description) { description.appendText("Expected WarningEvent " + myMessage); }
describeTo
19,365
boolean (Object item) { return item instanceof FileMessageEvent && ((FileMessageEvent)item).getMessage().equals(myMessage) && FileUtil.filesEqual(new File(myFileName), ((FileMessageEvent)item).getFilePosition().getFile()) && ((FileMessageEvent)item).getFilePosition().getStartLine() == myLine && ((FileMessageEvent)item)...
matches
19,366
void (@NotNull Description description) { description.appendText("Expected \n" + new FileMessageEventImpl("EXECUTE_TASK:0", ERROR, "Error", myMessage, myMessage, new FilePosition(new File(myFileName), myLine,myColumn))); }
describeTo
19,367
Object () { throw new UnsupportedOperationException(); }
getParentEventId
19,368
String () { myPosition++; return getCurrentLine(); }
readLine
19,369
void () { }
pushBack
19,370
void (int numberOfLines) { throw new UnsupportedOperationException(); }
pushBack
19,371
String () { if (myPosition >= myLines.size() || myPosition < 0) { return null; } return myLines.get(myPosition); }
getCurrentLine
19,372
void () { MavenLogEntryReader.MavenLogEntry entry = new MavenLogEntryReader.MavenLogEntry("[ERROR] error line"); assertEquals(LogMessageType.ERROR, entry.myType); assertEquals("error line", entry.myLine); entry = new MavenLogEntryReader.MavenLogEntry("[INFO] info line"); assertEquals(LogMessageType.INFO, entry.myType);...
testParser
19,373
void () { MavenLogEntryReader.MavenLogEntry entry = new MavenLogEntryReader.MavenLogEntry("Progress 1\r Progress 2\r Progress 3\r[INFO] Done"); assertEquals(LogMessageType.INFO, entry.myType); assertEquals("Done", entry.myLine); }
testRemoveProgressFromOutput
19,374
void () { testCase(""" [INFO] --------------------------------[ jar ]--------------------------------- [WARNING] The POM for some.maven:artifact:jar:1.2 is missing, no dependency information available """) .withParsers(new WarningNotifier()) .expect("The POM for some.maven:artifact:jar:1.2 is missing, no dependency inf...
testWarningNotify
19,375
void () { testCase(""" [INFO] --------------------------------[ jar ]--------------------------------- [WARNING]\s [WARNING] Some problems were encountered while building the effective model for org.jb:m1-pom:jar:1 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @...
testWarningConcatenate
19,376
void () { String expectedFileName = FileUtil.toSystemDependentName("C:/path/to/MyFile.java"); String expectedMessage = "';' expected"; testCase(""" [INFO] ------------------------------------------------------------- [ERROR] /C:/path/to/MyFile.java:[13,21] ';' expected [INFO] 1 error""") .withParsers(new JavaBuildError...
testParseJavaError
19,377
void () { String expectedFileName = FileUtil.toSystemDependentName("C:\\path\\to\\MyFile.kt"); String expectedMessage = "Data class primary constructor must have only property (val / var) parameters"; testCase(""" [INFO] --- kotlin-maven-plugin:1.3.21:compile (compile) @ test-11 --- [ERROR] C:\\path\\to\\MyFile.kt: (3,...
testParseKotlinError
19,378
void () { String expectedFileName = FileUtil.toSystemDependentName("C:\\path\\to\\MyFile.java"); String expectedMessage = "Line matches the illegal pattern 'System\\.(out|err).*?$'. [RegexpSinglelineJava]"; testCase(""" [INFO] Starting audit... [ERROR] C:\\path\\to\\MyFile.java:9: Line matches the illegal pattern 'Syst...
testParseJavaCheckstyle
19,379
List<String> (String line) { if (!line.endsWith("\n")) { line += '\n'; } Filter.Result result = myFilter.applyFilter(line, line.length()); if (result == null) return Collections.emptyList(); List<String> res = new ArrayList<>(); for (Filter.ResultItem item : result.getResultItems()) { res.add(line.substring(item.getHig...
passLine
19,380
void () { myFixture.addClass(""" public class CccTest { public void testTtt() {} public void testTtt2() {} }"""); String tempDirPath = myFixture.getTempDirPath(); assertEquals(passLine("[INFO] Scanning for projects..."), Collections.emptyList()); assertEquals(passLine("[INFO] Surefire report directory: " + tempDirPath)...
testSurefire2_14
19,381
void () {}
testTtt
19,382
void () {}
testTtt2
19,383
void () { myFixture.addFileToProject(".mvn/maven.config", "-o -U -N -T3 -q -X -e -C -c -ff -fae -fn" + " -s user-settings.xml -gs global-settings.xml"); MavenConfig config = MavenConfigParser.parse(myFixture.getTempDirPath()); Assert.assertTrue(config.hasOption(MavenConfigSettings.OFFLINE)); Assert.assertTrue(config.ha...
testParseShortNames
19,384
void () { myFixture.addFileToProject(".mvn/maven.config", "--offline --update-snapshots --non-recursive --quiet --debug --errors --strict-checksums " + "--lax-checksums --fail-fast --fail-at-end --fail-never --threads 3 " + "--settings user-settings.xml --global-settings global-settings.xml"); MavenConfig config = Mave...
testParseLongNames
19,385
void () { myFixture.addFileToProject(".mvn/maven.config", "-unknown -ZZ --badprop"); MavenConfig config = MavenConfigParser.parse(myFixture.getTempDirPath()); Assert.assertTrue(config.isEmpty()); }
testUnknownNames
19,386
void () { MavenRunnerSettings runnerSettings = new MavenRunnerSettings(); runnerSettings.setVmOptions("-Xmx400m"); String vmOptions = MavenExternalParameters.getRunVmOptions(runnerSettings, myProject, getProjectPath()); assertEquals("-Xmx400m", vmOptions); }
testGetRunVmOptionsSettings
19,387
void () { MavenRunConfiguration.MavenSettings s = new MavenRunConfiguration.MavenSettings(myProject); s.myRunnerParameters.setWorkingDirPath("some path"); s.myRunnerParameters.setGoals(Arrays.asList("clean", "validate")); s.myRunnerParameters.setProfilesMap(ImmutableMap.<String, Boolean>builder() .put("prof1", true) .p...
testSaveLoadRunnerParameters
19,388
void (JavaParameters parameters, MavenConfigSettings mavenConfigSettings) { Assert.assertFalse(parameters.getProgramParametersList().hasParameter(mavenConfigSettings.getLongKey())); Assert.assertFalse(parameters.getProgramParametersList().hasParameter(mavenConfigSettings.getKey())); }
notContainMavenKey
19,389
void (JavaParameters parameters, MavenConfigSettings mavenConfigSettings) { Assert.assertTrue(parameters.getProgramParametersList().hasParameter(mavenConfigSettings.getLongKey()) || parameters.getProgramParametersList().hasParameter(mavenConfigSettings.getKey())); }
containMavenKey
19,390
void () { VirtualFile m = createModulePom("m", """ <groupId>test</groupId> <artifactId>m</artifactId> <version>1</version> <dependencies> <dependency> <groupId>test</groupId> <artifactId>dep</artifactId> <version>1</version> </dependency> </dependencies> """); VirtualFile dep = createModulePom("dep", """ <groupId>test<...
testDoNotIncludeTargetDirectoriesOfModuleDependenciesToLibraryClassesRoots
19,391
void () { VirtualFile m1 = createModulePom("m1", """ <groupId>test</groupId> <artifactId>m1</artifactId> <version>1</version> <dependencies> <dependency> <groupId>test</groupId> <artifactId>m2</artifactId> <version>1</version> </dependency> </dependencies> """); VirtualFile m2 = createModulePom("m2", """ <groupId>test<...
testLibraryScopeForTwoDependentModules
19,392
void (List<Module> modules) { assertEquals(6, modules.size()); ProjectFileIndex index = ProjectFileIndex.getInstance(myProject); VirtualFile m3JavaDir = VfsUtil.findFileByIoFile(new File(getProjectPath(), "m3/src/main/java"), true); assertNotNull(m3JavaDir); // Should be: m1 -> m3, m2 -> m3, m3 -> source, and m4 -> m3 ...
checkDirIndexTestModulesWithCompileOrRuntimeScope
19,393
List<Module> (List<OrderEntry> orderEntries) { return ContainerUtil.map(orderEntries, orderEntry -> orderEntry.getOwnerModule()); }
orderEntriesToOwnerModules
19,394
List<Module> (List<OrderEntry> orderEntries) { return ContainerUtil.map(orderEntries, orderEntry -> (orderEntry instanceof ModuleOrderEntry) ? ((ModuleOrderEntry)orderEntry).getModule() : null); }
orderEntriesToDepModules
19,395
void (String... modules) { for (String each : modules) { assertModuleSearchScope(each, getProjectPath() + "/" + each + "/src/main/java", getProjectPath() + "/" + each + "/src/test/java"); } }
assertModuleScopes
19,396
void (String moduleName, String... paths) { assertSearchScope(moduleName, Scope.MODULE, null, paths); }
assertModuleSearchScope
19,397
void (String moduleName, String... paths) { assertCompileProductionSearchScope(moduleName, paths); assertRuntimeProductionSearchScope(moduleName, paths); }
assertAllProductionSearchScope
19,398
void (String moduleName, String... paths) { assertCompileTestsSearchScope(moduleName, paths); assertRuntimeTestsSearchScope(moduleName, paths); }
assertAllTestsSearchScope
19,399
void (String moduleName, String... paths) { assertSearchScope(moduleName, Scope.COMPILE, Type.PRODUCTION, paths); }
assertCompileProductionSearchScope