Told you, we love sharing!
hi, If we want to contribute to classes which matches a particular path/name pattern, then we can use PSI Class patterns to do it. the code is as follows: [java] import com.intellij.patterns.PsiJavaPatterns import com.intellij.patterns.PlatformPatterns //get the context of all files, and enable path matching....
Hi, Sometimes we need to contribute dynamically using current target class type. Lets take the example of .get() and .list() methods of Grails domain class. The signature of each method is as follows: public <DomainClassType> get(Long id) , Example: DemoClass.get(1) will return an object of "DemoClass" ...
Hi, I have been using the Grails mail plugin for a while now, this plugin injects a method named "sendMail" to all controllers and services. Our aim will be to provide auto-completes for this method and the closure inside. The GDSL Script is as follows: [java] import com.intellij.patterns.PsiJavaPatterns ...
Hi, Here i will illustrate how you can get the code of a method within GDSL Script: The script is as follows: [java] import com.intellij.patterns.PsiJavaPatterns import com.intellij.patterns.PlatformPatterns def mongoContext = context( ctype:...
Hi, Here is an example which uses a lot of gdsl concepts. This example tries to simulate injecting properties to Domains. The Example is as follows: (The code is self explanatory and can be used as a reference) [java] import com.intellij.patterns.PsiJavaPatterns import com.intellij.patterns.PlatformPatterns ...
Well This is something awesome and can increase the performance of the project when used wisely. using the groovy .memoize() we can ask closures to perform kind of caching. This can boost up the performance of the system. _ Note: This feature is available in groovy 1.8+ Well Let me Explain this Using Examples Now suppose i...
Hi, Recently i had to get the count of the Pages Google has Indexed for a perticular web Site progmatically. In the process i found that Google offers an AJAX Search API to perform Google Searches. . Hence i Implemented a Class which does the same for me easily(Ajax Search in Google). And this Solution Does Google Searches...
Hi, well we can run SQL Queries and browse database through IDEA with a good GUI interface. It Just Requires Two Steps: 1) Setup (One time) 2)Usage (how to) A: Setup PART I 1) Download the Database Navigator Tool From Intellij Repo -> Download Tool 2) Then Execute in the Directory containing the downloaded file ...
Recently i upgraded my laptop to increase the productivity and to make it butterSmooth to work on even with the most demanding applications. so here is what i did: 1) New High Speed Solid State Hard Drive 2) Increased RAM. . why SSD??? CPUs and GPUs thrive on being fed massive amounts of data in parallel, our hard drives...