Bug 796251 - Eclipse plugin uses deprecated hash symbol for comments in newly created .drl files
Summary: Eclipse plugin uses deprecated hash symbol for comments in newly created .drl...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: Tooling (JBDS)
Version: BRMS 5.3.0.GA
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: BRMS 5.3.0.GA
Assignee: Douglas Palmer
QA Contact: Lukáš Petrovický
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-22 15:02 UTC by Jiri Svitak
Modified: 2015-06-02 01:34 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-15 13:51:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker GUVNOR-1868 0 None Resolved Generated DRL uses deprecated # comment identifier 2012-06-18 11:25:22 UTC
Red Hat Issue Tracker JBIDE-11033 0 None Closed Drools plugin uses deprecated hash symbol # for comments in newly created .drl files 2012-06-18 11:25:22 UTC
Red Hat Issue Tracker JBRULES-3455 0 None Resolved Generated DRL uses deprecated # comment identifier 2012-06-18 11:25:23 UTC

Description Jiri Svitak 2012-02-22 15:02:01 UTC
Eclipse plugin uses deprecated hash symbol # for comments in newly created .drl files. Setting # to be deprecated might cause large refactoring work in existing .drl files, because Eclipse plugin used this type of comment as a default setting. Newly created .drl file in Eclipse looks like this:

#created on: Feb 22, 2012
package com.sample
#list any import classes here.
#declare any global variables here
rule "Your First Rule"
    when
        #conditions
    then
        #actions
end

Users should now use // for single comments and /* */ for block comments. But Eclipse plugin should not confuse them with #.

Comment 1 JBoss JIRA Server 2012-03-07 13:22:35 UTC
Max Rydahl Andersen <max.andersen> made a comment on jira JBIDE-11033

doesn't this depend on the version of Drools used ?

Comment 2 Lukáš Petrovický 2012-04-12 06:20:37 UTC
(In reply to comment #1)
> Max Rydahl Andersen <max.andersen> made a comment on jira
> JBIDE-11033
> 
> doesn't this depend on the version of Drools used ?

The "#" has been deprecated for a very long time, or so I'm told. It'd be great if the tooling used some more-universal form of commenting code.

Comment 3 manstis 2012-04-12 11:39:10 UTC
Fixed and back-ported to 5.3.x. I also fixed the same issue for RuleFlow Script Tasks that allow Globals and Imports to be defined (create a RuleFlow, add a Script Task, view properties, select Action and check Imports... and Globals...).

Comment 4 JBoss JIRA Server 2012-04-12 12:33:04 UTC
Michael Anstis <michael.anstis> updated the status of jira GUVNOR-1868 to Resolved

Comment 5 JBoss JIRA Server 2012-04-12 12:39:07 UTC
Michael Anstis <michael.anstis> updated the status of jira JBRULES-3455 to Resolved

Comment 6 manstis 2012-04-12 12:41:44 UTC
Please note. I have not back-ported the other fixes I made to the DRL generated from within Guvnor (see referenced JIRA GUVNOR-1868) or Drools Expert Templates (see referenced JIRA JBRULES-3455). If you would like them to be back-ported please let me know :)

Comment 7 JBoss JIRA Server 2012-04-12 12:51:26 UTC
Kris Verlaenen <kris.verlaenen> updated the status of jira JBIDE-11033 to Resolved

Comment 8 JBoss JIRA Server 2012-04-12 12:51:26 UTC
Kris Verlaenen <kris.verlaenen> made a comment on jira JBIDE-11033

Fix applied in latest version

Comment 9 manstis 2012-04-12 13:28:07 UTC
Additional changes mentioned in comment #6 have been back-ported to 5.3.

Comment 10 Max Rydahl Andersen 2012-04-13 09:02:49 UTC
mantis, just so i'm clear what back-ported means here - is it committed to the community 5.3 branch so it would actually get picked up in a respin for JBDS 4 or are we just talking trunk here as Kris seems to be referring ?

Comment 11 JBoss JIRA Server 2012-04-13 09:04:24 UTC
Max Rydahl Andersen <max.andersen> updated the status of jira JBIDE-11033 to Reopened

Comment 12 JBoss JIRA Server 2012-04-13 09:04:24 UTC
Max Rydahl Andersen <max.andersen> made a comment on jira JBIDE-11033

Kris - which version is this for ?

you removed the fix version so not possible to trace it anymore.

