<%@ import val generator: org.fusesource.ide.generator.Generator %>
#{
  def fillPalette(group: String) = {
    for (n <- nodeDefinitions if n.group == group) {
      val smallIcon = findIconFileOrElse(eclipseIconDir, n.id + "16", n.defaultImageName + "16.png")
      val bigIcon = findIconFileOrElse(eclipseIconDir, n.id + "24", n.defaultImageName + "24.png")
}#
      registerPaletteItem(drawer, Messages.palette${n.definitionName.capitalize}Title, Messages.palette${n.definitionName.capitalize}Description, ${n.definitionName.capitalize}.class, 
      	getImageDescriptor("${smallIcon}"), 
      	getImageDescriptor("${bigIcon}"));
#{
    }
  }
}#
/*******************************************************************************
 * Copyright (c) 2013 Red Hat, Inc.
 * Distributed under license by Red Hat, Inc. All rights reserved.
 * This program is made available under the terms of the
 * Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Red Hat, Inc. - initial API and implementation
 ******************************************************************************/

/**
 * NOTE - this file is auto-generated using Scalate. 
 * 
 * DO NOT EDIT!
 */
package org.fusesource.ide.camel.editor.editor.palette;

import org.eclipse.gef.palette.PaletteDrawer;

import org.fusesource.ide.camel.editor.Messages;
import org.fusesource.ide.camel.model.Endpoint;
import org.fusesource.ide.camel.model.generated.*;
import org.fusesource.ide.camel.model.generated.Process;

/**
 * @author lhein
 */
public class RiderEditorPaletteFactory extends
		AbstractRiderEditorPaletteFactory {

	/* (non-Javadoc)
	 * @see org.fusesource.ide.camel.editor.editor.palette.AbstractRiderEditorPaletteFactory#fillEndpointsDrawer(org.eclipse.gef.palette.PaletteDrawer)
	 */
	@Override
	protected void fillEndpointsDrawer(PaletteDrawer drawer) {
    registerPaletteItem(drawer, Messages.paletteEndpointTitle, Messages.paletteEndpointDescription, Endpoint.class, 
    	getImageDescriptor("endpoint16.png"), 
    	getImageDescriptor("endpoint24.png"));

    ${fillPalette("Endpoints")}
	}

	/* (non-Javadoc)
	 * @see org.fusesource.ide.camel.editor.editor.palette.AbstractRiderEditorPaletteFactory#fillRoutingDrawer(org.eclipse.gef.palette.PaletteDrawer)
	 */
	@Override
	protected void fillRoutingDrawer(PaletteDrawer drawer) {
    ${fillPalette("Routing")}
	}

	/* (non-Javadoc)
	 * @see org.fusesource.ide.camel.editor.editor.palette.AbstractRiderEditorPaletteFactory#fillControlDrawer(org.eclipse.gef.palette.PaletteDrawer)
	 */
	@Override
	protected void fillControlDrawer(PaletteDrawer drawer) {
    ${fillPalette("Control Flow")}
	}

	/* (non-Javadoc)
	 * @see org.fusesource.ide.camel.editor.editor.palette.AbstractRiderEditorPaletteFactory#fillTransformationDrawer(org.eclipse.gef.palette.PaletteDrawer)
	 */
	@Override
	protected void fillTransformationDrawer(PaletteDrawer drawer) {
    ${fillPalette("Transformation")}
	}

	/* (non-Javadoc)
	 * @see org.fusesource.ide.camel.editor.editor.palette.AbstractRiderEditorPaletteFactory#fillMiscellaneousDrawer(org.eclipse.gef.palette.PaletteDrawer)
	 */
	@Override
	protected void fillMiscellaneousDrawer(PaletteDrawer drawer) {
    ${fillPalette("Miscellaneous")}
	}
}
