How to Customize the GUI Designer Plugin

Hi this is Pramod,

I am using Intellij 9.0.4 Ultimate, and want to customize the plugin GUIDesigner. Actually i want to show my own controls instead of Swing Controls (JLabel, JTextBox, .. etc.) on the palatte. so my requirement is to replace the Swing Controls from my own controls on the palatte and also want to modify the porperties window and add other properties like window to show the other special properties of the control. So i need the help to do so.

I request you to please tell me the options to achieve this and please give me good documentation for this, if you can provide. One more request you to please tell me the steps - by steps how should i proceed and what are pre-requisite.

Regards,

Pramod

5 comments
Comment actions Permalink

Hello Pramod,

I'm afraid we're unable to give step-by-step instructions for such customizations
of IntelliJ IDEA. The code is open-source, so you can look at it and ask
specific questions, but giving you detailed instructions is outside the level
of support that JetBrains can provide.

I am using Intellij 9.0.4 Ultimate, and want to customize the plugin
GUIDesigner. Actually i want to show my own controls instead of Swing
Controls (JLabel, JTextBox, .. etc.) on the palatte. so my requirement
is to replace the Swing Controls from my own controls on the palatte
and also want to modify the porperties window and add other properties
like window to show the other special properties of the control. So i
need the help to do so.

I request you to please tell me the options to achieve this and please
give me good documentation for this, if you can provide. One more
request you to please tell me the steps - by steps how should i
proceed and what are pre-requisite.


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


0
Comment actions Permalink

Hi,

I have downloaded the Source code of intelliJ 9.0.4 and import the source code of uiDesigner. Compilation was done successfully, but i am getting the following exception when trying to create the new GUI Form:

[  36812]  ERROR - com.intellij.ide.IdeEventQueue - Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(56,153),absolute(401,346),button=1,modifiers=Button1,clickCount=1] on ###overrideRedirect###
java.lang.NullPointerException
at com.intellij.uiDesigner.actions.CreateFormAction$MyDialog.<init>(CreateFormAction.java:172)
at com.intellij.uiDesigner.actions.CreateFormAction.invokeDialog(CreateFormAction.java:80)
at com.intellij.ide.actions.CreateElementActionBase.actionPerformed(CreateElementActionBase.java:74)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:218)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:81)
at com.intellij.ui.plaf.beg.BegMenuItemUI.a(BegMenuItemUI.java:496)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:43)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:516)
at java.awt.Component.processMouseEvent(Component.java:6267)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6032)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at com.intellij.ide.IdeEventQueue.f(IdeEventQueue.java:627)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:504)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:405)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
[  36812]  ERROR - com.intellij.ide.IdeEventQueue - IntelliJ IDEA 9.0.4  Build #IU-95.627
[  36812]  ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.6.0_22
[  36812]  ERROR - com.intellij.ide.IdeEventQueue - VM: Java HotSpot(TM) Client VM
[  36812]  ERROR - com.intellij.ide.IdeEventQueue - Vendor: Sun Microsystems Inc.
[  36812]  ERROR - com.intellij.ide.IdeEventQueue - OS: Windows 2003
[  36812]  ERROR - com.intellij.ide.IdeEventQueue - Last Action: NewForm

Here are the steps i have followed :

Step 1: Removed the existing uiDesigner plugin from plugin folder of intellij. [so that there must not be two plugin of same name.]

Step 2: import the downloaded code of uiDesigner plugin into intellij by making new plugin from scratch and pasted the code into src folder. [I have used the same name uiDesigner for plugin]

Step 3: Compiled the code by selecting the Menu-Item Build-> make Project.

Step 4: Create the configuration to run the plugin

Step 5: Run the configuration.

Step 6: Running the configuration new Instance of Intellij appeared on the screen

Step 7: Right click on the src and selected  New | GUI Form from right click context menu. And it is throwing the exception pasted above.

I am not clear that which class is intializing the following controls

[        private JPanel myTopPanel;
        private JTextField myFormNameTextField;
        private JCheckBox myCreateBoundClassCheckbox;
        private JTextField myClassNameTextField;
        private JComboBox myBaseLayoutManagerCombo;

]

