Java Code Examples for com.intellij.ide.fileTemplates.FileTemplateDescriptor

The following examples show how to use com.intellij.ide.fileTemplates.FileTemplateDescriptor. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Override
public FileTemplateGroupDescriptor getFileTemplatesDescriptor() {
    final FileTemplateGroupDescriptor group = new FileTemplateGroupDescriptor("Mule", MuleIcons.MuleIcon);
    group.addTemplate(new FileTemplateDescriptor(MULE_CONFIGURATION_FILE, MuleIcons.MuleFileType));
    group.addTemplate(new FileTemplateDescriptor(MULE_DOMAIN_CONFIGURATION_FILE, MuleIcons.MuleFileType));
    group.addTemplate(new FileTemplateDescriptor(DATA_WEAVE_FILE, MuleIcons.DataFileType));
    group.addTemplate(new FileTemplateDescriptor(MULE_MAVEN_PROJECT, MavenIcons.MavenLogo));
    group.addTemplate(new FileTemplateDescriptor(MULE_MAVEN_MODULE, MavenIcons.MavenLogo));
    group.addTemplate(new FileTemplateDescriptor(MULE_DOMAIN_MAVEN_PROJECT, MavenIcons.MavenLogo));
    group.addTemplate(new FileTemplateDescriptor(MUNIT_FILE, MuleIcons.MUnitFileType));
    group.addTemplate(new FileTemplateDescriptor(RAML_FILE, MuleIcons.RamlFileType));

    return group;
}
 
Example 2
public final FileTemplateGroupDescriptor getFileTemplatesDescriptor()
{
    FileTemplateGroupDescriptor group = new FileTemplateGroupDescriptor(
        message( "polygene.file.template.group.title" ), null
    );

    FileTypeManager fileTypeManager = FileTypeManager.getInstance();
    for( @NonNls String template : FILE_TEMPLATES )
    {
        Icon icon = fileTypeManager.getFileTypeByFileName( template ).getIcon();
        group.addTemplate( new FileTemplateDescriptor( template, icon ) );
    }

    return group;
}
 
Example 3
Source Project: Intellij-Plugin   Source File: SpecificationLiveTemplate.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public FileTemplateGroupDescriptor getFileTemplatesDescriptor() {

    FileTemplateGroupDescriptor descriptor = new FileTemplateGroupDescriptor("Specification", GaugeIcon.GAUGE_SPEC_FILE_ICON);
    descriptor.addTemplate(new FileTemplateDescriptor("Specification.spec", SpecFileType.INSTANCE.getIcon()));
    descriptor.addTemplate(new FileTemplateDescriptor("Concept.cpt", ConceptFileType.INSTANCE.getIcon()));
    return descriptor;
}
 
Example 4
@Override
public FileTemplateGroupDescriptor getFileTemplatesDescriptor() {
    FileTemplateGroupDescriptor group = new FileTemplateGroupDescriptor("NutzSqlTpl", NutzCons.NUTZ);
    group.addTemplate(new FileTemplateDescriptor(NUTZ_SQL_TPL_XML));
    return group;
}
 
Example 5
@Override
public FileTemplateGroupDescriptor getFileTemplatesDescriptor() {
  final FileTemplateGroupDescriptor group = new FileTemplateGroupDescriptor("IDEA Mind Map", AllIcons.Logo.MINDMAP);
  group.addTemplate(new FileTemplateDescriptor(MINDMAP_EMPTY_MAP, AllIcons.File.MINDMAP));
  return group;
}
 
Example 6
Source Project: consulo   Source File: FileTemplateTabAsTree.java    License: Apache License 2.0 4 votes vote down vote up
FileTemplateNode(FileTemplateDescriptor descriptor) {
  this(descriptor.getDisplayName(), TargetAWT.to(descriptor.getIcon()), descriptor instanceof FileTemplateGroupDescriptor
                                                          ? ContainerUtil.map2List(((FileTemplateGroupDescriptor)descriptor).getTemplates(), FileTemplateNode::new)
                                                          : Collections.<FileTemplateNode>emptyList(), descriptor instanceof FileTemplateGroupDescriptor ? null : descriptor.getFileName());
}