Are descriptions in *.wbp-factory.xml possible?

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

Are descriptions in *.wbp-factory.xml possible?

Postby mkornatzki_2 » Tue Oct 13, 2009 1:51 am

Hello,

is it possible to define descriptions for factory-methods?

i have tried something like this:
<?xml version='1.0' encoding='UTF-8'?>
<factory>
<method name='createCharacterValueField' factory='true'>
<description>Eingabefeld f&#x00FC;r ein Zeichen
<ul>
<li>value = Objekt vom Typ Character</li>
</ul>
</description>
</method>
</factory>

but the description didn't get used.

regards,
michael
mkornatzki_2
 
Posts: 2
Joined: Tue Oct 13, 2009 12:31 am

Re: Are descriptions in *.wbp-factory.xml possible?

Postby Eric Clayberg » Wed Oct 14, 2009 12:29 pm

mkornatzki_2 wrote:is it possible to define descriptions for factory-methods?...
but the description didn't get used.

Yes. How did you add the item to the palette?

If you added it via the Palette Manager (rather than via a palette contribution file), it just uses the Description provided in the dialog...

Image

In the latest build, if that description is left blank or at the default value, we will use the description from the XML file.
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

Re: Are descriptions in *.wbp-factory.xml possible?

Postby mkornatzki » Wed Oct 14, 2009 11:34 pm

Great.
For the following test i didn't change the xml-file.

It works if i do the following:
* right click on palette
* choose "Add static factory" - "Single"

It didn't work if i do the following:
* open palette manager
* select a category
* add entry - "Single static factory"
it adds the method but without an image and the there is nothing to select from palette.


I can edit the name which was shown on the palette. How can i do this with the *.wbp-factory.xml?
I want ZinssatzValueField instead of createZinssatzValueField which is the method name.
in the export of the palette it looks like:

<addFactory
id="custom_1255510779894_22"
name="createZinssatz5ValueField()"
description="Class: de.parcit.guibase.swing.text.valuefield.ValueFieldFactory&#10;Method: createZinssatz5ValueField()"
visible="true"
class="de.parcit.guibase.swing.text.valuefield.ValueFieldFactory"
signature="createZinssatz5ValueField()"
static="true"
category="custom_1255510731972"/>

and later in the file:

<editFactory
id="custom_1255510779894_22"
name="Zinssatz5ValueField()"
description="Eingabefeld f&amp;#x00FC;r Flie&amp;#x00DF;komma-Werte&#13;&#10;&lt;ul&gt;&#13;&#10; &lt;li&gt;value = Objekt vom Typ Double&lt;/li&gt;&#13;&#10; &lt;li&gt;Nur Zahlen sind erlaubt&lt;/li&gt;&#13;&#10; &lt;li&gt;begrenzt auf 15 Stellen&lt;/li&gt;&#13;&#10; &lt;li&gt;5 Nachkommastellen&lt;/li&gt;&#13;&#10;&lt;/ul&gt;"
visible="true"
class="de.parcit.guibase.swing.text.valuefield.ValueFieldFactory"
signature="createZinssatz5ValueField()"
static="true"/>

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

Re: Are descriptions in *.wbp-factory.xml possible?

Postby Eric Clayberg » Thu Oct 15, 2009 1:13 pm

In the latest build, we have added support for a "name" attribute to the *.wbp-factory.xml file.
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

Re: Are descriptions in *.wbp-factory.xml possible?

Postby mkornatzki » Thu Oct 15, 2009 11:21 pm

i tried
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<factory>
   <method name='createCharacterValueField' factory='true'>
       <name>CharacterValueField</name>
      <description>Eingabefeld f&#x00FC;r ein Zeichen
          <ul>
               <li>value = Objekt vom Typ Character</li>
         </ul>
         </description>
   </method>
</factory>

but the "name" attribut was not used.
do i make a mistake?

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

Re: Are descriptions in *.wbp-factory.xml possible?

Postby Eric Clayberg » Fri Oct 16, 2009 10:18 am

Have you tried removing and re-adding that entry to the palette?

An existing entry that already has a name would not be affected.
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

Re: Are descriptions in *.wbp-factory.xml possible?

Postby mkornatzki » Mon Oct 19, 2009 12:16 am

yes, i removed the component before.
what i didn't do was to press the button "Reparse the source and refresh the design page" before i add the component.
Now i can add a static factory method with a defined name in the xml-file. :)

I have another problem with the description.

As you can see in the tooltip for the following xml-file the description is not complete.
Image
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<factory>
   <method name='createCharacterValueField' factory='true'>
      <name>MeinCharacterValueField</name>
      <description>Eingabefeld f&#x00FC;r ein Zeichen
          <ul>
               <li>value = Objekt vom Typ Character</li>
         </ul>
      </description>
   </method>
</factory>


For single components i use the same description and it works.

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

Re: Are descriptions in *.wbp-factory.xml possible?

Postby mkornatzki » Mon Oct 19, 2009 12:33 am

i tried it with another component.

the tooltip didn't show <ul><li></li></ul>
if i edit the description for a component in the palette then i can use <ul><li> and it works good.
And for single components it works also.

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

Re: Are descriptions in *.wbp-factory.xml possible?

Postby Eric Clayberg » Mon Oct 19, 2009 12:58 pm

Give this a try using the latest build.
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

Re: Are descriptions in *.wbp-factory.xml possible?

Postby mkornatzki » Mon Oct 19, 2009 10:20 pm

thank you, it works :)

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

Re: Are descriptions in *.wbp-factory.xml possible?

Postby Eric Clayberg » Tue Oct 20, 2009 3:11 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