package org.metaborg.spoofax.core.shell;

import javax.annotation.Nullable;

import org.metaborg.spoofax.core.esv.ESVReader;
import org.spoofax.interpreter.terms.IStrategoAppl;

public class ShellFacetFromESV {

    public static @Nullable ShellFacet create(IStrategoAppl esv) {
        IStrategoAppl shellTerm = ESVReader.findTerm(esv, "Shell");
        if (shellTerm == null) {
            return null;
        }
        String commandPrefix = commandPrefix(shellTerm);
        String evaluationMethod = evaluationMethod(shellTerm);
        return new ShellFacet(commandPrefix, evaluationMethod);
    }

    private static @Nullable String commandPrefix(IStrategoAppl term) {
        return ESVReader.getProperty(term, "CommandPrefix");
    }

    private static @Nullable String evaluationMethod(IStrategoAppl term) {
        return ESVReader.getProperty(term, "EvaluationMethod");
    }
}
@@ -614,34 +614,24 @@
 vate static 
-@Nullable 
 String comma
@@ -653,32 +653,58 @@
 egoAppl term) %7B%0A
+        // Default is %22:%22%0A
         return E
@@ -745,16 +745,21 @@
 dPrefix%22
+, %22:%22
 );%0A    %7D
@@ -779,26 +779,16 @@
  static 
-@Nullable 
 String e
@@ -817,32 +817,63 @@
 egoAppl term) %7B%0A
+        // Default is %22dynsem%22%0A
         return E
@@ -917,16 +917,26 @@
 nMethod%22
+, %22dynsem%22
 );%0A    %7D

Add default values for command prefix and evaluation method