]
Mark Proctor closed JBRULES-1406.
---------------------------------
Resolution: Won't Fix
Assignee: Kris Verlaenen
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
Assigned To: Kris Verlaenen
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: