Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Finally, I found the solution of the problem.</p> <p>For adding new categories in the palette, we need to use pagedesignerextension in plugin.xml as following - </p> <pre><code>&lt;extension point="org.eclipse.jst.pagedesigner.pageDesignerExtension"&gt; &lt;paletteFactory class="com.comp.myeditor.palette.CustomEditorPaletteFactory"&gt; &lt;/paletteFactory&gt; &lt;/extension&gt; </code></pre> <p>Where CustomEditorPaletteFactory will be extending AbstractPaletteFactory. Here in createPaletteRoot(), we can add our category.</p> <pre><code>public PaletteRoot createPaletteRoot(IEditorInput editorInput){ PaletteRoot paletteRoot = new PaletteRoot(); paletteRoot.add(createStandardComponents()); return paletteRoot; //return null; } private static PaletteContainer createStandardComponents() { PaletteDrawer componentsDrawer = new PaletteDrawer("CustomHTMLComponent"); TagToolPaletteEntry paletteEntry = new TagToolPaletteEntry( new FormPaletteComponent(".....); componentsDrawer.add(paletteEntry); return componentsDrawer; } </code></pre> <p>This will create the component category in the palette and we can add as many components as needed using the componentsdrawer.</p> <p>For adding a new category in the existing one - Add this in the constructor -</p> <pre><code>super(); this._paletteContext = PaletteItemManager.createPaletteContext(file); this._manager = PaletteItemManager.getInstance(_paletteContext); </code></pre> <p>Then use Palette Grouping like this -</p> <pre><code>PaletteGroup controls = new PaletteGroup("CUST HTML"); super.add(controls); ToolEntry tool = new SelectionToolEntry("CUST Cursor", "Cursor DESCRIPTION"); controls.add(tool); setDefaultEntry(tool); //Custom Marquee controls.add(new MarqueeToolEntry("Marquee", "Marquee Desc")); controls.add(new PaletteSeparator()); //This class maintins or load all categories features controls.add(new CustomComponentToolEntry("Custom Component", "Custom Component Descrition", </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload