Skip to content

Instantly share code, notes, and snippets.

Created January 30, 2012 14:53
Show Gist options
  • Save anonymous/1704820 to your computer and use it in GitHub Desktop.
Save anonymous/1704820 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 }#
, new CreateFigureFeature<${name}>(fp, Messages.palette${name}Title, Messages.palette${name}Description, ${name}.class)
#end
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment