use of com.developmentontheedge.be5.metadata.serialization.ProjectFileSystem in project be5 by DevelopmentOnTheEdge.
the class YamlSerializer method serialize.
public void serialize(final LanguageLocalizations languageLocalizations) throws WriteException {
this.fileSystem = new ProjectFileSystem(languageLocalizations.getProject());
new LocalizationSerializer().serialize(languageLocalizations);
}
use of com.developmentontheedge.be5.metadata.serialization.ProjectFileSystem in project be5 by DevelopmentOnTheEdge.
the class ProjectFileSystemTest method testPathsMap.
@Test
public void testPathsMap() throws IOException {
Project prj = new Project("test");
Path root = tmp.newFolder().toPath();
prj.setLocation(root);
ProjectFileSystem pfs = new ProjectFileSystem(prj);
Map<Path, Boolean> map = EntryStream.of(pfs.getPaths()).mapKeys(root::relativize).toSortedMap();
assertTrue(StreamEx.of("", "src", "src/js/extenders", "src/js/forms", "src/js/operations", "src/js/queries", "src/l10n", "src/meta/data", "src/meta/entities").map(Paths::get).noneMatch(map::get));
assertTrue(StreamEx.of("src/ftl", "src/include", "src/meta/modules", "src/groovy/operations", "src/pages").map(Paths::get).allMatch(map::get));
}
use of com.developmentontheedge.be5.metadata.serialization.ProjectFileSystem in project be5 by DevelopmentOnTheEdge.
the class ModuleLoader2 method getFileSystem.
/**
* Returns BeanExplorerProjectFileSystem for given module if possible
*/
public static ProjectFileSystem getFileSystem(Project app, String moduleName) {
if (app.getProjectOrigin().equals(moduleName)) {
return new ProjectFileSystem(app);
}
Path modulePath = ModuleLoader2.getModulePath(moduleName);
if (modulePath != null) {
Project project = new Project(moduleName);
project.setLocation(modulePath);
project.setProjectFileStructure(new ProjectFileStructure(project));
return new ProjectFileSystem(project);
}
return null;
}
Aggregations