How to get the form compiler to generate references to a different package?

Hi,

I need to move the uiDesigner classes in com.intellij.uiDesigner.core to some other package. The reasons are complicated but I need to stay away from the com package.

I can ofcourse move the sources (found in redist) to xx.yy.zz and compile them there. But the form compiler still generates references to the original package (com.intellij.uiDesigner.core).
Is there any way I can make it generate references to my xx.yy.zz package instead?

Any help appreciatesd,

Tom

0
5 comments

Hello Tom,

One option is to stop using our GridLayoutManager and switch to one of the
standard Swing layout managers. Then your code would not depend on any classes
from the com.intellij package.

Another option is to use bytecode instrumentation and to patch the code of
the javac2 Ant task (available in redist\src directory) so that it would
generate references to code in a different package.

For source code generation, there's currently no way to make it reference
a different package.

I need to move the uiDesigner classes in
com.intellij.uiDesigner.core to some other package. The reasons are
complicated but I need to stay away from the com package.

I can ofcourse move the sources (found in redist) to xx.yy.zz and
compile them there. But the form compiler still generates references
to the original package (com.intellij.uiDesigner.core).

Is there any way I can make it generate references to my xx.yy.zz
package instead?


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Thanks for the quick reply Dmitry,

One option is to stop using our GridLayoutManager and switch to one of the
standard Swing layout managers. Then your code would not depend on any classes
from the com.intellij package.

The JetBrains GridLayoutManager is the one I want, after using the others I keep switching back because it just does what I want. So this is no option.

Another option is to use bytecode instrumentation and to patch the code of
the javac2 Ant task (available in redist\src directory) so that it would
generate references to code in a different package.

I can not use byte code injection, because I need to check the sources into our VCS and other people need to compile from it with 'other tools'. So the gui code needs to be in the source. No option either.

For source code generation, there's currently no way to make it reference
a different package.

I do not doubt your answer, but I am curious why. Are the sources to that part not in redist/src? I admit that I already scanned there and could not easily find where the source code is generated. Can you shed some light?

-Tom

0

Hello Tom,

For source code generation, there's currently no way to make it
> reference a different package.


I do not doubt your answer, but I
am curious why. Are the sources to that part not in redist/src? I
admit that I already scanned there and could not easily find where the
source code is generated. Can you shed some light?


The form source code generator can only run as part of IntelliJ IDEA and
not standalone (as an Ant task). It lives inside the UI Designer plugin,
which is not available as open-source.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

I understand.

Could I pursuade you to make a change to use a property as the package for the code generation?

So for instance I could put

-DGUI_CORE_PACKAGE=xx.yy.zz

in my idea.exe.vmoptions to make the GUI generator do this:

import xx.yy.zz.GridLayoutManager;
import xx.yy.zz.GridConstraints;
import xx.yy.zz.Spacer;

instead of this:

import com.intellij.uiDesigner.core.GridLayoutManager;
import com.intellij.uiDesigner.core.GridConstraints;
import com.intellij.uiDesigner.core.Spacer;


It would make me very happy and it seems to me a rather low impact/low danger change.

-Tom

0

Hmmm, well, I interpret the silence as "no, this is not something we are going to do".
Is this a correct interpretation?
Or should I enter a JIRA?

0

Please sign in to leave a comment.