* [ 1894790 ] Script editor for ad_rule always open beanshell editor
- added syntax validation support * .classpath fix
This commit is contained in:
parent
048be5eff4
commit
23553de8e4
|
@ -20,5 +20,6 @@
|
|||
<classpathentry kind="lib" path="/tools/lib/c3p0-0.9.1.2.jar"/>
|
||||
<classpathentry kind="lib" path="/tools/lib/barbecue-1.1.jar"/>
|
||||
<classpathentry kind="lib" path="/tools/lib/script-api.jar"/>
|
||||
<classpathentry kind="lib" path="/tools/lib/poi-2.0-final-20040126.jar"/>
|
||||
<classpathentry kind="output" path="build"/>
|
||||
</classpath>
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*****************************************************************************/
|
||||
package org.compiere.model;
|
||||
|
||||
import java.io.StringReader;
|
||||
import java.sql.*;
|
||||
import java.util.*;
|
||||
import java.util.logging.*;
|
||||
|
@ -143,6 +144,14 @@ public class Scriptlet
|
|||
return null;
|
||||
} // execute
|
||||
|
||||
public void validate() throws ParseException
|
||||
{
|
||||
Parser parser = new Parser(new StringReader(m_script));
|
||||
while( !parser.Line()/*eof*/ )
|
||||
{}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Environment for Interpreter
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue