Export .wbp-palette.xml in jar file

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

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

Export .wbp-palette.xml in jar file

Postby George » Thu Apr 07, 2011 5:03 am

Hello,
I have a custom component CustomComponent.java and CustomComponent.wbp-component.xml and .wbp-palette.xml that which contains this costom component.I wish to export the palette in jar file because i read NewComponentsToturiel.pdf and i know that it is possible.And just by adding the jar file into classpath we will automatically add this component to palette.So how to do that?
thinks for help
George
 
Posts: 29
Joined: Wed Apr 06, 2011 4:25 am

Re: Export .wbp-palette.xml in jar file

Postby Eric Clayberg » Thu Apr 07, 2011 6:31 am

I would start by reading about how to package any Java class in a Jar file from within Eclipse.

BTW, this forum is for questions about using GWT Designer. It is not a forum for general Eclipse plugin or general Java development questions. If you woud like to learn about Eclipse Plugin development, I can recommend a good book on that subject... ;-)
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: Export .wbp-palette.xml in jar file

Postby George » Thu Apr 07, 2011 10:34 am

thinks,
I know how to create a jar file in eclipse but i dont know how specificly for a palette.
i must put a java file and palette in same directory and then create a jar?it dont work!
because i try several case and dont work.the palette know my custom component.
George
 
Posts: 29
Joined: Wed Apr 06, 2011 4:25 am

Re: Export .wbp-palette.xml in jar file

Postby George » Fri Apr 08, 2011 3:08 am

I export my palette to jar file.so the structur of jar is:

palette.jar
*com.sqsdqs.client
-Mybutton.class(in com.sqsdqs.client package)
*META-INF
*wbp-meta
-com.google.gdt.eclipse.designer.wbp-palette.xml (in wbp-meat folder)


And the .wbp-palette.xml contains is:
<?xml version="1.0" encoding="UTF-8"?>
<palette>
<category id="someUniqueId" name="vermeg component" description="Category added for project Azeer" open="true">
<component class="com.sqsdqs.client.Mybutton" name="MyButton"/>
<component class="com.google.gwt.user.client.ui.Button" name="Your name" description="You can write any description here."/>
</category>
</palette>


and MyButton.java is:
package com.sqsdqs.client;




import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.VerticalPanel;

public class Mybutton extends Composite{
Button vermeg = new Button("VERMEG");
VerticalPanel panel = new VerticalPanel();


public Mybutton(){
panel.add(vermeg);
initWidget(panel);
}

public void invocation(){
vermeg.setText("Achraf");
}
public void setButton(String spropriete1,String spropriete2){
//vermeg.setText("bhjbhj");
vermeg.setSize(spropriete1, spropriete2);
}

}

Knowing it work when the Mybutton.java is in project and it not in jar file.
think you for your help
George
 
Posts: 29
Joined: Wed Apr 06, 2011 4:25 am

Re: Export .wbp-palette.xml in jar file

Postby George » Fri Apr 08, 2011 6:47 am

i try more then way and it doesn't work. :oops:
please i need the steps to do that
George
 
Posts: 29
Joined: Wed Apr 06, 2011 4:25 am

Re: Export .wbp-palette.xml in jar file

Postby Eric Clayberg » Fri Apr 08, 2011 12:02 pm

See the full discussion here...

The palette only shows a component entry if its Class is present in the ClassLoader.

For GWT, it is not enough to just have the Class on the classpath. You also have to import its module into your GWT module.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


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 2 guests

cron