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) 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.

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.

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 also toyed around with the panels in the GUI to make everything a bit more minimal. This is how my average workspace looks:

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?

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?

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.

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

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.

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.

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:

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?

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

Font = DejaVu Sans MonoColors = 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.

Font = DejaVu Sans MonoColors = 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.

I don't quite customize Eclipse since it always resets the settings every time I create a new workspace (unless there's a way to keep the settings as I've set them)

File->Export->Settings in the original workspace, then File->Import->Settings in the new workspace?

Alternatively, you can kind-of do the same thing with 'working sets', which is basically a set of projects that you can open/close as a group.

I don't tend to customise my programming tools a huge amount (Eclipse, Visual Studio, etc.), I find it really helpful to stick as close to the 'factory settings as possible. Firstly you tend to find less bugs since you hit less edge cases, and secondly it's much easier to switch to working on other people's machines, or for other people to work on yours. I count that as a huge win when working in a team.

About the only thing I do in Eclipse is crank up the compliance/compiler checking to near max.

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.

Again personal preference. I don't like the white space after the for line. I find it harder to read not easier. I also tab 4 not 2. If you need 2 because your nesting so much that it goes off the screen you have to look at your logic to reduce the nesting.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org