diff --git a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java index ed50aa1f16d..d89974d13c6 100644 --- a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java +++ b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/core/dom/JavacConverter.java @@ -222,6 +222,14 @@ private ExportsDirective convert(JCExports javac) { ExportsDirective res = this.ast.newExportsStatement(); res.setName(toName(javac.getPackageName())); commonSettings(res, javac); + List mods = javac.getModuleNames(); + Iterator it = mods.iterator(); + while(it.hasNext()) { + JCExpression jcpe = it.next(); + Expression e = convertExpression(jcpe); + if( e != null ) + res.modules().add(e); + } return res; } @@ -229,6 +237,14 @@ private OpensDirective convert(JCOpens javac) { OpensDirective res = this.ast.newOpensDirective(); res.setName(toName(javac.getPackageName())); commonSettings(res, javac); + List mods = javac.getModuleNames(); + Iterator it = mods.iterator(); + while(it.hasNext()) { + JCExpression jcpe = it.next(); + Expression e = convertExpression(jcpe); + if( e != null ) + res.modules().add(e); + } return res; }