From 35cdd40f37f534263114da2ce82612e6d814724c Mon Sep 17 00:00:00 2001 From: Philip Makedonski Date: Thu, 11 Jan 2024 17:41:32 +0100 Subject: [PATCH] + updated yang translator --- .../mts/tdl/yang2tdl/Yang2TDLTranslator.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/plugins/org.etsi.mts.tdl.yang2tdl/src/org/etsi/mts/tdl/yang2tdl/Yang2TDLTranslator.java b/plugins/org.etsi.mts.tdl.yang2tdl/src/org/etsi/mts/tdl/yang2tdl/Yang2TDLTranslator.java index a3787b46..9a96ccf8 100644 --- a/plugins/org.etsi.mts.tdl.yang2tdl/src/org/etsi/mts/tdl/yang2tdl/Yang2TDLTranslator.java +++ b/plugins/org.etsi.mts.tdl.yang2tdl/src/org/etsi/mts/tdl/yang2tdl/Yang2TDLTranslator.java @@ -76,16 +76,24 @@ public class Yang2TDLTranslator extends AbstractTranslator { //TODO: extract CrossSourceStatementReactor reactor = createReactor(); BuildAction build = reactor.newBuild(); - Files.list(Path.of("samples", "ietf")).forEach(p -> + Files.list(Path.of("samples", "ietf")) + .filter(p->p.toString().endsWith("yang")) + .forEach(p -> build.addLibSource(moduleFromPath(p.toString())) ); - Files.list(Path.of("samples", "nfv")).forEach(p -> + Files.list(Path.of("samples", "nfv")) + .filter(p->p.toString().endsWith("yang")) + .forEach(p -> build.addSource(moduleFromPath(p.toString())) ); -// Files.list(Path.of("samples", "mwt")).forEach(p -> +// Files.list(Path.of("samples", "mwt")) +// .filter(p->p.toString().endsWith("yang")) +// .forEach(p -> // build.addSource(moduleFromPath(p.toString())) // ); -// Files.list(Path.of("samples", "simple")).forEach(p -> +// Files.list(Path.of("samples", "simple")) +// .filter(p->p.toString().endsWith("yang")) +// .forEach(p -> // build.addSource(moduleFromPath(p.toString())) // ); // build.addSource(moduleFromPath(targetFilename)); -- GitLab