tags:

views:

17

answers:

1

Do you know any easy way to know what is the length of current selection in Eclipse? I.e. I select a line fragment and would like to know how many characters are there?

Usually I count them manually, but that's stupid. When being desperate I move to the start, check the column number, move to the end, check the column number, subtract, think a minute if I should add 1 or not... and my selection is lost.

+1  A: 

Easy way? Copy the text and paste it to a counting script, like this site:

http://charcount.com/

(Warning: the site's background may hurt your eyes.)

Eclipse does support a Selection object, if you're into its API:

http://www.eclipse.org/articles/Article-WorkbenchSelections/article.html#example

Xavier Ho