Sometimes you need to customize the widgets. To use the drag-drop facility with these custom widgets, they need to be added to the Eclipse palette.

To do this, two files are needed to be changed in Eclipse:

  • eclipse\plugins\\palette\

First of all make a Category of the Controls like in-built “SWT Controls, SWT Containers”. E.g. if you want to make the category of MyControl then add the following line in the file:

Palette.Category.MyControls = MyControls

  • eclipse\plugins\\palette\ swtpalette.xmi:

Now Custom Control can be added to the Category that you have made with the help of the swtpalette.xmi file. E.g. you can add “TextWithLabel” Widget to MyControl category by adding the following lines in the swtpalette.xmi file:


  <entryLabel xsi:type="" 
    key="Palette.Category.MyControls" bundle="#bundle"/>
  <children xsi:type="" 

  <entryLabel xsi:type="" 

  <keyedValues xsi:type="ecore:EStringToStringMapEntry"