Examples of GroovyScript


Examples of org.crsh.lang.impl.groovy.command.GroovyScript

  }

  @Override
  public void init(ShellSession session) {
    try {
      GroovyScript login = getLifeCycle(session, "login");
      if (login != null) {
        login.setBinding(new Binding(session));
        login.run();
      }
    }
    catch (CommandException e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of org.crsh.lang.impl.groovy.command.GroovyScript

  }

  @Override
  public void destroy(ShellSession session) {
    try {
      GroovyScript logout = getLifeCycle(session, "logout");
      if (logout != null) {
        logout.setBinding(new Binding(session));
        logout.run();
      }
    }
    catch (CommandException e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of org.crsh.lang.impl.groovy.command.GroovyScript

  public GroovyScript getLifeCycle(ShellSession session, String name) throws CommandException, NullPointerException {
    TimestampedObject<Class<? extends GroovyScript>> ref = scriptCache.getClass(name);
    if (ref != null) {
      Class<? extends GroovyScript> scriptClass = ref.getObject();
      GroovyScript script = (GroovyScript)InvokerHelper.createScript(scriptClass, new Binding(session));
      script.setBinding(new Binding(session));
      return script;
    } else {
      return null;
    }
  }
View Full Code Here

Examples of org.freeplane.plugin.script.GroovyScript

    }

  public ScriptCondition(final String script) {
    super();
    final ScriptingPermissions formulaPermissions = ScriptingPermissions.getFormulaPermissions();
    this.script = new GroovyScript(script, formulaPermissions);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.