WebBiscuit

WebBiscuit

The Webbiscuit Blog: Taking the Internet crumb by crumb…

  • Home
  • Software
    • Palette Parser
    • XHTML Generator
  • Articles
    • The Strategy Pattern
    • The Factory Pattern
    • Memory leaks
  • About Web Biscuit
  • Contact

Making Eclipse more like Visual Studio

Posted in Eclipse, IDE, Visual Studio by Daniel
Sep 30 2011
TrackBack Address.

I’ve recently started developing using the Eclipse IDE for a Top Secret (TS) Project (nothing to do with Android development at all, no…), and while I do like it very much the formatting has been driving me crazy.

I am used to C++ and C# coding, and I like white space. White space makes me happy. I like to write code that looks like this:

class AmazingClass
{
    void EatBiscuit()
    {
        if(m_MyBiccy == digestive)
        {
            // Run crumb management module
        }
        else
        {
           // Something involving a jammy dodger
        }
    }
}

This is the Visual Studio way. It looks nice. Now this is the Eclipse default format:

class AmazingClass{
    void EatBiscuit(){
        if(m_MyBiccy == digestive){
            // Run crumb management module
        }else{
           // Something involving a jammy dodger
        }
    }
}

Exactly the same thing, but squished into a nasty format. Luckily, Eclipse allows you to modify the formatting settings. So I went through each of them, and placed white space wherever I felt it was missing. As a result, the IDE now generates lovely-looking code again. My enter key gets a break from all of my angry bashing! So with me and the keyboard happy; Webbiscuit fans, you can be happy too!

Download eclipse_to_vs XML settings.

Above is this settings XML file. To install, unzip and within Eclipse go to Project->Properties->Formatter…and navigate to the XML file. White space should then be magically returned to your screen!

Shows the format settings within the Eclipse IDE

Find this screen under Project->Properties

Share
Tagged as: formatting, style, white-space
  • Sin Jeong-hun

    Thanks. I searched Google for that, and I got your file. It saved me from tedious mouse clicks!

    • http://www.webbiscuit.co.uk Daniel

      You are welcome!

  • Fack

    Thank you dear

    • http://www.webbiscuit.co.uk/ WebBiscuit

      Not a problem dear!

  • Josh Stribling

    I googled: make eclipse more like visual studio

    And found this…
    You’re Awesome, Thanks!!!

    • http://www.webbiscuit.co.uk/ WebBiscuit

      Hope it helps!

RSS Other Nibbles

  • Palette Parser Update – Now supports CMYK format
  • Are you a biscuit?
  • Base64 Encoder and Boost
  • The Sleep Experiment
  • A macro to create a C++ implementation from a header declaration
  • A macro to flip between the source and header file (and back again)
  • An introduction to three VC++ Macros: How they came to be
  • Making Eclipse more like Visual Studio
  • A tokeniser using STL
  • More of WebBiscuit’s WordPress Plugins

Categories

  • Boost
  • C++
  • code
  • CodeProject
  • CSharp
  • domains
  • Eclipse
  • experiments
  • funny
  • games
  • IDE
  • macro
  • migrating
  • plugins
  • productivity
  • reviews
  • sleeping
  • STL
  • Test
  • tips
  • VB
  • Visual Studio
  • web tips
  • WebBiscuit Software
  • wordpress
  • workarounds

Blogroll

  • Create colour palettes with Kuler
  • Free Icons with Axialis Software

Stale Biscuits

  • December 2012 (1)
  • August 2012 (1)
  • April 2012 (1)
  • January 2012 (1)
  • December 2011 (2)
  • November 2011 (1)
  • September 2011 (1)
  • August 2011 (1)
  • July 2011 (9)

Eating the web bit by bit

Powered by WordPress | “Blend” from Spectacu.la WP Themes Club