tips Tag

When you run JUnit tests that open windows and dialogs, all these windows pop up on your screen like fireworks, making your desktop unusable for minutes. If you're lucky enough to work on Linux, there's an easy way to get rid of all the flickering. You can simply redirect your UI tests onto a virtual screen. I was surprised how easy that is and thought it's...

Read More

[caption id="" align="alignright" width="320"] Image via CC from Alexei Kuznetsov[/caption]Probably every Java developer has developed at least one String utility class in his life. Need a proof? Feed "java StringUtil" to your favorite search engine - I found 20 different implementations among the first 30 search hits only! There is a simple reason for that - Strings are used quite frequently in common Java programs...

Read More

One strength of Eclipse is the possibility to use the same code on desktop clients as well as in web clients. The same application can run as an installed desktop application and in the web browser, with only few adjustments for both platforms. In our experience, about 80% to 90% of the code can run in both environments, if some guidelines are followed (i.e. no...

Read More

The Java compiler requires local variables of enclosing contexts referenced in anonymous classes (so-called captured variables) to be final. What if the anonymous class wants to alter the value of the variable, i.e. requires the variable to be mutable? This post shows different ways how to achieve that. The problem Let's assume we have a UI containing a button and a message to be displayed. The message...

Read More

Lately there have been many discussions regarding Eclipse preferences because of sites like ihateeclipse.com. The Number 1 complaint on this site is that Eclipse's resources get out of sync with the file system and, as a result, the user has to press F5. I've also run into this more than once ;). Anyway, since I'm pretty much an Eclipse power user I have spent some...

Read More

At EclipseSource and Eclipse we love git, as you can tell by the 582 public repositories on Eclipse's github page. Once you are familiar with the basics (if not, try this 15 minute tutorial or watch Linus Torvalds explain git) and have been using git for a little while, you may have questions such as: What are some guidelines for organizing large projects into multiple repositories? What are...

Read More

RAP 2.0 introduced the JavaScriptLoader service to allow custom widgets to load their scripts dynamically. However, because this is based on an "eval"-like JavaScript feature, the scripts did not appear like all other in the browser developer tools, and setting break points was not possible. The same exact same issue always existed for ClientListener. For the JavaScriptLoader this will be fixed in RAP 2.2M1, but...

Read More

[caption id="attachment_17278" align="alignright" width="256"] By Pöllö (Own work) [CC-BY-3.0], via Wikimedia Commons[/caption]Did you ever look at a colleague's Java source code file which contained mixed spaces and tabs for indentation, making the code completely unreadable? Or did you ever try to compare two versions of a Java file where the line endings changed, obfuscating the one line of code that really changed? This post shows...

Read More

I've been programming JavaScript for a few years now, and the one thing that definitely bothered me from the beginning was the lack of built-in support for private object members. The feeling that anyone using your code (including yourself) could by accident or intent mess with the internals of your objects isn't great. Not just can anyone change the value of any property at...

Read More