Do you customize your IDE (Eclipse?)

Do any of you do any form of customization to Eclipse (or other IDE) when you are java coding? Aside from default setup

For example, do you have a slightly or heavily modified (Code Formatter) (Import/exportable)

I recently customized my Syntax Coloring a bit, to maybe better help with clarity in things. However I am not sure what would be ideal colors to best differentiate things? Thoughts/suggestions/screenshots of yours?

Do you have any custom made shortcut keys? macros or mini scripts? Do you use any “templates” on any regular basis?

I very rarely ever interact or see people code in real life(and when I do, they are usually just starting to code) :frowning: So I am not sure if I maybe haven’t developed useful habits on certain things.
So I was just curious if there are any popular habits people have that I could maybe adopt and find useful.

::slight_smile: :o :yawn: :persecutioncomplex: :point: :-X ??? ??? ??? 8) ;D :smiley: :wink: :slight_smile:

Eclipse syntax coloring? Enjoy: http://eclipsecolorthemes.org/ :slight_smile:

I don’t use Eclipse, I use IDEA, but I still have it heavily modified. I played around with the formatter A LOT, and have my own custom syntax coloring. I also have Eclipse’s keymap set in IDEA plus a bunch of my own custom shortcuts.

No macros/scripts/templates though, don’t really use those at all (except psvm = public static void main).

I have mine formatted to how I like it. Like putting brackets in the right spots, indenting, and white space. The only other modification I have tried to do is change the font, but all the ones I tried we’re just too hard to read or were too narrow.

Here is what mine looks like very colorful and custom formatted ;D

EDIT: All fixed, thanks @ra4king :slight_smile:

@Longarmx
I prefer DejaVu Sans Mono, look into it!

@h2n0
Bad link :wink:

Syntax coloring is not nearly as useful for identifying code at a glance as white space is. I put brackets on separate lines so that they are alined. It makes control flow structures easier and methods to see. Code that takes more than one line is indented by a slightly amount than the normal indent so it is visually obvious what is and isn’t a continuation of a previous line. I also break the rule about CONSTANT_VARIABLES because, really… we have character sets with both upper AND lower case letters. Camel case is superior because it’s easier to read and doesn’t have underscores. Underscores introduce negative space that looks like white space which makes it harder to “visually parse” code while holding down the page down button or at a glance.

I also made new templates for things like System.out.println, the millesecond time, the nano second time, and System.exit. I plan to consolidate my commonly used utility methods and classes and find a way to automatically import and static import them, as well as the Math functions. I don’t know where to start with that. I use templates a lot but only for a few specific things. I don’t always consciously think about what to add, so I am sure I am missing good ones.

My preferred color system is light text on dark blue or black. I haven’t “optimized” my syntax highlighting yet, but these styles seem to cause the least eye strain.

I too have amazing syntax highlighting:

You can download the theme here.

I also toyed around with the panels in the GUI to make everything a bit more minimal. This is how my average workspace looks:


http://i.imgur.com/5JvdzRJ.png

But if you really want to customize it so your workflow is easier, I HIGHLY recommend that you change the auto-format settings.

Just go to Window > Preferences. Then once you’re there, go to Java > Code Style > Formatter.
Toy around with the settings till they fit your needs. When I discovered this, I felt like I was in heaven.

I have a question myself, though. How would I get something like the side-map from Sublime Text working in Eclipse?

  • Jev.

For those who customized their eclipse, even though I prefer a dark background, the reason I have never switched is because this happens

is there a way to fix that that?

Also, ra4king, any particular reason for liking IDEA? or disliking eclipse?

@kpars
Never compare strings using ‘==’! Using the ‘equals’ method!

For your question…you can’t. :slight_smile:

@namrog84

What the fuck is it with people and dark background when coding ?
Is it just me or don’t you get blind by looking at white text on black background. It burns into my retina and I can’t see anything else anymore for a minute D:

While I don’t like white on black, I do find light text on a darker background to be easier on the eyes especially when I am coding at night. Most of the websites, docs, etc. that I am consulting while programming are dark on light so maybe it’s just the variety that helps?

You happy, ra4king?

Noting my question, there was a thread here before where I saw something very similar. Though I’m probably wrong.

  • Jev.

Only change I made is for Eclipse to put the opening brace after a function on a new line. Other than that the defaults are fine for me. I’ve never thought of changing the colours but I may.

That would be personal preference. I find having braces on separate lines messy and distracting. I use extensive syntax highlighting and that makes it easy to read the code.

I also set up CTRL-TAB as a shortcut for quick editor switching. I move perspectives and views to the left side with no text for easy access. I also maximize the editor window and quickview all the views.

I’ve tried both NetBeans and Eclipse themes before but hated both. I’m so used to reading and writing in their respective default syntax highlighting that any changes just confuse my eyes. IMO, if the default theme doesn’t hurt your eyes, there’s no need to switch.

You’ve convinced me and I am going to download and try it out for a bit, also gonna follow your lead, with switching keyboard shortcuts and going with the same theme.
You said you modified some of it, you should post it somewhere and send me a link :point: :slight_smile:

This is my workspace.

The only thing I changed is to remove the side ‘Classes’ pane.

Okay, but you admit that my syntax coloring preferences and naming schemes are 100% objective. I forgot to mention my indent size is two. When the indent size is ridiculously, impractically large, there is much less marginal utility to one style versus the other. Although to be honest I prefer BASIC style grouping to no-free-line style brackets. In my method you can use the nearly blank line as a “bookmark” and there is a structural symmetry that makes it easy to scan. BASIC syntax also makes it clearer which blocks belong to which initial line, but it’s not my favorite.

https://imageshack.us/a/img801/4436/r26z.jpg

I would not use white on black for anything. Orange is much nicer since it’s the least intense color while still providing readable contrast. (Try bright yellow on dark blue if you want to hurt your eyes. Apparently certain color combinations cause eye strain but also make the contrast seem more intense.) Of course for programming the dark background is not usually pure black (either a dark shade or gray) and the foreground is a mix of pastel colors. For monospace fonts, light on dark seems at least as readable as dark on light for some reason. On the other hand non-monospace fonts use different techniques to make text more readable, so you can’t compare websites and paper to IDE colors.

@kpars: How does the side output window work for you? Doesn’t the text get cut off or wrapped a lot?

Font = DejaVu Sans Mono
Colors = Only thing I changed was “Keyword” to #109ECC from that orange color. I didn’t like the orange.
Formatting = Using “Eclipse Code Formatter” plugin. Use that plugin only to have tabs on blank lines. Otherwise, use IDEA’s built-in formatter.

Thanks!!
Also you just hit 300 appreciation! :smiley: http://ktarsis.files.wordpress.com/2006/11/ktw300.gif