Documentation/Source/eric5.Templates.TemplateViewer.html

changeset 1002
1151d1ea562a
parent 945
8cd4d08fa9f6
child 1228
7afaf2fca55b
equal deleted inserted replaced
1000:c9f094c33a1d 1002:1151d1ea562a
536 <td>Public method to get all group names.</td> 536 <td>Public method to get all group names.</td>
537 </tr><tr> 537 </tr><tr>
538 <td><a href="#TemplateViewer.getTemplateNames">getTemplateNames</a></td> 538 <td><a href="#TemplateViewer.getTemplateNames">getTemplateNames</a></td>
539 <td>Public method to get the names of templates starting with the given string.</td> 539 <td>Public method to get the names of templates starting with the given string.</td>
540 </tr><tr> 540 </tr><tr>
541 <td><a href="#TemplateViewer.hasGroup">hasGroup</a></td>
542 <td>Public method to check, if a group with the given name exists.</td>
543 </tr><tr>
541 <td><a href="#TemplateViewer.hasTemplate">hasTemplate</a></td> 544 <td><a href="#TemplateViewer.hasTemplate">hasTemplate</a></td>
542 <td>Public method to check, if an entry of the given name exists.</td> 545 <td>Public method to check, if an entry of the given name exists.</td>
543 </tr><tr> 546 </tr><tr>
544 <td><a href="#TemplateViewer.readTemplates">readTemplates</a></td> 547 <td><a href="#TemplateViewer.readTemplates">readTemplates</a></td>
545 <td>Public method to read in the templates file (.e4c)</td> 548 <td>Public method to read in the templates file (.e4c)</td>
685 <dd> 688 <dd>
686 programming language for the group (string) 689 programming language for the group (string)
687 </dd> 690 </dd>
688 </dl><a NAME="TemplateViewer.applyNamedTemplate" ID="TemplateViewer.applyNamedTemplate"></a> 691 </dl><a NAME="TemplateViewer.applyNamedTemplate" ID="TemplateViewer.applyNamedTemplate"></a>
689 <h4>TemplateViewer.applyNamedTemplate</h4> 692 <h4>TemplateViewer.applyNamedTemplate</h4>
690 <b>applyNamedTemplate</b>(<i>templateName</i>) 693 <b>applyNamedTemplate</b>(<i>templateName, groupName=None</i>)
691 <p> 694 <p>
692 Public method to apply a template given a template name. 695 Public method to apply a template given a template name.
693 </p><dl> 696 </p><dl>
694 <dt><i>templateName</i></dt> 697 <dt><i>templateName</i></dt>
695 <dd> 698 <dd>
696 name of the template item to apply (string) 699 name of the template item to apply (string)
700 </dd><dt><i>groupName</i></dt>
701 <dd>
702 name of the group to get the entry from (string).
703 None or empty means to apply the first template found with the
704 given name.
697 </dd> 705 </dd>
698 </dl><a NAME="TemplateViewer.applyTemplate" ID="TemplateViewer.applyTemplate"></a> 706 </dl><a NAME="TemplateViewer.applyTemplate" ID="TemplateViewer.applyTemplate"></a>
699 <h4>TemplateViewer.applyTemplate</h4> 707 <h4>TemplateViewer.applyTemplate</h4>
700 <b>applyTemplate</b>(<i>itm</i>) 708 <b>applyTemplate</b>(<i>itm</i>)
701 <p> 709 <p>
764 <dd> 772 <dd>
765 list of all group names (list of strings) 773 list of all group names (list of strings)
766 </dd> 774 </dd>
767 </dl><a NAME="TemplateViewer.getTemplateNames" ID="TemplateViewer.getTemplateNames"></a> 775 </dl><a NAME="TemplateViewer.getTemplateNames" ID="TemplateViewer.getTemplateNames"></a>
768 <h4>TemplateViewer.getTemplateNames</h4> 776 <h4>TemplateViewer.getTemplateNames</h4>
769 <b>getTemplateNames</b>(<i>start</i>) 777 <b>getTemplateNames</b>(<i>start, groupName=None</i>)
770 <p> 778 <p>
771 Public method to get the names of templates starting with the given string. 779 Public method to get the names of templates starting with the given string.
772 </p><dl> 780 </p><dl>
773 <dt><i>start</i></dt> 781 <dt><i>start</i></dt>
774 <dd> 782 <dd>
775 start string of the name (string) 783 start string of the name (string)
784 </dd><dt><i>groupName</i></dt>
785 <dd>
786 name of the group to get the entry from (string).
787 None or empty means to look in all groups.
776 </dd> 788 </dd>
777 </dl><dl> 789 </dl><dl>
778 <dt>Returns:</dt> 790 <dt>Returns:</dt>
779 <dd> 791 <dd>
780 sorted list of matching template names (list of strings) 792 sorted list of matching template names (list of strings)
793 </dd>
794 </dl><a NAME="TemplateViewer.hasGroup" ID="TemplateViewer.hasGroup"></a>
795 <h4>TemplateViewer.hasGroup</h4>
796 <b>hasGroup</b>(<i>name</i>)
797 <p>
798 Public method to check, if a group with the given name exists.
799 </p><dl>
800 <dt><i>name</i></dt>
801 <dd>
802 name of the group to be checked for (string)
803 </dd>
804 </dl><dl>
805 <dt>Returns:</dt>
806 <dd>
807 flag indicating an existing group (boolean)
781 </dd> 808 </dd>
782 </dl><a NAME="TemplateViewer.hasTemplate" ID="TemplateViewer.hasTemplate"></a> 809 </dl><a NAME="TemplateViewer.hasTemplate" ID="TemplateViewer.hasTemplate"></a>
783 <h4>TemplateViewer.hasTemplate</h4> 810 <h4>TemplateViewer.hasTemplate</h4>
784 <b>hasTemplate</b>(<i>entryName</i>) 811 <b>hasTemplate</b>(<i>entryName, groupName=None</i>)
785 <p> 812 <p>
786 Public method to check, if an entry of the given name exists. 813 Public method to check, if an entry of the given name exists.
787 </p><dl> 814 </p><dl>
788 <dt><i>entryName</i></dt> 815 <dt><i>entryName</i></dt>
789 <dd> 816 <dd>
790 name of the entry to check for (string) 817 name of the entry to check for (string)
818 </dd><dt><i>groupName</i></dt>
819 <dd>
820 name of the group to check for the entry (string).
821 None or empty means to check all groups.
791 </dd> 822 </dd>
792 </dl><dl> 823 </dl><dl>
793 <dt>Returns:</dt> 824 <dt>Returns:</dt>
794 <dd> 825 <dd>
795 flag indicating the existence (boolean) 826 flag indicating the existence (boolean)

eric ide

mercurial