Customize the palette of Visual Editor
26 March 2007The Visual Editor has a palette from which the user can choose frequently used widgets. This article is a deep dive into the internals of the Visual Editor framework to show how to extend its capabilities. Visual Editor lets you create your own custom controls. This article shows the way to create a new palette category with a custom built widget DateField.
There are two ways to drag custom built widget to your view:

You need to follow two steps listed below to create a new palette category and add the DateField option in that:
- Create a new category Custom Control by adding the following line into the plugins\org.eclipse.ve.swt_1.1.0.1\palette\palette.properties file.
- To add the DateField widget to the Category that you have created, add the following lines in plugins\org.eclipse.ve.swt_1.1.0.1\palette\ swtpalette.xmi file.
Palette.Category.CustomControls = Custom Controls
<org.eclipse.ve.internal.cde.palette:Drawer>
<entryLabel xsi:type=”org.eclipse.ve.internal.cde.utility:TranslatableString” key=”Palette.Category.CustomControls” bundle=”#bundle”/>
<children xsi:type=”org.eclipse.ve.internal.cde.palette:EMFCreationToolEntry”
icon16Name=”platform:/plugin/org.eclipse.ve.swt/icons/full/clcl16/text_obj.gif”
creationClassURI=”java:/palatteExample#DateField”>
<entryLabel xsi:type=”org.eclipse.ve.internal.cde.utility:ConstantString” string=”DateField”/>
<keyedValues xsi:type=”ecore:EStringToStringMapEntry” key=”org.eclipse.ve.internal.cde.core.nameincomposition” value=”dateField”/>
</children>
</org.eclipse.ve.internal.cde.palette:Drawer>
Related Posts:
Fatal error: Call to undefined function related_posts() in /home/blog/public_html/eclipse-blog/wp-content/themes/Andreas 08 3 columns/single.php on line 23
