[jboss-jira] [JBoss JIRA] Updated: (JBRULES-1406) Drools Eclipse plugin 4.0.2 - function causing syntax errors

Keith Bennett (JIRA) jira-events at lists.jboss.org
Fri Jan 4 17:36:43 EST 2008


     [ http://jira.jboss.com/jira/browse/JBRULES-1406?page=all ]

Keith Bennett updated JBRULES-1406:
-----------------------------------

    Attachment: Eclipse screenshot.jpg

> 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

        



More information about the jboss-jira mailing list