Search Unity

MonoDevelop new file templates

Discussion in 'Formats & External Tools' started by sacredgeometry, Jun 25, 2010.

  1. sacredgeometry

    sacredgeometry

    Joined:
    Dec 5, 2009
    Posts:
    55
    i was wondering how you set up templates for new files in monodev? I know its relatively simple in Visual studio but the less time i spend working on a windows machine the calmer i tend to be.

    What i want is to be able to just click add -> new file -> type in the name of the new c# file and to have it add that name to the class name. so i dont have to do the long winded process of writing out a template for files or deleting and renaming bits i don't need every time i start a new script.

    its probably simple but everytime i search i get things which are not what i am after.
     
  2. lancerfour

    lancerfour

    Joined:
    Feb 24, 2010
    Posts:
    24
    +1 Why can't monodev have a simple "Make New Template" option? seems like such a basic feature... :(
     
  3. Macguffin

    Macguffin

    Joined:
    Jan 12, 2011
    Posts:
    6
    Another +1. Having a hell of a time finding any place where I can update the Unity templates, or finding anything on the net that isn't MonoDevelop devs talking about development.

    Anyone know how to do this? Thanks much.
     
    Last edited: Jan 12, 2011
  4. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    If you check out the TODO of MonoDevelop, you are going to find that point...
     
  5. Macguffin

    Macguffin

    Joined:
    Jan 12, 2011
    Posts:
    6
    Well, hell. Fair enough! Thanks.
     
  6. Quazistax

    Quazistax

    Joined:
    Sep 12, 2010
    Posts:
    11
    Last edited: May 11, 2011
  7. css_maya

    css_maya

    Joined:
    Nov 8, 2010
    Posts:
    12
    Hi Tranquility
    I used your package to develop my own template system, but, the package don't come in file menu, even when I disable/enable it. what's the problem?
     
  8. Quazistax

    Quazistax

    Joined:
    Sep 12, 2010
    Posts:
    11
    Hi css_maya

    I made some tests and here are some conclusions.

    On restart of MonoDevelop, if your .addin.xml has some errors or is not well formed xml file, MonoDevelop will not load it (if it has a cached working version of previous .addin.xml it will load that one).

    Using enable/disable will not reload .addin.xml, only .xft.xml files. So if you make changes in .addin.xml and want to see them, you should restart MonoDevelop.

    To know if changed .addin.xml has errors, you could change its 'name' and if you don't see in Add-in Manager a new name, but an old one, you know it didn't load because of errors, so previous cached file was loaded.

    If some of .xtf.xml files didn't load, you can see in Message Log that there was a problem (Menu: View->Pads->Message Log). You will not see .addin.xml errors in Message Log.

    If you can't find out what could be wrong with your .addin.xml you can contact me by email on my blog.
     
  9. lo

    lo

    Joined:
    Mar 15, 2006
    Posts:
    12
    Anyone has an idea for installing this templates on monodevelop mac ?

    thanks
     
  10. Quazistax

    Quazistax

    Joined:
    Sep 12, 2010
    Posts:
    11
    @laurent

    To install templates on mac, extract templates package and copy extracted folder to "Contents\MacOS\lib\monodevelop\AddIns" in MonoDevelop application package. Description on blog is updated with screenshots for mac.
     
    Last edited: Jun 13, 2011
  11. lo

    lo

    Joined:
    Mar 15, 2006
    Posts:
    12
    Thanks !