title: Automatically convert properties file in Java source
body: <p>I've a configuration file <code>config.properties</code> that I use to store all the needed configurations for my application. I also use a Java class <code>ApplicationConfig</code> loaded by spring, that essentially maps each property to Java getters.</p>
  
  <p><strong>config.properties</strong></p>
  
  <pre><code>main.path=C:\\
  </code></pre>
  
  <p><strong>ApplicationConfig.java</strong></p>
  
  <pre><code>public class ApplicationConfig {
      private static transient Properties config;
  
      public ApplicationConfig(Properties config) {
          ApplicationConfig.config = config;
      }
  
      public static String getMainPath() {
          return config.getProperty("main.path");
      }
  }
  </code></pre>
  
  <p>Each and every time I change the properties file I've to rework my Java class. Since it's a simple transformation that can be easily done programmatically, is there a way to instruct Eclipse that every time I save the properties file (or on build) the java file gets reworked automatically? </p>