Form compiler in custom build?

We are testing out a command line build of our plugin using gradle.  So far things are looking okay, EXCEPT none of our dialogs that use ".form" files to setup things work.  It appears we are missing the post-processing of these forms to inject the $$$setupUI$$$ methods.

I'm been looking around the idea-community code and there's an file that maybe is doing this?  Is there somewhere in the ant build for idea-community that triggers this form processing that I can perhaps try to replicate for our plugin build?

Comment actions Permalink

If you're using Gradle, the easiest option is to change the UI Designer to generate source code instead of instrumenting bytecode.You can change this option in the UI Designer settings.

Comment actions Permalink

Assuming we want to maybe try to avoid that, is there somewhere I can look in the build.xml and related scripts that will point me in the right
direction for bytecode manipulation?

Comment actions Permalink

The bytecode instrumentation is performed by the <javac2> Ant task.

Comment actions Permalink

I was also looking for a way to do that in an Ant build, and Dmitry's hint was helpful, I imported the taskdef and it seems to process the forms correctly:

<path id="compile.runtime.classpath">
    <fileset dir="${ideaRoot}/lib" includes="**/*.jar"/>
<taskdef name="javac2" classname="com.intellij.ant.Javac2">
    <classpath refid="compile.classpath"/>
<target name="build">
    <javac2 ...>

Please sign in to leave a comment.