Creating code templates in a C9 plugin and adding them to UI

customization

#1

Hi all!

I’m working on plugin development for an intro programming course. We’re simplifying the UI to make it less intimidating to beginning programmers.

I would like to add a template for a C file (with a couple #includes specific to the course) available via the “File” > “New From Template” menu. However, after following the C9 template documentation, the new template does not appear in the UI. Are there additional dependencies I need to include in the plugin’s .js file? Right now, the template only exists in the plugin’s file tree, as per the add instructions supplied in the documentation.

Any ideas about how to get this template included in the UI upon installation of plugin?

Thanks!


#2

Hi,

Very cool to hear you are building a template! Are you using ?debug=2 in the url to load the plugin or are you installing it manually in a new workspace via the c9 cli?

We recently (yesterday) released a fix for ?debug=2. This might be working now, while it didn’t work when you tried it.

Best,
Ruben


#3

I’ve been using ?debug=2 to load the plugin, but it still doesn’t seem to be showing up in the templates drop-down.

I’m not sure how to try installing this plugin via the cli to see if that solves the problem; I’ll keep looking around but any additional guidance would be much appreciated!

Thank you!


#4

Hi
there is a bug in loading templates in ?debug=2 mode, the fix for it will be deployed early next week.


#5

The fix has now been deployed and everything should be working as expected.


#6