Search in sources :

Example 6 with File

use of org.openide.filesystems.annotations.LayerBuilder.File in project blue by kunstmusik.

the class InstrumentPluginProcessor method handleProcess.

@Override
protected boolean handleProcess(Set<? extends TypeElement> set, RoundEnvironment env) throws LayerGenerationException {
    Elements elements = processingEnv.getElementUtils();
    for (Element e : env.getElementsAnnotatedWith(InstrumentPlugin.class)) {
        TypeElement clazz = (TypeElement) e;
        InstrumentPlugin noteProcessorPlugin = clazz.getAnnotation(InstrumentPlugin.class);
        String teName = elements.getBinaryName(clazz).toString();
        File f = layer(e).file("blue/instruments/" + teName.replace('.', '-') + ".instance").intvalue("position", noteProcessorPlugin.position()).bundlevalue("displayName", noteProcessorPlugin.displayName());
        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) InstrumentPlugin(blue.plugin.InstrumentPlugin) File(org.openide.filesystems.annotations.LayerBuilder.File)

Example 7 with File

use of org.openide.filesystems.annotations.LayerBuilder.File in project blue by kunstmusik.

the class ProjectPluginEditorItemProcessor method handleProcess.

@Override
protected boolean handleProcess(Set<? extends TypeElement> set, RoundEnvironment env) throws LayerGenerationException {
    Elements elements = processingEnv.getElementUtils();
    for (Element e : env.getElementsAnnotatedWith(ProjectPluginEditorItem.class)) {
        TypeElement clazz = (TypeElement) e;
        String teName = elements.getBinaryName(clazz).toString();
        ProjectPluginEditorItem ppePlugin = clazz.getAnnotation(ProjectPluginEditorItem.class);
        File f = layer(e).file("blue/project/plugins/editors/" + teName.replace('.', '-') + ".instance").intvalue("position", ppePlugin.position()).bundlevalue("displayName", ppePlugin.displayName());
        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) ProjectPluginEditorItem(blue.plugin.ProjectPluginEditorItem)

Example 8 with File

use of org.openide.filesystems.annotations.LayerBuilder.File 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)

Example 9 with File

use of org.openide.filesystems.annotations.LayerBuilder.File in project blue by kunstmusik.

the class ProjectPluginItemProcessor method handleProcess.

@Override
protected boolean handleProcess(Set<? extends TypeElement> set, RoundEnvironment env) throws LayerGenerationException {
    Elements elements = processingEnv.getElementUtils();
    for (Element e : env.getElementsAnnotatedWith(ProjectPluginItem.class)) {
        TypeElement clazz = (TypeElement) e;
        String teName = elements.getBinaryName(clazz).toString();
        ProjectPluginItem ppePlugin = clazz.getAnnotation(ProjectPluginItem.class);
        File f = layer(e).file("blue/project/plugins/" + teName.replace('.', '-') + ".instance").intvalue("position", ppePlugin.position());
        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) ProjectPluginItem(blue.plugin.ProjectPluginItem) File(org.openide.filesystems.annotations.LayerBuilder.File)

Aggregations

Element (javax.lang.model.element.Element)9 TypeElement (javax.lang.model.element.TypeElement)9 Elements (javax.lang.model.util.Elements)9 File (org.openide.filesystems.annotations.LayerBuilder.File)9 MirroredTypeException (javax.lang.model.type.MirroredTypeException)3 TypeMirror (javax.lang.model.type.TypeMirror)3 BarRendererPlugin (blue.plugin.BarRendererPlugin)1 InstrumentEditorPlugin (blue.plugin.InstrumentEditorPlugin)1 InstrumentPlugin (blue.plugin.InstrumentPlugin)1 NoteProcessorPlugin (blue.plugin.NoteProcessorPlugin)1 ProjectPluginEditorItem (blue.plugin.ProjectPluginEditorItem)1 ProjectPluginItem (blue.plugin.ProjectPluginItem)1 ScoreMouseListenerPlugin (blue.plugin.ScoreMouseListenerPlugin)1 ScoreObjectEditorPlugin (blue.plugin.ScoreObjectEditorPlugin)1 SoundObjectPlugin (blue.plugin.SoundObjectPlugin)1