Skip to content

Instantly share code, notes, and snippets.

@chirino
Forked from anonymous/lhein_test
Created January 30, 2012 14:54
Show Gist options
  • Save chirino/1704827 to your computer and use it in GitHub Desktop.
Save chirino/1704827 to your computer and use it in GitHub Desktop.
/**
* helper method to return all create features available for the palette
*
* @param fp the feature provider
* @return an array of create features for the palette
*/
public static ICreateFeature[] getCreateFeatures(IFeatureProvider fp) {
return new ICreateFeature[] {
new CreateFigureFeature<Endpoint>(fp, Messages.paletteEndpointTitle, Messages.paletteEndpointDescription, Endpoint.class)
#for (n <- nodeDefinitions)
#{ val name = n.definitionName.capitalize }#
#if( name!="route ")
, new CreateFigureFeature<${name}>(fp, Messages.palette${name}Title, Messages.palette${name}Description, ${name}.class)
#end
#end
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment