Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Regular expression matching

Hi Christian,

 

Thank you for the suggestion. I was able to perform the check using _javascript_ in an AttributeCondition.

 

Best regards,

Vlad

 

From: henshin-dev-bounces@xxxxxxxxxxx [mailto:henshin-dev-bounces@xxxxxxxxxxx] On Behalf Of Christian Krause
Sent: Tuesday, May 06, 2014 8:44 AM
To: Henshin developers mailing list
Subject: Re: [henshin-dev] Regular _expression_ matching

 

Hi Vlad,

 

2014-05-05 11:51 GMT+02:00 Vlad Acretoaie <rvac@xxxxxx>:

Hi,

 

Does Henshin currently support regular _expression_ matching?

 

No.

 

For instance, I can now match a Class with name=”Record” in a UML model. Is there some way in which I can match all classes whose name contains the substring “Record”?

 

You can match the name with a parameter and then add an AttributeCondition to the rule (using the tree editor). In the attribute condition text you can specify your check in _javascript_. In principle you should be able to call Java String methods, and even do regex matching. I have not tried it out yet though.

 

 

I am aware that the paper titled “Henshin: Advanced Concepts and Tools for In-Place EMF Model Transformations” from 2010 mentions that regular expressions are not supported, but I was hoping this has changed in the meantime.

 

 

I think this refers to path expressions.

 

Cheers,

Christian

 

Best regards,

Vlad

 

Vlad Acretoaie

PhD student

DTU Compute

 

Technical University of Denmark

Department of Applied Mathematics and Computer Science

Matematiktorvet

Building 303B, Room 055

DK - 2800 Kgs. Lyngby

Denmark

Direct +45 45253645

rvac@xxxxxx

www.compute.dtu.dk/~rvac

 

 

 


_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev

 


Back to the top