Skip to content

JavaRenderer should receive SourceFileSet only with .java files #23

Description

@alexander-yevsyukov

This issue is related to #17, but occurs to JavaRenderers. For example, in mc-java I had to add the below code so that only Java files are processed:

override fun render(sources: SourceFileSet) {
    // We could receive `grpc` or `kotlin` output roots here. Now we do only `java`.
    if (!sources.outputRoot.endsWith("java")) {
        return
    }
    ...
}       

The manipulation with the name of the output root works here because I know for sure that grpc directory is not going to have rejection types. But in general we need to take care about the content of the file set. See io.spine.tools.mc.java.rejection.RejectionRenderer for details.

As a developer I expect that only .java files are passed to a descendant of the class called JavaRenderer.

Prior work

There was an attempt to address this issue in ProtoData.
We need to analyse this PR in terms of the suggested terminology and implementation approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions