SourceGeneratingCompiler generated items ignored?

I'm using a SourceGeneratingCompiler for a custom file type. It produces .java
files. When I right-click a file of the custom type, IDEA correctly invokes my
compiler. However, it seems to ignore the GeneratedItems that I produce, whether
I generate them into /tmp or into a module source folder. It doesn't even see
the generated files until I click Synchronize!

Am I doing something wrong? What is it?

3 comments
Comment actions Permalink

please check that generate() method returns all the items that were successfully generated.
Also note that item1.equals(item2) must be true where "item1" is an item returned by getGenerationItems(); "item2" is the corresponding]]> item returned by generate()

0
Comment actions Permalink

Eugene, they are not only equal() but they are ==. I'm passing the same objects
which are passed to generate().

Eugene Zhuravlev wrote:

please check that generate() method returns all the items that were
successfully generated. Also note that item1.equals(item2) must be true where
"item1" is an item returned by getGenerationItems(); "item2" is the
<b>corresponding</b> item returned by generate()

0
Comment actions Permalink

Eugene, will you take a look? Compilation doesn't work at all for me and I think
I'm doing everything correctly.

I generate files to /tmp. If I generate to a sourcepath the same thing happens.
I return the same exact GeneratedItem[] which is passed to me for compile.

Eugene Zhuravlev wrote:

please check that generate() method returns all the items that were successfully generated.
Also note that item1.equals(item2) must be true where "item1" is an item returned by getGenerationItems(); "item2" is the <b>corresponding</b> item returned by generate()

0

Please sign in to leave a comment.