Search in sources :

Example 1 with SourceFile

use of com.developmentontheedge.be5.metadata.model.SourceFile in project be5 by DevelopmentOnTheEdge.

the class YamlSerializer method serializeSources.

private void serializeSources(final Project project) throws WriteException {
    for (SourceFileCollection collection : project.getApplication().getSourceFiles()) {
        for (final SourceFile file : collection) {
            if (!file.isLoaded())
                continue;
            try {
                fileSystem.writeSourceFile(collection.getName(), file.getName(), file.getSource());
                file.setLinkedFile(fileSystem.getNameSpaceFile(collection.getName(), file.getName()));
            } catch (final IOException e) {
                throw new WriteException(file, e);
            }
        }
    }
}
Also used : WriteException(com.developmentontheedge.be5.metadata.exception.WriteException) SourceFile(com.developmentontheedge.be5.metadata.model.SourceFile) IOException(java.io.IOException) SourceFileCollection(com.developmentontheedge.be5.metadata.model.SourceFileCollection)

Aggregations

WriteException (com.developmentontheedge.be5.metadata.exception.WriteException)1 SourceFile (com.developmentontheedge.be5.metadata.model.SourceFile)1 SourceFileCollection (com.developmentontheedge.be5.metadata.model.SourceFileCollection)1 IOException (java.io.IOException)1