[
http://jira.jboss.com/jira/browse/JBRULES-1406?page=comments#action_12402426 ]
Mark Proctor commented on JBRULES-1406:
---------------------------------------
This is a bug with Eclipse when using JDK1.4 where it's not letting us override the
language settings. It seems there is nothing we can do to fix this, please let us know if
this continues in trunk where only jdk1.5+ is supported.
Drools Eclipse plugin 4.0.2 - function causing syntax errors
------------------------------------------------------------
Key: JBRULES-1406
URL:
http://jira.jboss.com/jira/browse/JBRULES-1406
Project: JBoss Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Eclipse IDE
Affects Versions: 4.0.2
Environment: Eclipse 3.2.2, Drools IDE 4.0.2, JRE 1.4
Reporter: Keith Bennett
Attachments: Eclipse screenshot.jpg
When I try to include functions in any .drl file, I get syntax errors. For example, the
following simple .drl file can be referenced:
#created on: Jan 4, 2008
package test
#list any import classes here.
import java.util.Collection;
function void yourFunction(String arg) {
/* code goes here*/
}
rule "Your First Rule"
when
#conditions
then
#actions
end
rule "Your Second Rule"
#include attributes such as "salience" here...
when
#conditions
then
#actions
end
For this .drl file, I get the following errors highlighted on each rule in the IDE:
The import test.YourFunction.yourFunction cannot be resolved
Syntax error, static imports are only available if source level is 5.0
When I remove the function, these errors go away. I have developed .drl files much more
complex than this in the past and have incorporated functions using the same syntax. I
can't figure out what is wrong after scouring the forums and searching for anyone who
has experienced the same thing.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira