Netbeans remove line counter - netbeans

It is possible to delete these method's lines counters:
I was looking in options and I haven't find any way to disable it.

To disable line counters go to:
Tools -> Options -> Editor -> Folding
At the bottom uncheck Show summary.
However there is no option to remove {...} entirely.

Tools -> Options -> Editor -> Folding

Related

Sublime Highlight when select characters

I'm using VSCode, and it has a nice thing to match characteres (without ctrl+f). Same as the image below.
Is there any plugin to sublimeText to do the same thing?
Thanks!
I was curious about this, so I've done some research:
There's a SublimeText plugin that does exactly what your are looking for:
SublimeText/WordHighlight can be easily installed via Preferences -> Package Control -> Install package -> WordHighLight (or the shortcut ShiftCtrlP -> Type Install package -> Type WordHighLight).
Once installed, when a word is selected, all matching words in the document are highlighted:
I've tested it successfully in SublimeText 3.
Don't forget to add
{
"highlight_non_word_characters": true,
}
...to your Preferences -> Package settings -> WordHighLight -> Settings - User in case you want to highlight partial words, as the sample you provided. Otherwise, only complete words are highlighted.

Indentation in Eclipse

I am trying to indent my code in eclipse .
List<TestDB> list=session.createCriteria(TestDB.class).add(Restrictions.eq("testCase",testCase)).list();
I type my code as above and when I save my code the line is indented as follows :-
List<TestDB> list = session.createCriteria(TestDB.class)
.add(Restrictions.eq("testCase", testCase)).list();
I tried this from SO :-
How do I disable auto-indent in Eclipse Helios (Java)?
But it is did not help . Can anyone please help me with the indentation ?
Window -> Preferences -> Java -> Editor -> Save Actions -> Deactivate Perform the selected actions on save.
Also right click your project, select Properties and check the same setting here.

How to disable auto formatting upon save in Eclipse?

Eclipse keeps auto formatting upon save, for example: it is insisting the following code should be in a single line once I save, despite breaking it up the way I want to.
#Transactional(rollbackFor = DataAccessException.class, readOnly = false, timeout = 30, propagation = Propagation.SUPPORTS, isolation = Isolation.DEFAULT)
Window > Preferences > Java > Editor > Save Actions.
Can also be configured at the project level. Project > Properties > Java Editor > Save Actions.
Absolutely maddening improvement. For if statements do the following:
Window | Preferences | Java | Code Style | Formatter | Control statements tab
Select Keep simple if on one line.
You might also try the Line wrapping tab
This is a Late answer, But just for novice to understand it clearly I have a snapshot of the setting.
Please follow the path on left.
And change highlighted setting.
If you wish to keep the auto-formatter, but don't want this behavior, you can also configure it in the fomatter :
right click on the project -> properties -> java code style -> formatter
(If you don't have a project specific formatter the global configuration can be accessed this way : Window -> Preference -> Java -> Code Style -> Formatter).
Edit... the active profile, open the Line Wrapping tab, and there check the Never join already wrapped lines option.
This way you can wrap lines wherever you want and eclipse won't remove your line breaks (which is a must if you wish to have readable lambda expressions), but keep the formatter active.
This option is there at least since eclipse Luna
Here is a screenshot where this option is :
Just wanted to add a tip. If you want to avoid the line wrapping you can simply increase the "Maximum line width" value to something enormous. As long as that is sufficiently high eclipse won't do any wrapping.
Preferences > Java > Code Style > Formatter > Edit > Line Wrapping > Maximum line width

Where to change highlight color for selected occurrences in Eclipse?

When a method or variable is selected it is highlighted in Eclipse with some color. Can anyone advice where to change that color? I'm working under Windows OS.
I've found where to change it:
Preferences -> General -> Editors -> Text Editors -> Annotations
and there you have to change both "Occurrences" and "Write occurrences".
Preferences -> General -> Editors -> Text Editors
Current Line Highlight
I think you want the above
else
Preferences -> Java -> Editor -> Syntax Coloring
Element -> Java -> Method or Variable
Check Enable and select color
This has made me mad for about half an hour.
If the issue appears in JavaScript files, the option is under Preferences -> General -> Editors -> Text Editors -> Annotations and in the Annotation types choose JavaScript Occurences. Mine was set to black, nasty little thing took me too long to fix.
If you're using eclipse with PHP package and want to change highlighted colour then there is slight difference to above answer.
Right click on highlighted word
Select 'Preferences'
Go to General > Editors > Text Editors > Annotations. Now look for "PHP elements 'read' occurrences" and "PHP elements 'write' occurrences". You can select your desired colour there.

how to hide the text limit line in netbeans 6.5?

Is there a way to hide the text limit line in netbeans 6.5?
In NetBeans 6.9, setting Right Margin to 0 effectively hides the text limit line.
Set the value in Preferences > Editor > Formatting > All Languages > Right Margin.
(Mac OS X 10.6.4, NetBeans 6.9)
line is not moving to 200 column, but you can hide it setting its color to same as the background
You can set it to 0. So It will not be visible.
Are you talking about the line running thru the right side, by default at the 80 column point? That is Options -> Editor -> Indentation -> Right margin. I have it set at 200 columns which pushes it off the right side of the screen.
Hi~ I found out how to hide "Text limit line" :)
Tools -> Options -> Export(Popup Win) -> Browse.. (Select target "ccc.zip" file)
Select Options for Export : Check at "Editor" -> OK
Edit xml file "\Editors\Preferences\org-netbeans-modules-editor-settings-CustomPreferences.xml" in "ccc.zip" file.
<entry javaType="java.lang.Boolean" name="text-limit-line-visible" xml:space="preserve">
<value><![CDATA[false]]></value></entry>
Tools -> Options -> Import "ccc.zip" file
Done
As for now (October '18) in NetBeans 8.2 + 9 you can hide the text limit line or actually change its color by going to Options -> Fonts & Colors -> Highlighting -> Text Limit Line -> Foreground
Remember to go to tools, options, fonts & colors, highlighting tab, text limit line selected before exporting ccp.zip....
There is an easy way to disable the warning generated by NetBeans for number of lines.
Goto Tools > Options > Editor > Hints
Find the checkbox Too Many Lines > un-check the checkbox
and click Apply.
Enjoy :)
Have you tried to see if your project properties have formatting that overwrites the global properties?
See below:
https://bz.apache.org/netbeans/show_bug.cgi?id=223329