Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Java Package import at Rule Level

Hi Markus,

we've added support for specifying global Java imports in the EngineImpl constructor. Let us know if you find any issues.

I would like to do one related change: currently the package "java.lang" is imported by default. For performance reasons and possible name conflicts with JS classes, I would like to remove this default import. This means if you need a class from that package, you need to import the package explicitly or use the FQN.

Cheers,
Christian





2014-08-27 21:28 GMT+02:00 Christian Krause <henshin.ck@xxxxxxxxx>:

Hi Markus,

Thanks a lot for the code. I think we need to do a little restructuring for this feature. Currently we use two different import mechanisms in the scriptengine wrapper. I think the imports should be in general handled via the JavaImporter mechanism. Then we should be able to get rid of the old Rhino API.

The EngineImpl class could then have two different constructors. The default constructor would automatically import java.lang and in the second constructor the global imports can be completely customized.

I hope we can implement this soon.

Cheers,
Christian

On Aug 25, 2014 9:35 AM, <mke@xxxxxxxxxx> wrote:

Hi Christian,

 

yea, I might have forgotten to set the delimiter, my fault. Here are the source files.

 

Greetings,

 

Markus

 

Von: henshin-dev-bounces@xxxxxxxxxxx [mailto:henshin-dev-bounces@xxxxxxxxxxx] Im Auftrag von Christian Krause
Gesendet: Freitag, 22. August 2014 17:10
An: Henshin developers mailing list
Betreff: Re: [henshin-dev] Java Package import at Rule Level

 

Hi Markus,

 

I have problems applying the patches (we recently did some global line delimiter conversion which could be the cause). Could you just send we those two files directly?

 

Cheers,
Christian

 

2014-08-22 15:51 GMT+02:00 <mke@xxxxxxxxxx>:

Hi Christian,

 

here is my implementation of the global import mechanism, that is running in our tool.

 

Greetings,

 

i. A. Markus Klenke
Software und Consulting
--
TEAM GmbH
Hermann-Löns-Str. 88 | 33104 Paderborn | Fon +49 5254 8008-55 | Fax +49 5254 8008-19
Mail mke@xxxxxxxxxx | Web http://www.team-pb.de/
------------------------------------
Geschäftsführer: Heike Käferle, Michael Baranowski, Dr. Winfried Materna, Helmut an de Meulen
Geschäftssitz: Paderborn, HRB 955 Amtsgericht Paderborn, UST-IdNr.: DE 126336040
-------------
TEAM-Veranstaltungen in 2014:

DOAG Logistik + IT am 07. Mai

http://www.team-pb.de/veranstaltungen
-------------

 

Von: henshin-dev-bounces@xxxxxxxxxxx [mailto:henshin-dev-bounces@xxxxxxxxxxx] Im Auftrag von Christian Krause
Gesendet: Freitag, 22. August 2014 14:04


An: Henshin developers mailing list

Betreff: Re: [henshin-dev] Java Package import at Rule Level

 

Hi Markus,

 

there is currently no global import mechanism (you could inject them into the JS engine I guess, but thats not really convenient). Could you maybe send us a patch of your implementation? 

 

Cheers,

Christian

 

PS: Please note that if we include it, it will be of course published under the terms of the EPL. If you don't want that, please don't send us anything...

 

2014-08-22 12:25 GMT+02:00 <mke@xxxxxxxxxx>:

Just wanted to say thanks for an implementation of a JS- Java Package import Feature at Rule level. Works like a charm!

 

A small question regarding global imports of java packages into the JS-Engine:

 

Would it be possible to extend the Engine interface resp. EngineImpl with a constructor, where String array of globally imported packages can be set, because we use java methods quite regularly, and it would save a huge amount of time, if we could import all libraries at once during the startup of the engine. I’ve done it for my local work, but I’m not sure if anything else will break using this extension.

 

Or is there already a global import mechanism, that I overlooked?

 

Greetings,

 

Markus

 

Von: henshin-dev-bounces@xxxxxxxxxxx [mailto:henshin-dev-bounces@xxxxxxxxxxx] Im Auftrag von Christian Krause
Gesendet: Mittwoch, 20. August 2014 19:24
An: Henshin developers mailing list
Betreff: [henshin-dev] Git config for Windows

 

Hi,

please use this Git config in Windows:

 

core.autocrlf=true

core.filemode=false

 

If you have dirty projects due to windows line endings, try a hard reset after setting the config.

 

Cheers,

Christian


_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/henshin-dev

 


_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/henshin-dev

 


_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/henshin-dev


Back to the top