Suddenly didn't see my components in the palette

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Suddenly didn't see my components in the palette

Postby mkornatzki » Wed Dec 16, 2009 7:28 am

Hi,

in the past i configured my palette with wbp-component.xml, wbp-factory.xml, ...

Now all my components didn't get shown in the palette.
I guess the reason is that some constructors of the components gets changed.

Is there a way to see what components are not correct for the palette (debugmode, ...) to correct ist or do i have to take a look on all configuration files?

regards,
michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: Suddenly didn't see my components in the palette

Postby mkornatzki » Thu Dec 17, 2009 12:01 am

Now i have some mor information.

I have deleted all the Components that i have added to the palette and try to use add static factory.
Then i choose my factory class and i didn't see any Method for this factory.
Now i delete the wbp-factory.xml for this class and then i can see all the methods.

Did you change the syntax for the wbp-factory files?
My factory class and wbp file didn't change since the last time i work with it.

regards,
michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: Suddenly didn't see my components in the palette

Postby Konstantin.Scheglov » Thu Dec 17, 2009 1:08 am

Do you have anything in "Error log" view?
Do you have messages in editor-level error log (red icon on editor toolbar, at left)?

Can you send your factory and description to wb-support@instantiations.com ?

We've added some changes into factory description parsing (mainly for presentation and HTML support).
So, may be something broken and your samples will help to find problem and fix it.
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Re: Suddenly didn't see my components in the palette

Postby mkornatzki » Thu Dec 17, 2009 2:21 am

i was the guy who asked for the html feature and to fix some problems with the palette.
But at least my wbp and factorys are working without problems.

In the Eclipse Error log i have the following:
!ENTRY org.eclipse.equinox.p2.directorywatcher 4 0 2009-12-17 10:15:39.017
!MESSAGE The installable unit com.instantiations.designer.jdt.fragment.translated_host_properties is missing the filename property.

the factory class and the wbp didn't change.

If i take a SwingDesigner 7.2.0r35x200911240638 everything works fine.

here an example:
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<factory>
   <method name="createDefaultPanel" factory="true">
      <name>Panel</name>
      <description>Panel ohne sichtbare Border aber mit Defaultabst&#x00E4;nden zum Rand
       </description>
   </method>
   
   <method name="createDefaultEtchedBorderPanel" factory="true">
      <name>EtchedBorderPanel</name>
      <description>Panel mit Etchedborder und Defaultabst&#x00E4;nden zum Rand
       </description>
   </method>   
   
   <method name="createDefaultEtchedBorderPanelTop" factory="true">
      <name>EtchedBorderPanelTop</name>
      <description>Panel mit Etchedborder und Abst&#x00E4;nden (Insets), die denen einer Titledborder mit Titleposition TOP entsprechen
       </description>
   </method>   
   
   <method name="createDefaultEtchedBorderPanel" factory="true">
      <name>EtchedBorderPanel(borderInsets)</name>
      <description>Panel mit Etchedborder und Abst&#x00E4;nden (Insets), die denen einer Titledborder mit Titleposition TOP entsprechen
       </description>
       
       <parameter type="java.awt.Insets"/>
   </method>   
   
   <method name="createDefaultTitledBorder" factory="true">
      <name>TitledBorderPanel(title)</name>
      <description>Panel mit Titledborder und Defaultabst&#x00E4;nden der Inhalte zum Rand
       </description>
       
       <parameter type="java.lang.String"/>
   </method>
   
   <method name="createDefaultToolbar" factory="true">
      <name>Toolbar</name>
      <description>Toolbar nicht floatable.
         Die Gr&#x00F6;&#x00DF;e passt sich an den Inhalt an bzw. wird &#x00FC;ber constraints beim Hinzuf&#x00FC;gen zum Container konfiguriert.
       </description>
   </method>      
</factory>

Code: Select all
public class ContainerFactory {

   public static JPanel createDefaultPanel() {
      JPanel pnl = new JPanel();
      pnl.setBorder(new EmptyBorder(2, 2, 2, 2));
      return pnl;
   }

   public static JPanel createDefaultEtchedBorderPanel() {
      return createDefaultEtchedBorderPanel(new Insets(0, 0, 0, 0));
   }

   public static JPanel createSeparator() {
      JPanel result = new JPanel();
      result.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
      result.setPreferredSize(new Dimension(5, 5));
      return result;
   }

   public static JPanel createDefaultEtchedBorderPanelTop() {
      return createDefaultEtchedBorderPanel(new Insets(7, 2, 2, 2));
   }

   public static JPanel createDefaultEtchedBorderPanel(Insets borderInsets) {
      JPanel pnl = new JPanel();
      Insets newBorderInsets = borderInsets == null ? new Insets(0, 0, 0, 0) : borderInsets;
      pnl.setBorder(new CompoundBorder(new EmptyBorder(newBorderInsets), new CompoundBorder(
            new EtchedBorder(EtchedBorder.LOWERED, null, null), new EmptyBorder(2, 2, 2, 2))));
      return pnl;
   }

   public static JPanel createDefaultTitledBorder(String title) {
      JPanel pnl = new JPanel();
      pnl.setBorder(new CompoundBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED,
            null, null), title, TitledBorder.LEADING, TitledBorder.TOP, null, null),
            new EmptyBorder(0, 0, 0, 0)));
      return pnl;
   }

   public static JToolBar createDefaultToolbar() {
      JToolBar result = new JToolBar();
      result.setFloatable(false);
      result.setMinimumSize(new Dimension(10, 10));
      return result;
   }

}


regards,
michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: Suddenly didn't see my components in the palette

Postby Konstantin.Scheglov » Thu Dec 17, 2009 10:33 am

mkornatzki wrote:i was the guy who asked for the html feature and to fix some problems with the palette.


Yes, I know. ;-)

Try to update, I think this problem is fixed now.
It was caused by hexadecimal entities.
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Re: Suddenly didn't see my components in the palette

Postby mkornatzki » Fri Dec 18, 2009 6:11 am

thank you, it works now :)

cheers, michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: Suddenly didn't see my components in the palette

Postby Eric Clayberg » Fri Dec 18, 2009 6:24 am

Glad it works for you.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to Swing Designer

Who is online

Users browsing this forum: No registered users and 1 guest