Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Friday, October 17, 2014

How to Use Eclipse Code formatter from your own Java code?

I am looking a solution how Eclipse code formatted used formatting the code in eclipse ? Can we use same for-matter for our own use and i found the answer is yes .
If you will use Maven it will be great so need following dependency in pom.xml file



Now here is the Java code for formatting the code



Here you can check why i added


If you will not add above code and format a code which contain generics formatting will not work .

Monday, April 29, 2013

How to call Groovy Script method and pass parameter from Java class

You can follow below code to achieve above task.

and groovy script file code is

How to call Groovy Script from Java Class.

As i am working on ZK framework ,but as per requirement i have to use groovy as well in my project so in my previous post Integrate Groovy with Zk Framework i already mentioned how can we do it .Today i will want to share how we can call Groovy script from inside Java class..Try below code

As i am using Maven project so i put my groovy script file UserSelectedComponents.groovy inside /src/main/resources folder