Apologies for reviving this old thread, but I was wondering the same thing.
How is the Jdt class (or its superclass, really) meant to be used?

BTW, a workaround for Matthias' case is

eclipse {
  jdt {
    file {
      whenMerged {jdt ->
        def propertiesField =

org.gradle.plugins.ide.internal.generator.PropertiesPersistableConfigurationObject.getDeclaredField('properties')
        propertiesField.accessible = true
        Properties properties = propertiesField.get(jdt)

        properties.setProperty
'org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch', 'error'
        // etc
      }
    }
  }
}

2011/10/31 Matthias Pfau <[email protected]>

> Hi,
> I just tried to customize the generated eclipse compiler settings.
> However, I wasn't able to find out how to add properties to the
> .settings/org.eclipse.jdt.**core.prefs.
>
> What I tried was:
>
> eclipse {
>  jdt {
>    file {
>      beforeMerged { jdt ->
>
> jdt.properties['org.eclipse.**jdt.core.compiler.problem.**incompleteEnumSwitch']
>  = 'error'
>
> jdt.properties['org.eclipse.**jdt.core.compiler.problem.**assertIdentifier']
> = 'ignore'
>
>        println(jdt.dump())
>        println(jdt.properties.dump())
>      }
>    }
>  }
> }
>
> Unfortunately, this does not seem to work. Any ideas?
>
> Kind regards
> Matthias
>
> ------------------------------**------------------------------**---------
> To unsubscribe from this list, please visit:
>
>   
> http://xircles.codehaus.org/**manage_email<http://xircles.codehaus.org/manage_email>
>
>
>

Reply via email to