My goal is to create a library where I find classe...
# arrow-meta
s
My goal is to create a library where I find classes that have a certain annotation. Then I want to identify the public API for that class, and generate another class that wraps that class. Will I need to create an IDE plugin to allow the new generated class to be resolved? Can anyone point me in the right direction to how I can learn to do this? The docs aren’t super helpful, and I’ve only been able to find one sample.
r
Hi Scott, You need an IDE plugin when you perform transformations in place in the same file for example with Transform.replace
But if you use Transform.newSources it generates new code in new files and in that case they don’t need to change the synth descriptors of the original files
s
@raulraja Thanks for responding! So how would I find classes that have certain annotations? After I do that, I should be able to use
Transform.replace
, generate a new class, and generate new files, and not require an IDE plugin? Some other questions: 1. All jvm platforms support IR in 1.4 right, so by using arrow, I can make a plugin that impacts all platforms in 1.4? 2. How does incremental compilation work? I wouldn’t want to generate a new file and have that new file compile for every compilation.
t
s
@raulraja If I add a class to a file so that class can access a private class in the same file, is an IDE plugin required?
r
Anything that mutates the tree in place as a user is typing in IDEA and adds new members to the document the user is typing on at the moment requires an IDEA plugin that provides the synth descriptors.
s
ok - IC