Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Java via Epsilon Tools
Java via Epsilon Tools [message #579493] Tue, 25 August 2009 07:23
Darren  is currently offline Darren
Messages: 40
Registered: September 2009
Member
Hi All,

I'm trying to execute some regular expression searches in a
transformation. The Java I need to execute uses the
Java.utils.regex.Pattern and Java.utils.regex.Matcher. Dimtitris kindly
pointed me to the Epsilon Tools documentation and I can follow the JFrame
example. However from what I can tell there is no default constructor for
Pattern, which is what I believe to be causing me the problems.

Pattern is typically called in Java by:
Pattern p = Pattern.compile('regex Srring');

I have tried:
# var pattern : new Native('java.util.regex.Pattern') :=
pattern.compile('Section ((\\d)[(\\.\\d)]*)');
# var pattern : new Native('java.util.regex.Pattern') :=
Pattern.compile('Section ((\\d)[(\\.\\d)]*)');
# var pattern : new Native('java.util.regex.Pattern') :=
java.util.regex.Pattern.compile('Section ((\\d)[(\\.\\d)]*)');
# var pattern : new Native('java.util.regex.Pattern');

All of which result in an EXCEPTION: Internal error:
java.lang.InstantiationException: java.util.regex.Pattern

Has anyone any suggestions to try.

Many thanks,

Darren
Previous Topic:Wrong object type instantiated when using "new" inside EVL Quick Fixes and other issues
Next Topic:Java via Epsilon Tools
Goto Forum:
  


Current Time: Sat Apr 19 06:13:51 EDT 2014

Powered by FUDForum. Page generated in 0.01647 seconds