Search in sources :

Example 1 with SoundObjectPlugin

use of blue.plugin.SoundObjectPlugin in project blue by kunstmusik.

the class SoundObjectPluginProcessor method handleProcess.

@Override
protected boolean handleProcess(Set<? extends TypeElement> set, RoundEnvironment env) throws LayerGenerationException {
    Elements elements = processingEnv.getElementUtils();
    for (Element e : env.getElementsAnnotatedWith(SoundObjectPlugin.class)) {
        TypeElement clazz = (TypeElement) e;
        SoundObjectPlugin sObjPlugin = clazz.getAnnotation(SoundObjectPlugin.class);
        String teName = elements.getBinaryName(clazz).toString();
        File f = layer(e).file("blue/score/soundObjects/" + teName.replace('.', '-') + ".instance").intvalue("position", sObjPlugin.position()).bundlevalue("displayName", sObjPlugin.displayName()).boolvalue("live", sObjPlugin.live());
        f.write();
    }
    return true;
}
Also used : TypeElement(javax.lang.model.element.TypeElement) Element(javax.lang.model.element.Element) TypeElement(javax.lang.model.element.TypeElement) Elements(javax.lang.model.util.Elements) File(org.openide.filesystems.annotations.LayerBuilder.File) SoundObjectPlugin(blue.plugin.SoundObjectPlugin)

Aggregations

SoundObjectPlugin (blue.plugin.SoundObjectPlugin)1 Element (javax.lang.model.element.Element)1 TypeElement (javax.lang.model.element.TypeElement)1 Elements (javax.lang.model.util.Elements)1 File (org.openide.filesystems.annotations.LayerBuilder.File)1