diff --git a/pkg/gen/filters/filterjava/filters.go b/pkg/gen/filters/filterjava/filters.go index c6d66de8..9efcef77 100644 --- a/pkg/gen/filters/filterjava/filters.go +++ b/pkg/gen/filters/filterjava/filters.go @@ -2,8 +2,7 @@ package filterjava import "text/template" -func PopulateFuncMap() template.FuncMap { - fm := make(template.FuncMap) +func PopulateFuncMap(fm template.FuncMap) { fm["javaDefault"] = javaDefault fm["javaReturn"] = javaReturn fm["javaParam"] = javaParam @@ -12,5 +11,4 @@ func PopulateFuncMap() template.FuncMap { fm["javaVars"] = javaVars fm["javaType"] = javaType fm["javaExtern"] = javaExtern - return fm } diff --git a/pkg/gen/filters/funcmap.go b/pkg/gen/filters/funcmap.go index 6c12f2ef..8a930668 100644 --- a/pkg/gen/filters/funcmap.go +++ b/pkg/gen/filters/funcmap.go @@ -6,6 +6,7 @@ import ( "github.com/apigear-io/cli/pkg/gen/filters/common" "github.com/apigear-io/cli/pkg/gen/filters/filtercpp" "github.com/apigear-io/cli/pkg/gen/filters/filtergo" + "github.com/apigear-io/cli/pkg/gen/filters/filterjava" "github.com/apigear-io/cli/pkg/gen/filters/filterjs" "github.com/apigear-io/cli/pkg/gen/filters/filterpy" "github.com/apigear-io/cli/pkg/gen/filters/filterqt" @@ -26,6 +27,7 @@ func PopulateFuncMap() template.FuncMap { filterqt.PopulateFuncMap(fm) filterjs.PopulateFuncMap(fm) filterrs.PopulateFuncMap(fm) + filterjava.PopulateFuncMap(fm) return fm }