use of blue.plugin.ScoreObjectEditorPlugin in project blue by kunstmusik.
the class ScoreObjectEditorPluginProcessor method handleProcess.
@Override
protected boolean handleProcess(Set<? extends TypeElement> set, RoundEnvironment env) throws LayerGenerationException {
Elements elements = processingEnv.getElementUtils();
for (Element e : env.getElementsAnnotatedWith(ScoreObjectEditorPlugin.class)) {
TypeElement clazz = (TypeElement) e;
String teName = elements.getBinaryName(clazz).toString();
ScoreObjectEditorPlugin instrumentEditorPlugin = clazz.getAnnotation(ScoreObjectEditorPlugin.class);
File f = layer(e).file("blue/score/objectEditors/" + teName.replace('.', '-') + ".instance");
TypeMirror tm = null;
try {
instrumentEditorPlugin.scoreObjectType();
} catch (MirroredTypeException mte) {
tm = mte.getTypeMirror();
}
f.stringvalue("scoreObjectType", tm.toString());
f.write();
}
return true;
}
Aggregations