Java Code Examples for com.intellij.openapi.roots.ContentEntry#getUrl()
The following examples show how to use
com.intellij.openapi.roots.ContentEntry#getUrl() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MavenImportingTestCase.java From intellij-quarkus with Eclipse Public License 2.0 | 6 votes |
private static void doAssertContentFolders(ContentEntry e, final List<? extends ContentFolder> folders, String... expected) { List<String> actual = new ArrayList<>(); for (ContentFolder f : folders) { String rootUrl = e.getUrl(); String folderUrl = f.getUrl(); if (folderUrl.startsWith(rootUrl)) { int length = rootUrl.length() + 1; folderUrl = folderUrl.substring(Math.min(length, folderUrl.length())); } actual.add(folderUrl); } assertOrderedElementsAreEqual(actual, Arrays.asList(expected)); }
Example 2
Source File: GenericSourceFolderProvider.java From intellij with Apache License 2.0 | 4 votes |
@Override public ImmutableMap<File, SourceFolder> initializeSourceFolders(ContentEntry contentEntry) { String url = contentEntry.getUrl(); return ImmutableMap.of(UrlUtil.urlToFile(url), contentEntry.addSourceFolder(url, false)); }