Comment 13 manstis 2012-04-13 09:18:04 UTC
(In reply to comment #10)
> mantis, just so i'm clear what back-ported means here - is it committed to the
> community 5.3 branch so it would actually get picked up in a respin for JBDS 4
> or are we just talking trunk here as Kris seems to be referring ?

Hi Max, the fix has been applied to the 5.3 branch too, so it should be in the next JBDS release (assuming it is taken from the 5.3 branch). Thanks, Mike

Comment 14 JBoss JIRA Server 2012-04-13 13:49:39 UTC
Kris Verlaenen <kris.verlaenen> made a comment on jira JBIDE-11033

Max,

This is issue has been resolved in the latest community branch and the latest product branch.  So whenever a new update for droolsjbpm tooling is made (from either of these branches), the fix will be included.

Usually I keep the issues open until a new version has been integrated, after which the issue is closed, with the correct fix version.  So let's keep this issue open until it has been verified.

Kris

Comment 15 JBoss JIRA Server 2012-04-22 06:49:32 UTC
Max Rydahl Andersen <max.andersen> made a comment on jira JBIDE-11033

putting on soa fix version so not showing up as unassigned.

Comment 16 Ryan Zhang 2012-04-23 07:39:00 UTC
Update status to ON_QA. Please verify them against ER6.

Comment 17 Max Rydahl Andersen 2012-04-23 08:31:44 UTC
fyi, there is no need to tie this to QE of a specific runtime ER6 release.

This is pure tooling side issue and there is no such thing as an ER6 tooling release afaik.

Comment 18 manstis 2012-04-23 08:35:28 UTC
There are wider ramifications. See comment #6. Guvnor also generated DRL containing the deprecated # symbol. So.... there's some Guvnor testing and some Tooling (Eclipse) testing that is needed.

Comment 19 Jiri Svitak 2012-04-30 09:08:20 UTC
Not fixed in BRMS 5.3.0 ER6. Cannot verify since provided plugin file 
jbosstools-drools-5.3_trunk-Update-SNAPSHOT.zip
from here
http://jawa05.englab.brq.redhat.com/candidate/BRMS-5.3.0-ER6/jbosstools/
has old date and was not updated. Ryan, please provide us with the latest snapshot of the Drools Eclipse plugin for testing. Update also old md5 checksum file.

Comment 20 Max Rydahl Andersen 2012-04-30 09:47:06 UTC
The plugins should be provided by Doug Palmer when he is doing the SOA/BRMS plugin builds.

Tooling is not supposed to be part of specific runtime build.

Comment 21 Ryan Zhang 2012-05-03 09:18:19 UTC
Confirmed with Doug. 
This fix for this issue would be included  in next release.(it's not in 5.0.0-beta1, it will be in beta2). Re-assign to Doug.

Thanks Max for clarification, I would not include the plugin for next platform release.

Comment 26 Lukáš Petrovický 2012-05-25 12:02:20 UTC
Doug, is this available for testing?

Comment 27 Douglas Palmer 2012-05-25 12:46:31 UTC
(In reply to comment #26)
> Doug, is this available for testing?

Yes, it should be available in the Beta2 soa tools release.

Comment 28 Lukáš Petrovický 2012-05-25 12:58:03 UTC
Cool, moving to ON_QA.

Comment 29 Lukáš Petrovický 2012-05-29 12:34:46 UTC
This is not fixed. Steps to reproduce:

1) New Rule Resource
2) Check "Use Functions" (otherwise fill out the form as usual)
3) Find the following code be generated:

function myFunction( ... ) {
    #function content (can have multiple functions) 
}

Comment 32 JBoss JIRA Server 2012-05-30 10:26:42 UTC
Douglas Palmer <dpalmer> updated the status of jira JBIDE-11033 to Resolved

Comment 33 JBoss JIRA Server 2012-06-11 16:12:30 UTC
Len DiMaggio <ldimaggi> updated the status of jira JBIDE-11033 to Closed

Comment 34 JBoss JIRA Server 2012-06-11 16:12:30 UTC
Len DiMaggio <ldimaggi> made a comment on jira JBIDE-11033

Verified fixed in SOA - http://www.qa.jboss.com/binaries/RHDS/updates/development/5.0.0.Beta3.soa-tooling/

Comment 35 Ryan Zhang 2012-06-13 09:32:30 UTC
This issue's fixes  have been picked by ER9. Please verify them on ER9.

Comment 36 Ryan Zhang 2012-06-13 09:38:29 UTC
sorry, I just came across this is a tools bug. It would be availble with next SOA tooling release. Revert the target milestone fields.

Comment 37 Len DiMaggio 2012-06-15 12:58:06 UTC
Link to: JBIDE-11033

Comment 38 Len DiMaggio 2012-06-15 13:51:35 UTC
Verified fixed in SOA - http://www.qa.jboss.com/binaries/RHDS/updates/development/5.0.0.Beta3.soa-tooling/


Note You need to log in before you can comment on or make changes to this bug.