/plugins/SQL/tags/v_1_02/sql/preprocessors/BeanShellEvaluator.java

# · Java · 46 lines · 10 code · 4 blank · 32 comment · 0 complexity · 88460a8e4fc14c1614ecf31cdbbc6804 MD5 · raw file

  1. /**
  2. * BeanShellEvaluator.java - Sql Plugin
  3. * Copyright (C) 2001 Sergey V. Udaltsov
  4. * svu@users.sourceforge.net
  5. *
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * as published by the Free Software Foundation; either version 2
  10. * of the License, or any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  20. */
  21. package sql.preprocessors;
  22. import org.gjt.sp.jedit.*;
  23. import sql.*;
  24. /**
  25. * Description of the Class
  26. *
  27. * @author svu
  28. */
  29. public class BeanShellEvaluator extends Preprocessor
  30. {
  31. /**
  32. *Description of the Method
  33. *
  34. * @param text Description of Parameter
  35. * @return Description of the Returned Value
  36. * @since
  37. */
  38. public String doProcess( String text )
  39. {
  40. return (String) BeanShell.eval( view, BeanShell.getNameSpace(), text );
  41. }
  42. }