NineWorlds / xstreamer

XStreamer X-Wing Squad and Imperial Assault Army Helper for Twitch and YouTube Streamers
MIT License
8 stars 3 forks source link

Create new Template Preference Pages #43

Closed kingargyle closed 7 years ago

kingargyle commented 7 years ago

Because of the templates can come in multiple files it is difficult to know which template file is to be used.

Eclipse provides a framework that can be leveraged, the TemplatesPreferencePage.

http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fjface%2Ftext%2Ftemplates%2Fpersistence%2FTemplateStore.html

The simple description for this template can be described in a xml file:

  <templates>
      <template name="%Templates.xmldeclaration.name"
                    description="%Templates.xmldeclaration.desc"
         id="org.eclipse.wst.xml.ui.internal.templates.xmldeclaration"
         filename="template.ftl"
         format="text|html"
         type="squad|dice"
         path="template/squad/html/blah"
         enabled="true"/>
 </templates>

Store this in the templates plugin and the perferences should be read from here.

There will need to be a way for the user to select this template either via a Dialog that or a drop down list box. Templates will need to be loaded when the app starts up.

Users should be able to add their own templates to the list either through the UI or via editing the template.xml file directly.

kingargyle commented 7 years ago

This is now complete.