Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Length of current selection in Eclipse

Tags:

eclipse

Do you know any easy way to find out what is the length of the 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.

like image 534
Grzegorz Oledzki Avatar asked May 28 '10 11:05

Grzegorz Oledzki


People also ask

How do I set the maximum line length in Eclipse?

To set the maximum line length in Eclipse, open Eclipse and in the menu bar, go to Window -> Preferences and in the pop-up window, go to Java -> Code Style -> Formatter. This will open up the Formatter options in the right window pane. Click on the Edit button to modify the current formatter profile.

Is it possible to find the number of selected characters in Eclipse?

Is there is any options to find the number of selected characters in eclipse. Show activity on this post. Eclipse does not provide a way to display the length of a text selection like NotePad++. Bug 73904: Show length of selection in status box was raised in 2004 (!!!) to add this feature but it still hasn't been implemented.

What are the different types of selections in Eclipse?

As pointed out before there are two fundamental different kinds of selections: Both can be empty, i.e. a empty list or a text string with zero length. Following the typical Eclipse philosophy these data structures are properly defined by interfaces: The IStructuredSelection refers to a list of objects.

Is it possible to show length of selection in status box?

Bug 73904: Show length of selection in status box was raised in 2004 (!!!) to add this feature but it still hasn't been implemented. The good news is that someone has written a plugin named getStringLength to do exactly what you want, as mentioned in a comment in the Eclipse Bug Report:


1 Answers

On Windows, Notepad++ is a good solution. Open a new tab, copy and paste in there and the length of the document listed at the bottom of the window is the number of characters you have.

like image 55
demongolem Avatar answered Sep 29 '22 00:09

demongolem