Problem taking Snapshot

I am trying to use the Form Snapshot feature which works great when trying to capture simple Swing forms, but gives the following error when trying to capture more complicated forms with several custom components:

Layout manager com.intellij.uiDesigner.radComponents.RadToolBar$RadToolBarLayoutManager@1190cfc does not support adding snapshot components

Am I doing something wrong? I have tried to add some of the components in the Palette in case that was causing the problem, but it didn't help. The error message isn't very helpful too!!! Anyway I hope you can find some solution to this.

Some suggestions I would like to make.
1)When creating a form from a snapshot, there should be a checkbox for optionally creating a .java file as well, as it is with the normal creation. Doing it manually from scratch is very tedious. As well as being able to take multiple snapshots in the same run, without having to go through the same process again(Right click - New - Form Snapshot).
2) Adding custom components one by one is also tedious. A bulk add function would be most helpfull.
3) Could there not be more ways of adding components to the palette, such as from methods coming from a UIFactory class and/or from classes that wrap Swing components and have a getComponent():Component method or something?

Overall, the designer is very good and now is really competing with both Matisse and WidnowBuilder. Intentions on the Form designer is my favourite feature along with the form Snapshot. Congratulations for the excellent work done. Keep up the good work!!!

Best Regards,

Panayiotis Vlissidis

P.s: Here's a dump from the console. If you need more info, let me know:



Sending response: 1;javax.swing.JFrame;;Modules GUI Viewer
.

End of stream receiving command
SnapShooter connection accepted
Sending response: 2;javax.swing.JFrame;;Modules GUI Viewer
.

Sending response: 3;javax.swing.JPanel;java.awt.BorderLayout;
.

Sending response: 4;javax.swing.JSplitPane;;
.

Sending response: 5;javax.swing.JScrollPane;;
6;javax.swing.JTabbedPane;;
.

Sending response: 7;javax.swing.JTree;;
.

Sending response: 8;javax.swing.JScrollPane;;
.

Sending response: 9;javax.swing.JPanel;java.awt.BorderLayout;
.

Sending response: 10;javax.swing.JScrollPane;;
11;com.vis.apps.sb3.gui.common.components.table.SBTableToolBar;;
.

Sending response: 12;com.vis.apps.sb3.gui.common.components.SBTable;;
.

Sending response: 13;javax.swing.CellRendererPane;;
.

Sending response: .

Sending response: 14;javax.swing.JToolBar$1;;
15;javax.swing.JToolBar$1;;
16;javax.swing.JToolBar$Separator;;
17;javax.swing.JToolBar$1;;
18;javax.swing.JToolBar$1;;
19;javax.swing.JToolBar$Separator;;
20;javax.swing.JToolBar$1;;
21;javax.swing.JToolBar$1;;
22;javax.swing.JToolBar$1;;
.

Sending response: .

Sending response: .

Sending response: .

Sending response: .

Sending response: .

Sending response: .

Sending response: .

Sending response: .

Sending response: .

java.lang.UnsupportedOperationException: Layout manager com.intellij.uiDesigner.radComponents.RadToolBar$RadToolBarLayoutManager@1190cfc does not support adding snapshot components
at com.intellij.uiDesigner.radComponents.RadLayoutManager.addSnapshotComponent(RadLayoutManager.java:6)
at com.intellij.uiDesigner.radComponents.RadContainer.importSnapshotComponent(RadContainer.java:142)
at com.intellij.uiDesigner.radComponents.RadComponent.createSnapshotComponent(RadComponent.java:135)
at com.intellij.uiDesigner.radComponents.RadContainer.importSnapshotComponent(RadContainer.java:224)
at com.intellij.uiDesigner.radComponents.RadComponent.createSnapshotComponent(RadComponent.java:135)
at com.intellij.uiDesigner.snapShooter.SnapShooterDaemon$SuspendSwingRunnable.a(SnapShooterDaemon.java:15)
at com.intellij.uiDesigner.snapShooter.SnapShooterDaemon$SuspendSwingRunnable.a(SnapShooterDaemon.java:40)
at com.intellij.uiDesigner.snapShooter.SnapShooterDaemon$SuspendSwingRunnable.run(SnapShooterDaemon.java:19)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
Sending response: E:Layout manager com.intellij.uiDesigner.radComponents.RadToolBar$RadToolBarLayoutManager@1190cfc does not support adding snapshot components
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
End of stream receiving command

2 comments
Comment actions Permalink

You will have to excuse me for the hassle but has any of the developers checked the forementioned problem? If so, can you please point me to the right direction. Am I doing something wrong or is this a potential bug?

Thanks,

Panayiotis Vlissidis

Message was edited by:
Panayiotis Vlissidis

0
Comment actions Permalink

Hello Panayiotis,

First of all - thanks for your feedback, and sorry for the delay with the
answer.

PV> I am trying to use the Form Snapshot feature which works great when
PV> trying to capture simple Swing forms, but gives the following error
PV> when trying to capture more complicated forms with several custom
PV> components:
PV>
PV> Layout manager
PV> com.intellij.uiDesigner.radComponents.RadToolBar$RadToolBarLayoutMan
PV> ager@1190cfc does not support adding snapshot components
PV>
PV> Am I doing something wrong? I have tried to add some of the
PV> components in the Palette in case that was causing the problem, but
PV> it didn't help. The error message isn't very helpful too!!! Anyway I
PV> hope you can find some solution to this.

This is a bug which will be fixed in the next EAP build.

PV> Some suggestions I would like to make.
PV>
PV> 1)When creating a form from a snapshot, there should be a checkbox
PV> for optionally creating a .java file as well, as it is with the
PV> normal creation. Doing it manually from scratch is very tedious.

What's your intended use case for this? I assumed that snapshots would be
used when you already have a Java class with some UI layout code and some
other code (the logic behind the UI). Then you would capture the form snapshot,
bind the form components to fields in the class and remove the UI layout
code.

PV> As
PV> well as being able to take multiple snapshots in the same run,
PV> without having to go through the same process again(Right click -
PV> New - Form Snapshot).

I'll consider this.

PV> 2) Adding custom components one by one is also tedious. A bulk add
PV> function would be most helpfull.

This has been requested a number of times already, and I've filed a feature
request for this:
http://www.jetbrains.net/jira/browse/IDEADEV-8033

PV> 3) Could there not be more ways of adding components to the palette,
PV> such as from methods coming from a UIFactory class and/or from
PV> classes that wrap Swing components and have a
PV> getComponent():Component method or something?

Currently only distrinct component classes can be added to the palette. If
you have a class with non-standard creation code (for example, a factory
or a wrapper), you can set the "Custom Create" flag and write the creation
code in the createUIComponents() method.

PV> Overall, the designer is very good and now is really competing with
PV> both Matisse and WidnowBuilder. Intentions on the Form designer is
PV> my favourite feature along with the form Snapshot. Congratulations
PV> for the excellent work done. Keep up the good work!!!

Thanks!

--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.