of inner class MyDialog of CreateFormAction. [As these are not initialized thats why it is throwing the NullPointer Exception]

I request you to please help me out in solving this problem.

Regards,

Pramod

0
Comment actions Permalink

Hello Pramod,

If you're compiling the code with Ant rather than IntelliJ IDEA itself, you
need to use the javac2 task to ensure that the GUI forms are compiled correctly.
You can find more information on the javac2 task in the help system.

I have downloaded the Source code of intelliJ 9.0.4 and import the
source code of uiDesigner. Compilation was done successfully, but i am
getting the following exception when trying to create the new GUI
Form:

  ERROR - com.intellij.ide.IdeEventQueue - Error during
dispatching of
java.awt.event.MouseEvent[MOUSE_RELEASED,(56,153),absolute(401,346),bu
tton=1,modifiers=Button1,clickCount=1] on ###overrideRedirect###
java.lang.NullPointerException
at
com.intellij.uiDesigner.actions.CreateFormAction$MyDialog.<init>(Creat
eFormAction.java:172)
at
com.intellij.uiDesigner.actions.CreateFormAction.invokeDialog(CreateFo
rmAction.java:80)
at
com.intellij.ide.actions.CreateElementActionBase.actionPerformed(Creat
eElementActionBase.java:74)
at
com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitte
r.actionPerformed(ActionMenuItem.java:218)
at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:199
5)
at
com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerfor
med(ActionMenuItem.java:81)
at com.intellij.ui.plaf.beg.BegMenuItemUI.a(BegMenuItemUI.java:496)
at
com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:4
3)
at
com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleas
ed(BegMenuItemUI.java:516)
at java.awt.Component.processMouseEvent(Component.java:6267)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6032)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at com.intellij.ide.IdeEventQueue.f(IdeEventQueue.java:627)
at
com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:504)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:405)
at
com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:369)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThrea
d.java:269)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.j
ava:184)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThrea
d.java:174)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
  ERROR - com.intellij.ide.IdeEventQueue - IntelliJ IDEA
9.0.4  Build #IU-95.627
  ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.6.0_22

  ERROR - com.intellij.ide.IdeEventQueue - VM: Java
HotSpot(TM) Client VM

  ERROR - com.intellij.ide.IdeEventQueue - Vendor: Sun
Microsystems Inc.

  ERROR - com.intellij.ide.IdeEventQueue - OS: Windows 2003

  ERROR - com.intellij.ide.IdeEventQueue - Last Action:
NewForm

Here are the steps i have followed :

Step 1: Removed the existing uiDesigner plugin from plugin folder of
intellij.

Step 2: import the downloaded code of uiDesigner plugin into intellij
by making new plugin from scratch and pasted the code into src folder.


Step 3: Compiled the code by selecting the Menu-Item Build-> make
Project.

Step 4: Create the configuration to run the plugin

Step 5: Run the configuration.

Step 6: Running the configuration new Instance of Intellij appeared on
the screen

Step 7: Right click on the src and selected  New | GUI Form from right
click context menu. And it is throwing the exception pasted above.

I am not clear that which class is intializing the following controls
[        private JPanel myTopPanel;
private JTextField myFormNameTextField;
private JCheckBox myCreateBoundClassCheckbox;
private JTextField myClassNameTextField;
private JComboBox myBaseLayoutManagerCombo;
]
of inner class MyDialog of CreateFormAction. [As these are not
initialized thats why it is throwing the NullPointer Exception]

I request you to please help me out in solving this problem.

Regards,
Pramod
---
Original message URL:
http://devnet.jetbrains.net/message/5281788#5281788


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


0
Comment actions Permalink

Hi Dmitry,

I am using the Intellij Idea to compile the code, i have not created any build.xml to compile the code. One more thing i have tried to search the javac2 in Help but not able to get any content.

Your help is valuable.

Regards,

Pramod

0
Comment actions Permalink

Hi ,

Have you got any clue for "why the controls are not getting initialised even i am using the intellij 9.0.4 Ultimate's option to make/compile the imported source code.

Please help me, you help is valuable.

Regards,

Pramod

0

Please sign in to leave a comment.