Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
255,100
void () { UIUtil.dispatchAllInvocationEvents(); }
letSaveAllDocumentsPassIfAny
255,101
void (Runnable r) { letSaveAllDocumentsPassIfAny(); watchDocumentChanges(r::run, event -> { Document changed = event.getDocument(); VirtualFile file = FileDocumentManager.getInstance().getFile(changed); if (file != null && file.isInLocalFileSystem()) { throw new AssertionError("Unexpected document change: " + changed);...
prohibitDocumentChanges
255,102
void (@NotNull DocumentEvent event) { eventHandler.accept(event); }
documentChanged
255,103
void (Project project, Runnable r) { Label label = LocalHistory.getInstance().putUserLabel(project, "changeAndRevert"); boolean failed = false; try { r.run(); } catch (Throwable e) { failed = true; throw e; } finally { restoreEverything(label, failed, project); } }
changeAndRevert
255,104
void (Label label, boolean failed, Project project) { try { WriteAction.run(() -> { PsiDocumentManager documentManager = PsiDocumentManager.getInstance(project); new RunAll( () -> PostprocessReformattingAspect.getInstance(project).doPostponedFormatting(), () -> FileEditorManagerEx.getInstanceEx(project).closeAllFiles()...
restoreEverything
255,105
void (@NotNull Project project, @NotNull Language fileLanguage, String @NotNull... except) { InspectionProfileImpl.INIT_INSPECTIONS = true; InspectionProfileImpl profile = new InspectionProfileImpl("allEnabled"); profile.enableAllTools(project); disableInspection(project, profile, "HighlightVisitorInternal"); for (Stri...
enableAllInspections
255,106
void (@NotNull Project project, @NotNull Language fileLanguage) { InspectionProfileImpl profile = new InspectionProfileImpl("defaultInspections"); InspectionsKt.runInInitMode(() -> { replaceProfile(project, profile, fileLanguage); return null; }); }
enableDefaultInspections
255,107
void (@NotNull Project project, @NotNull InspectionProfileImpl profile, @NotNull Language fileLanguage) { // instantiate all tools to avoid extension loading in inconvenient moment profile.getAllEnabledInspectionTools(project).forEach(state -> { InspectionToolWrapper<?, ?> wrapper = state.getTool(); String inspectionLa...
replaceProfile
255,108
void (Project project, InspectionProfileImpl profile, String shortId) { ToolsImpl tools = profile.getToolsOrNull(shortId, project); if (tools != null) { tools.setEnabled(false); } }
disableInspection
255,109
Generator<File> (String rootPath, FileFilter fileFilter) { return randomFiles(rootPath, fileFilter, USE_ROULETTE_WHEEL); }
randomFiles
255,110
Generator<File> (String rootPath, FileFilter fileFilter, boolean useRouletteWheel) { FileFilter interestingIdeaFiles = child -> { String name = child.getName(); if (name.startsWith(".")) return false; if (child.isDirectory()) { return shouldGoInsiderDir(name); } return !FileTypeManager.getInstance().getFileTypeByFileNa...
randomFiles
255,111
boolean (File file) { return file != null; }
test
255,112
String () { return "can find a file under " + rootPath + " satisfying given filters"; }
toString
255,113
Supplier<MadTestingAction> (CodeInsightTestFixture fixture, String rootPath, FileFilter fileFilter, Function<? super PsiFile, ? extends Generator<? extends MadTestingAction>> actions) { return performOnFileContents(fixture, rootPath, fileFilter, (env, vFile) -> env.executeCommands(Generator.from(data -> data.generate(a...
actionsOnFileContents
255,114
Supplier<MadTestingAction> (CodeInsightTestFixture fixture, String rootPath, FileFilter fileFilter, BiConsumer<? super ImperativeCommand.Environment, ? super VirtualFile> action) { Generator<File> randomFiles = randomFiles(rootPath, fileFilter); return () -> env -> new RunAll( () -> { File ioFile = env.generateValue(ra...
performOnFileContents
255,115
boolean (@NotNull String name) { return !name.equals("gen") // https://youtrack.jetbrains.com/issue/IDEA-175404 && !name.equals("reports") // no idea what this is && !name.equals("android") // no 'android' repo on agents in some builds && canContainSources(name) && !name.endsWith("system") && !name.endsWith("config") /...
shouldGoInsiderDir
255,116
boolean (@NotNull String name) { return !name.equals("jdk") && !name.equals("jre") && !name.equals("lib") && !name.equals("bin") && !name.equals("out") && !name.startsWith(".") // .gradle/.git/.idea have too many irrelevant files but no sources ; }
canContainSources
255,117
VirtualFile (File ioFile, CodeInsightTestFixture fixture, String rootPath) { try { String path = FileUtil.getRelativePath(FileUtil.toCanonicalPath(rootPath), FileUtil.toSystemIndependentName(ioFile.getPath()), '/'); assert path != null; Matcher rootPackageMatcher = Pattern.compile("/com/|/org/|/onair/").matcher(path); ...
copyFileToProject
255,118
Generator<MadTestingAction> (@NotNull PsiFile file) { return Generator.sampledFrom( new InsertString(file), new DeleteRange(file), new CommitDocumentAction(file), new CheckPsiTextConsistency(file) ); }
randomEditsWithReparseChecks
255,119
boolean (PsiFile file, int offset) { return SyntaxTraverser.psiTraverser(file).filter(PsiErrorElement.class).find(e -> e.getTextRange().getStartOffset() <= offset) != null; }
isAfterError
255,120
boolean (FileViewProvider viewProvider) { return ContainerUtil.exists(viewProvider.getAllFiles(), file -> SyntaxTraverser.psiTraverser(file).filter(PsiErrorElement.class).isNotEmpty()); }
containsErrorElements
255,121
String (int offset, Document document) { int line = document.getLineNumber(offset); int start = document.getLineStartOffset(line); int end = document.getLineEndOffset(line); int column = offset - start; String prefix = document.getText(new TextRange(start, offset)).trim(); if (prefix.length() > 30) { prefix = "..." + p...
getPositionDescription
255,122
String (IntentionAction action) { return getIntentionDescription(action.getText(), action); }
getIntentionDescription
255,123
String (String intentionName, IntentionAction action) { IntentionAction actual = IntentionActionDelegate.unwrap(action); ModCommandAction command = action.asModCommandAction(); String family = actual.getFamilyName(); Class<?> aClass = command != null ? command.getClass() : actual.getClass(); LocalQuickFix fix = QuickFi...
getIntentionDescription
255,124
void (File root, FileFilter filter, int iterationCount, PrintStream out) { /* Typical output: Roulette wheel generator: #10000: sum = 5281 [1: 3770 | 2: 767 | 3: 272 | 4..5: 232 | 6..10: 146 | 11..20: 67 | 21..30: 12 | 31..50: 12 | 51..100: 3 | 101..200: 0 | 201+: 0] Plain generator: #10000: sum = 2504 [1: 1478 | 2: 39...
testFileGenerator
255,125
String (ObjectIntMap<String> fileMap, int iteration) { long[] stops = {1, 2, 3, 5, 10, 20, 30, 50, 100, 200, Long.MAX_VALUE}; int[] histogram = new int[stops.length]; for (ObjectIntMap.Entry<String> entry : fileMap.entries()) { int count = entry.getValue(); int pos = Arrays.binarySearch(stops, count); if (pos < 0) { po...
getHistogramReport
255,126
File (GenerationEnvironment data) { return generateRandomFile(data, myRoot, new HashSet<>()); }
apply
255,127
File (GenerationEnvironment data, File file, Set<? super File> exhausted) { while (true) { File[] children = file.listFiles(f -> !exhausted.contains(f) && containsAtLeastOneFileDeep(f) && myFilter.accept(f)); if (children == null) { return file; } if (children.length == 0) { exhausted.add(file); return null; } List<Fil...
generateRandomFile
255,128
boolean (File root) { return FS_TRAVERSAL.fun(root).find(f -> f.isFile()) != null; }
containsAtLeastOneFileDeep
255,129
List<File> (GenerationEnvironment data, File[] children) { List<File> files = new ArrayList<>(); List<File> dirs = new ArrayList<>(); for (File child : children) { (child.isDirectory() ? dirs : files).add(child); } if (files.isEmpty() || dirs.isEmpty()) { return Arrays.asList(children); } int ratio = Math.max(100, dirs...
preferDirs
255,130
File[] (@NotNull File f) { File[] files = f.listFiles(child -> myFilter.accept(child) && (child.isFile() || FileGenerator.containsAtLeastOneFileDeep(child))); if (files == null) { return null; } if (files.length == 0) { return EMPTY_DIRECTORY; } return files; }
create
255,131
File (GenerationEnvironment data) { return generateRandomFile(data, myRoot, new HashSet<>()); }
apply
255,132
File (GenerationEnvironment data, File file, Set<File> exhausted) { File[] children = myChildrenCache.get(file); if (children == null) { return file; } if (children == EMPTY_DIRECTORY) { return null; } Arrays.sort(children, Comparator.comparing(File::getName)); while (true) { int[] weights = Arrays.stream(children).map...
generateRandomFile
255,133
int (@NotNull GenerationEnvironment data, int @NotNull [] weights) { int totalWeight = Arrays.stream(weights).sum(); if (totalWeight == 0) return -1; int value = data.generate(Generator.integers(0, totalWeight)); for (int i = 0; i < weights.length; i++) { value -= weights[i]; if (value < 0) { return i; } } return -1; }
spin
255,134
int (File file, @NotNull Set<File> exhausted) { if (exhausted.contains(file)) return 0; File[] children = myChildrenCache.get(file); if (children == null) return 1; return Stream.of(children).mapToInt(f -> exhausted.contains(f) ? 0 : f.isDirectory() ? 5 : 1).sum(); }
estimateWeight
255,135
void (@NotNull Environment env) { env.logMessage(toString()); for (FileEditor editor : FileEditorManager.getInstance(myProject).getAllEditors()) { if (editor instanceof TextEditor) { highlightEditor(((TextEditor)editor).getEditor(), myProject); } } }
performCommand
255,136
String () { return "RehighlightAllEditors"; }
toString
255,137
List<HighlightInfo> (Editor editor, Project project) { FileDocumentManager.getInstance().saveAllDocuments(); // to avoid async document changes on automatic save during highlighting PsiDocumentManager.getInstance(project).commitAllDocuments(); PsiUtilBase.assertEditorAndProjectConsistent(project, editor); PsiFile file ...
highlightEditor
255,138
void (@NotNull Object component) { if (component == SINK) { return; } // Re-register this interceptor to be able to intercept one more UI component if any UiInterceptors.register(this); if (component instanceof JBPopup popup) { // effective there is a chain of 3 nonBlockingRead actions for (int i = 0; i < 3; i++) { JBL...
doIntercept
255,139
void (@NotNull Environment env) { PsiFile psiFile = getFile(); int startOffset = generatePsiOffset(env, null); int endOffset = Math.min(psiFile.getTextLength(), startOffset + env.generateValue(Generator.integers(IntDistribution.geometric(10)).noShrink(), null)); PsiElement start = psiFile.findElementAt(startOffset); Ps...
performCommand
255,140
boolean (@NotNull IntentionAction action) { if ((!action.startInWriteAction() && action.asModCommandAction() == null) || shouldSkipIntention(action.getText())) { return false; } IntentionAction original = IntentionActionDelegate.unwrap(action); String familyName; LocalQuickFix fix = QuickFixWrapper.unwrap(original); if...
mayInvokeIntention
255,141
boolean (@NotNull String actionText) { return actionText.startsWith("Typo: Change to...") || // doesn't change file text (starts live template); actionText.startsWith("Convert to project line separators"); // changes VFS, not document }
shouldSkipIntention
255,142
boolean (@NotNull String familyName) { return false; }
shouldSkipByFamilyName
255,143
boolean (@NotNull IntentionAction action) { return false; }
shouldCheckPreview
255,144
boolean (@NotNull IntentionAction action, @NotNull Editor editor, @NotNull PsiFile file) { return "Flip ','".equals(action.getText()); // just does text operations, doesn't care about correctness }
mayBreakCode
255,145
boolean (IntentionAction intention) { return false; }
checkComments
255,146
boolean (PsiComment comment) { return true; }
trackComment
255,147
List<PsiElement> (@NotNull PsiElement currentElement) { return Collections.emptyList(); }
getElementsToWrap
255,148
String () { return "";}
getWrapPrefix
255,149
String () { return "";}
getWrapSuffix
255,150
boolean (@NotNull HighlightInfo info) { return false; }
shouldTolerateIntroducedError
255,151
void (@NotNull Environment env) { env.logMessage(toString()); Editor editor = FileEditorManager.getInstance(getProject()).getSelectedTextEditor(); assert editor.getDocument() == getDocument(); performCheck(editor); }
performCommand
255,152
void (@NotNull Editor editor) { LexerEditorHighlighter highlighter = (LexerEditorHighlighter)editor.getHighlighter(); CharSequence text = editor.getDocument().getImmutableCharSequence(); String incremental = dumpHighlighterTokens(highlighter, text); highlighter.setText(""); highlighter.setText(text); String full = dump...
performCheck
255,153
String (LexerEditorHighlighter highlighter, CharSequence text) { StringBuilder tokens = new StringBuilder(); HighlighterIterator iterator = highlighter.createIterator(0); while (!iterator.atEnd()) { tokens.append(iterator.getStart()).append(" ") .append(LexerTestCase.printSingleToken(text, iterator.getTokenType(), iter...
dumpHighlighterTokens
255,154
void (@NotNull Environment env) { PsiDocumentManager.getInstance(getProject()).commitAllDocuments(); int offset = generateDocOffset(env, null); env.logMessage("Go to " + MadTestingUtil.getPositionDescription(offset, getDocument())); doInvokeIntention(offset, env); }
performCommand
255,155
IntentionAction (@NotNull Environment env, List<? extends IntentionAction> actions) { if (actions.isEmpty()) { env.logMessage("No intentions found"); return null; } IntentionAction result = env.generateValue(Generator.sampledFrom(actions).noShrink(), null); env.logMessage("Invoke intention " + MadTestingUtil.getIntenti...
chooseIntention
255,156
void (int offset, Environment env) { Project project = getProject(); Editor editor = FileEditorManager.getInstance(project).openTextEditor(new OpenFileDescriptor(project, getVirtualFile(), offset), true); assert editor != null; FileViewProvider viewProvider = getFile().getViewProvider(); boolean containsErrorElements =...
doInvokeIntention
255,157
void (IntentionAction intention, Editor editor) { IntentionAction unwrapped = IntentionActionDelegate.unwrap(intention); // Suppress actions are under submenu, no preview is generated for them anyway if (unwrapped instanceof SuppressIntentionAction) return; IntentionPreviewInfo previewInfo; try { // Should not require ...
checkPreview
255,158
List<IntentionAction> (Environment env, Editor editor, PsiElement currentElement, boolean hasErrors, List<IntentionAction> intentions) { if (currentElement == null) return intentions; int offset = editor.getCaretModel().getOffset(); /* * When start offset of the element exactly equals to offset in the editor, we have a...
wrapAndCheck
255,159
String (Map<String, IntentionAction> intentionMap) { return intentionMap.entrySet().stream() .map(entry -> MadTestingUtil.getIntentionDescription(entry.getKey(), entry.getValue())) .map("\t"::concat) .collect(Collectors.joining("\n")); }
describeIntentions
255,160
void () { PushedFilePropertiesUpdater.getInstance(getProject()).filePropertiesChanged(getVirtualFile(), Conditions.alwaysTrue()); }
restoreAfterPotentialPsiTextInconsistency
255,161
List<String> (PsiFile file) { return PsiTreeUtil.findChildrenOfType(file, PsiComment.class) .stream() .filter(myPolicy::trackComment) .map(PsiElement::getText) .map(text -> text.replaceAll("[\\s*]+", " ")) .collect(Collectors.toList()); }
extractCommentsReformattedToSingleWhitespace
255,162
void (Project project, Editor editor, String intentionString, IntentionPolicy policy) { List<HighlightInfo> errors = ContainerUtil.filter(highlightErrors(project, editor), info -> policy.shouldTolerateIntroducedError(info)); if (!errors.isEmpty()) { throw new AssertionError("New highlighting errors introduced after inv...
checkNoNewErrors
255,163
String (HighlightInfo info) { return "'" + info.getDescription() + "'(" + info.startOffset + "," + info.endOffset + ")"; }
shortInfoText
255,164
List<HighlightInfo> (Project project, Editor editor) { List<HighlightInfo> infos = RehighlightAllEditors.highlightEditor(editor, project); return ContainerUtil.filter(infos, i -> i.getSeverity() == HighlightSeverity.ERROR); }
highlightErrors
255,165
Document (IntentionAction intention) { PsiElement changedElement = intention.getElementToMakeWritable(getFile()); PsiFile changedFile = changedElement == null ? null : changedElement.getContainingFile(); return changedFile == null ? null : changedFile.getViewProvider().getDocument(); }
getDocumentToBeChanged
255,166
List<IntentionAction> (Editor editor, PsiFile file) { List<IntentionAction> actions = ContainerUtil.filter(CodeInsightTestFixtureImpl.getAvailableIntentions(editor, file), myPolicy::mayInvokeIntention); if (actions.isEmpty()) return Collections.emptyList(); // skip only after checking intentions for applicability, to c...
getAvailableIntentions
255,167
File () { File dir = new File(FileUtil.getTempDirectory()); dir = expandWindowsPath(dir); return dir; }
getTempDirectory
255,168
File (File file) { if (SystemInfo.isWindows && file.getPath().indexOf('~') > 0) { try { return file.getCanonicalFile(); } catch (IOException ignored) { } } return file; }
expandWindowsPath
255,169
File (@NotNull String target, @NotNull String link) { return createSymLink(target, link, true); }
createSymLink
255,170
File (@NotNull String target, @NotNull String link, boolean shouldExist) { File linkFile = getFullLinkPath(link); try { Files.createSymbolicLink(linkFile.toPath(), Path.of(target)); } catch (IOException e) { throw new UncheckedIOException(e); } assertEquals("target=" + target + ", link=" + linkFile, shouldExist, linkFi...
createSymLink
255,171
File (@NotNull String target, @NotNull String junction) { assertTrue(SystemInfo.isWindows); File targetFile = new File(target); assertTrue(targetFile.getPath(), targetFile.isDirectory()); File junctionFile = getFullLinkPath(junction); runCommand("cmd", "/C", "mklink", "/J", junctionFile.getPath(), targetFile.getPath())...
createJunction
255,172
void (@NotNull String junction) { assertTrue(SystemInfo.isWindows); assertTrue(new File(junction).delete()); }
deleteJunction
255,173
void (@NotNull String target, @NotNull Consumer<? super @NotNull File> createdSubstTester) { assertTrue(SystemInfo.isWindows); File targetFile = new File(target); assertTrue(targetFile.getPath(), targetFile.isDirectory()); String substRoot = getFirstFreeDriveLetter() + ":"; runCommand("subst", substRoot, targetFile.get...
performTestOnWindowsSubst
255,174
void (@NotNull String path) { runCommand("mkfifo", path); }
createFifo
255,175
char () { Set<Character> roots = StreamSupport.stream(FileSystems.getDefault().getRootDirectories().spliterator(), false) .map(root -> StringUtil.toUpperCase(root.toString()).charAt(0)) .collect(Collectors.toSet()); Logger.getInstance(IoTestUtil.class).debug("logical drives: " + roots); for (char c = 'E'; c <= 'Z'; c++...
getFirstFreeDriveLetter
255,176
File (String link) { File linkFile = new File(link); if (!linkFile.isAbsolute()) { linkFile = new File(getTempDirectory(), link); } assertTrue(link, !linkFile.exists() || linkFile.delete()); File parentDir = linkFile.getParentFile(); assertTrue("link=" + link + ", parent=" + parentDir, parentDir != null && (parentDir.i...
getFullLinkPath
255,177
String (String... command) { try { GeneralCommandLine cmd = new GeneralCommandLine(command).withRedirectErrorStream(true); ProcessOutput output = ExecUtil.execAndGetOutput(cmd, 30_000); String out = output.getStdout().trim(); if (output.getExitCode() != 0) { fail("failed: " + cmd + "\n" + "exit code: " + output.getExit...
runCommand
255,178
File (@NotNull File jarFile) { return createTestJar(jarFile, JarFile.MANIFEST_NAME, ""); }
createTestJar
255,179
File (@NotNull File jarFile, String @NotNull ... namesAndTexts) { try (ZipOutputStream stream = new ZipOutputStream(new FileOutputStream(jarFile))) { for (int i = 0; i < namesAndTexts.length; i += 2) { stream.putNextEntry(new ZipEntry(namesAndTexts[i])); if (namesAndTexts[i + 1] != null) stream.write(namesAndTexts[i + ...
createTestJar
255,180
File (@NotNull File jarFile, @NotNull Collection<? extends Pair<String, byte[]>> namesAndContents) { try (ZipOutputStream stream = new ZipOutputStream(new FileOutputStream(jarFile))) { for (Pair<String, byte[]> p : namesAndContents) { String name = p.first; byte[] content = p.second; stream.putNextEntry(new ZipEntry(na...
createTestJar
255,181
File (@NotNull File jarFile, @NotNull File root) { try (ZipOutputStream stream = new ZipOutputStream(new FileOutputStream(jarFile))) { FileUtil.visitFiles(root, file -> { if (file.isFile()) { String path = FileUtil.toSystemIndependentName(Objects.requireNonNull(FileUtil.getRelativePath(root, file))); try { stream.putNe...
createTestJar
255,182
File (@NotNull String name) { return createTestDir(getTempDirectory(), name); }
createTestDir
255,183
File (@NotNull File parent, @NotNull String name) { File dir = new File(parent, name); assertTrue(dir.getPath(), dir.mkdirs()); return dir; }
createTestDir
255,184
File (@NotNull String name) { return createTestFile(name, null); }
createTestFile
255,185
File (@NotNull String name, @Nullable String content) { return createTestFile(getTempDirectory(), name, content); }
createTestFile
255,186
File (@NotNull File parent, @NotNull String name) { return createTestFile(parent, name, null); }
createTestFile
255,187
File (@NotNull File parent, @NotNull String name, @Nullable String content) { try { assertTrue(parent.getPath(), parent.isDirectory() || parent.mkdirs()); File file = new File(parent, name); assertTrue(file.getPath(), file.createNewFile()); if (content != null) { FileUtil.writeToFile(file, content); } return file; } ca...
createTestFile
255,188
void (File @NotNull ... files) { for (File file : files) { if (file != null) { FileUtil.delete(file); } } }
delete
255,189
void (@NotNull File file, @NotNull String content) { try { FileUtil.writeToFile(file, content); } catch (IOException e) { throw new RuntimeException(e); } }
writeToFile
255,190
boolean () { try { Path target = Files.createTempFile("IOTestUtil_link_target.", ".txt"); try { Path link = target.getParent().resolve("IOTestUtil_link"); try { Files.createSymbolicLink(link, target.getFileName()); return true; } finally { Files.deleteIfExists(link); } } finally { Files.delete(target); } } catch (Throw...
canCreateSymlinks
255,191
String (@NotNull String localPath) { return "\\\\127.0.0.1\\" + localPath.charAt(0) + '$' + localPath.substring(2); }
toLocalUncPath
255,192
boolean (@NotNull String name) { try { GeneralCommandLine cmd = new GeneralCommandLine("wsl", "-d", name, "-e", "pwd").withRedirectErrorStream(true); ProcessOutput output = ExecUtil.execAndGetOutput(cmd, 30_000); if (output.getExitCode() == 0) { return true; } else { Logger.getInstance(IoTestUtil.class).debug(output.ge...
reanimateWslDistribution
255,193
String () { assumeWindows(); assumeWslPresence(); var distributions = enumerateWslDistributions(); assumeTrue("No WSL distributions found", !distributions.isEmpty()); for (var distribution : distributions) { if (reanimateWslDistribution(distribution)) { return distribution; } } //noinspection DataFlowIssue assumeTrue("...
assumeWorkingWslDistribution
255,194
String () { return PlatformTestUtil.getCommunityPath(); }
getCommunityHomePath
255,195
String (Class<?> testClass) { TestDataLookupStrategy strategy = isLocatedInCommunity() ? TestDataLookupStrategy.COMMUNITY : determineLookupStrategy(testClass); return strategy == TestDataLookupStrategy.COMMUNITY_FROM_ULTIMATE ? getCommunityHomePath() : PathManager.getHomePath(); }
getHomePath
255,196
File (@NotNull String relativePath) { return findFileByRelativePath(getCommunityHomePath(), relativePath).toFile(); }
findFileUnderCommunityHome
255,197
File (@NotNull String relativePath, Class<? extends TestCase> testClass) { return findFileByRelativePath(getHomePath(testClass), relativePath).toFile(); }
findFileUnderProjectHome
255,198
Path (@NotNull String homePath, @NotNull String relativePath) { Path file = Paths.get(homePath, relativePath); if (!Files.exists(file)) { throw new IllegalArgumentException("Cannot find file '" + relativePath + "' under '" + homePath + "' directory"); } return file; }
findFileByRelativePath
255,199
boolean () { FileSystemLocation projectLocation = parseProjectLocation(); return projectLocation == FileSystemLocation.COMMUNITY; // There are no other options then. }
isLocatedInCommunity