Archive

Archive for the ‘eclipse’ Category

Configure Intellij to use default Eclipse Java import layout

August 12, 2015 Leave a comment

Eclipse and Intellij use different default layouts of Java imports. If used on the same project, Eclipse’s “Organize Imports” will compete with Intellij’s “Optimize Imports“.

To avoid distracting back-and-forth code changes, Intellij can be configured to match the default Eclipse behavior:

Go to File – Settings – Editor – Code Style – Java – Imports tab

Prevent on-demand imports (i.e. wildcards) by settings high count limits:
intellij-java-imports-no-wildcards

Define the imports layout (i.e. grouping and order) like this:
intellij-java-imports-layout

Advertisements

Fix Eclipse installation after Cygwin unzip

August 5, 2015 Leave a comment

I used Cygwin’s unzip on Windows 7 to unpack freshly downloaded Eclipse zip packages. When trying to start eclipse.exe, I was getting weird error messages:

For Luna (4.4):

eclipse-luna-error-after-cygwin-unzip

For Mars (4.5):

eclipse-mars-error-after-cygwin-unzip

It turned out that after unzipping, the executable permission was not set on ‘exe’ and ‘dll’ files, so I had to fix it like this:

find eclipse \( -name '*.dll' -or -name '*.exe' \) -exec chmod +x {} \;

Categories: bash, coding, cygwin, dev-tools, eclipse

Java software engineering – reference resources

February 28, 2014 Leave a comment

My standard tools on a Windows workstation

June 11, 2013 Leave a comment

If I have to work on a Windows machine, these are the tools I usually install and use:

Free/Libre/Open Source

Free/Libre/Open Source software (“FLOSS”) with OSI certified Open Source license

Cross-platform:

  • Latest JDK
  • Intellij (Community Edition)
  • 7zip
  • Eclipse (Platform Runtime Binary + plugins required for my work)
  • Apache Tomcat
  • Apache Maven
  • Git (from git-scm.org)
  • Cygwin (with openssh, wget, nano)
  • Firefox (with Adblock, Secure Login, Firebug, Uppity)
  • Filezilla
  • LibreOffice
  • Pidgin
  • Gimp
  • Gvim
  • Wireshark
  • OpenVPN

Windows-only:

  • Notepad++
  • PdfCreator
  • Infrarecorder
  • CamStudio
  • Link Shell Extension

Closed source

Binaries currently available for download without license fees:

  • Adobe Reader
  • Sysinternals
  • Deskpins
  • MWSnap

JRuby on Rails 3.2

November 9, 2012 Leave a comment

I currently have to work on an application using JRuby on Rails 3.2. My background is 12+ years of Java centric web development using Eclipse or IntelliJ.

There are a few things that I love about working with Java in Eclipse or IntelliJ that I miss when working with Rails:

  • Java’s backwards compatibility
  • Java’s cross-platform consistency
  • That Java has a static type system and is a compiled language
  • The relatively rigid syntax of Java that prevents idiosyncratic DSLs
  • Being able to control mutability, extensibility and visibility at compile-time (private, final)
  • Java’s distinction of interfaces vs implementation classes
  • Powerful auto-completion and Refactoring in the IDE
  • Powerful code inspections and quickfixes in the IDE
  • IDE and compiler feedback about mistakes and design flaws in my code
  • The powerful and rich ORM features of JPA and Hibernate

Dynamic language fans might cringe at some of the points listed above. Feel free to provide constructive feedback or well-reasoned criticism.

There are however a couple of things that I like about Ruby on Rails 3.2:

  • Dependency management using gems and bundler
  • A very standardized project layout (directory structure and conventions)
  • Code generation (as a convenient way to quickly create sample code)
  • Out-of the box integration and support for JQuery, CoffeeScript, SASS
  • Cool gems like colorbox-rails for turning a regular view into a modal dialog
  • The asset pipeline

I am still in the early phase of my Rails experience and I will try to post more about it as things evolve.

Categories: eclipse, intellij, java Tags: ,

Java DSL for object-oriented type-safe CSS styling

July 17, 2012 Leave a comment

I am looking for something like this Java-CSS-Library, to implement server-generated CSS stylesheets backed by a type-safe object-oriented model of CSS classes and rule sets.

This is part of my ongoing quest for the perfect “pure Java” web development framework that would allow me to

  • Focus on my strongest area of expertise: Elegant Java code
  • Use refactorings and other advanced Java tooling in Eclipse or IntelliJ Community Edition
  • Ignore the HTML/HTTP vs JVM objects impedance mismatch as much as possible
Categories: eclipse, intellij, java

Maven integration (m2e) for Eclipse 3.7.x (Indigo)

January 2, 2012 3 comments

Sonatype’s Maven integration for Eclipse (m2e) has been migrated to eclipse.org and is now available from the default update site for Indigo.

This means that you no longer have to add any Sonatype update sites as mentioned on the old (now outdated) m2eclipse site.

In particular, this also means that the old “m2e-extras” update site is obsolete for Eclipse 3.7.x and later. Things like WTP integration or Subclipse integration are now available as “m2e connectors” through Window – Preferences – Maven – Discovery.

All of this is very poorly (or not at all) documented on the new m2e home page and some people had problems with these changes.

Categories: eclipse, java, maven