Search This Blog

Saturday, June 28, 2014

Easy Shell - Eclipse Plugin

While working in eclipse you may want to open selected file from project explorer to windows/unix console. One way is by selecting file, go to properites, copying path and open command prompt and go to that path. It can be automated by using external tools(viz http://javadevtool.blogspot.in/2014/06/running-batch-files-in-eclipse.html). But Easy shell does a light weight(1.5MB) plugin that does this job in a single click as shown in below.


  • Install this plugin from eclipse market palce or download it from here
  • Select a file/folder and in context menu select Easy Shell. 
  • Select Open to open file in command prompt, Run to run this file in case of batch. Explore to open in file explorer, Copy Path to copy the file path. 
Done. 

Running batch files from eclipse

Eclipse provides external tools to configure and run ant scripts, batch files and many and others using workbench.
Let me show you how to run batch files using this utility.

  • Goto Run -> External Tools -> External Tools Configuration(Alt+R, E, E)
  • Click on programs and enter program name(User defined name).
  • Select the batch file, you can select from your workspace or from file system. You can also provide the variable(List of variable available). 
  • Finally click on run. Eclipse opens a new console and run your batch file. 
  • Once you run this command, next time you need not open this external tool preferences. You can see the recently used programs in external tools icon in eclipse toolbar. 


Some of the tasks that you can do using this utility
  • Open selected file  in command prompt 
    • Open External tools Configuration window
    • Create new program
    • Enter Location as ${env_var:SystemRoot}/System32/cmd.exe
    • Arguments as cd ${resource_loc}
  • Open selected file in Windows Explorer
    • Open External tools Configuration window
    • Create new program
    • Enter Location as ${env_var:SystemRoot}/explorer.exe
    • Arguments as ${resource_loc},/select
  • Running jar file
    • Open External tools Configuration window
    • Create new program
    • Enter Location as C:\Program Files\Java\jdk1.7.0_21\bin\javaw.exe
    • Arguments as -jar C:\software\jshint\jslint4java-2.0.5-dist\jslint4java-2.0.5\jslint4java-2.0.5.jar ${resource_loc}
Done. 

InstaSearch - Eclipse Plugin

InstaSearch is one of my favorite eclipse plugins. Although eclipse provides a search engine, most of the times we want to find some text in some text files which will take hell lot of time in eclipse if you have many projects loaded in your workspace. 
InstaSearch is one of the coolest light - weight eclipse plugin that based on Apache Lucene search engine. 


Features : 
  • Instantly shows search results
  • Shows suggestions using auto-completion and preview using relevant lines
  • Opens and highlights matches in files
  • Searches jar source attachments
Usage: 

  • Install this plugin and click on InstaSearch menu item from Search toolbar menu. 
  • Start typing your word to search.(viz preview below)



Drawbacks : 

  • It doesn't support regex pattern(By the time I write this). 

Done.
To install eclipse plugins : http://javadevtool.blogspot.in/2014/05/installation-of-plugins-in-eclipse.html
Project home : InstaSearch

Mouse Tips in Windows

This post is specific to Windows operating system. Mouse usage in windows is too frequent. Sometimes because of our ignorance we don't even know some hacks/tips that can reduce stress on our fingers. Here are some tips that can reduce your stress and help you to achieve some tasks using mouse within less clicks. I would like to have suggestions from you as well, so your suggestions are welcome .
Tip #1 : Copying a block of text
Whenever you want to select a block of text, if it is a small block then you can do it using small drag selection or using keyboard but if the text is too big then it is painful to drag such a big texts. In such a case you can use this keyboard/mouse combination tip to copy block of text.

  • First click on start of the block from where you want to copy. 
  • Without holding/dragging any thing simply go to the end of the text.
  • Hold shift key in key board and click at the end of the block. It selects a block of the text. 


Tip #2 : Replacing Double click 
Some people have to open folders on computers 100+ times. It must be surprising for you but its true. In our work place I see some testers who work with files and folders in their entire day. In such cases its better to have a single click option to open a folder(Just like a hyperlink). Windows has a feature to open folders in a single click.
Open My Computer  go to Tools - > Options(If you can't find tools it click on Alt + F), select Single-click to open an item radio button.(viz image below)


Tip #3 : ClipCube - clipboard history tool
It doesn't come as out of the box in windows. But this windows utility helps to keep track of your copy history. I like the way it stores previously copied texts. In many cases we would like to have more than on ctrl + c  buttons to copy two texts but it is not possible in windows. clipcube is the one of the portable windows utility that helps you to track your previous copy history. You just download this utility, run exe file and forget about it. Whenever you use ctrl + c  or copy in context menu, clicpcube stores that data in its files. If you want to check history you can open clicpcube from tray and check the history.

For more info : http://clipcube.wikispaces.com/