当前位置: 首页>>代码示例>>Java>>正文


Java CreateFileFromTemplateDialog.Builder方法代码示例

本文整理汇总了Java中com.intellij.ide.actions.CreateFileFromTemplateDialog.Builder方法的典型用法代码示例。如果您正苦于以下问题:Java CreateFileFromTemplateDialog.Builder方法的具体用法?Java CreateFileFromTemplateDialog.Builder怎么用?Java CreateFileFromTemplateDialog.Builder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.ide.actions.CreateFileFromTemplateDialog的用法示例。


在下文中一共展示了CreateFileFromTemplateDialog.Builder方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildDialog

import com.intellij.ide.actions.CreateFileFromTemplateDialog; //导入方法依赖的package包/类
@Override
protected void buildDialog(Project project, PsiDirectory directory, CreateFileFromTemplateDialog.Builder builder) {
  builder
    .setTitle(GroovyBundle.message("newclass.dlg.title"))
    .addKind("Class", JetgroovyIcons.Groovy.Class, GroovyTemplates.GROOVY_CLASS)
    .addKind("Interface", JetgroovyIcons.Groovy.Interface, GroovyTemplates.GROOVY_INTERFACE);

  if (GroovyConfigUtils.getInstance().isVersionAtLeast(directory, GroovyConfigUtils.GROOVY2_3, true)) {
    builder.addKind("Trait", JetgroovyIcons.Groovy.Trait, GroovyTemplates.GROOVY_TRAIT);
  }

  builder
    .addKind("Enum", JetgroovyIcons.Groovy.Enum, GroovyTemplates.GROOVY_ENUM)
    .addKind("Annotation", JetgroovyIcons.Groovy.AnnotationType, GroovyTemplates.GROOVY_ANNOTATION);

  for (FileTemplate template : FileTemplateManager.getInstance(project).getAllTemplates()) {
    FileType fileType = FileTypeManagerEx.getInstanceEx().getFileTypeByExtension(template.getExtension());
    if (fileType.equals(GroovyFileType.GROOVY_FILE_TYPE) && JavaDirectoryService.getInstance().getPackage(directory) != null) {
      builder.addKind(template.getName(), JetgroovyIcons.Groovy.Class, template.getName());
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:NewGroovyClassAction.java

示例2: buildDialog

import com.intellij.ide.actions.CreateFileFromTemplateDialog; //导入方法依赖的package包/类
@Override
protected void buildDialog(Project project, PsiDirectory directory, CreateFileFromTemplateDialog.Builder builder) {
  builder
    .setTitle(GroovyBundle.message("newclass.dlg.title"))
    .addKind("Class", JetgroovyIcons.Groovy.Class, GroovyTemplates.GROOVY_CLASS)
    .addKind("Interface", JetgroovyIcons.Groovy.Interface, GroovyTemplates.GROOVY_INTERFACE)
    .addKind("Enum", JetgroovyIcons.Groovy.Enum, GroovyTemplates.GROOVY_ENUM)
    .addKind("Annotation", JetgroovyIcons.Groovy.AnnotationType, GroovyTemplates.GROOVY_ANNOTATION);

  for (FileTemplate template : FileTemplateManager.getInstance().getAllTemplates()) {
    FileType fileType = FileTypeManagerEx.getInstanceEx().getFileTypeByExtension(template.getExtension());
    if (fileType.equals(GroovyFileType.GROOVY_FILE_TYPE) && JavaDirectoryService.getInstance().getPackage(directory) != null) {
      builder.addKind(template.getName(), JetgroovyIcons.Groovy.Class, template.getName());
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:NewGroovyClassAction.java

示例3: buildDialog

import com.intellij.ide.actions.CreateFileFromTemplateDialog; //导入方法依赖的package包/类
@Override
protected void buildDialog(
    final Project project,
    final PsiDirectory directory,
    final CreateFileFromTemplateDialog.Builder builder
) {
    builder.setTitle(NEW_FS_FILE)
           .addKind("Empty file", HybrisIcons.FS_FILE, FILE_TEMPLATE);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:10,代码来源:FlexibleSearchFileCreateAction.java

示例4: buildDialog

import com.intellij.ide.actions.CreateFileFromTemplateDialog; //导入方法依赖的package包/类
@Override
protected void buildDialog(
    final Project project,
    final PsiDirectory directory,
    final CreateFileFromTemplateDialog.Builder builder
) {
    builder.setTitle(NEW_IMPEX_FILE)
           .addKind("Empty file", HybrisIcons.IMPEX_FILE, FILE_TEMPLATE);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:10,代码来源:ImpexFileCreateAction.java

示例5: buildDialog

import com.intellij.ide.actions.CreateFileFromTemplateDialog; //导入方法依赖的package包/类
@Override
protected void buildDialog(Project project, PsiDirectory psiDirectory, CreateFileFromTemplateDialog.Builder builder) {
    builder.setTitle(MULE_CONFIGURATION)
            .addKind("Mule Configuration", MuleIcons.MuleFileType, MuleFileTemplateDescriptorManager.MULE_CONFIGURATION_FILE)
            .addKind("MUnit Test", MuleIcons.MUnitFileType, MuleFileTemplateDescriptorManager.MUNIT_FILE)
            .addKind("DataWeave", MuleIcons.DataFileType, MuleFileTemplateDescriptorManager.DATA_WEAVE_FILE)
            .addKind("MEL Script", MuleIcons.MelFileType, MuleFileTemplateDescriptorManager.MEL_FILE)
            .addKind("RAML File", MuleIcons.RamlFileType, MuleFileTemplateDescriptorManager.RAML_FILE);
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:10,代码来源:CreateMuleComponentFile.java

示例6: buildDialog

import com.intellij.ide.actions.CreateFileFromTemplateDialog; //导入方法依赖的package包/类
@Override
protected void buildDialog(Project project, PsiDirectory psiDirectory, CreateFileFromTemplateDialog.Builder builder) {
	builder.setTitle("Битрикс: Страница")
		.addKind("Страница", BitrixFramework.bxIcon, "bxSimplePage")
		.addKind("Страница (модерн)", BitrixFramework.bxIcon, "bxSimplePageModern")
		.addKind("Сервис", BitrixFramework.bxIcon, "bxSimpleService");
}
 
开发者ID:vizh,项目名称:bxfs,代码行数:8,代码来源:BxNewFileAction.java

示例7: buildDialog

import com.intellij.ide.actions.CreateFileFromTemplateDialog; //导入方法依赖的package包/类
@Override
	protected void buildDialog(Project project, PsiDirectory psiDirectory, CreateFileFromTemplateDialog.Builder builder) {
		builder.setTitle("Битрикс: Раздел")
			.addKind("Простая раздел", BitrixFramework.bxIcon, "bxSimpleSection");
//			.addKind("Подробная страница", StdFileTypes.HTML.getIcon(), "Html")
//			.addKind("XHTML file", StdFileTypes.XHTML.getIcon(), "Xhtml");
	}
 
开发者ID:vizh,项目名称:bxfs,代码行数:8,代码来源:BxNewSectionAction.java

示例8: buildDialog

import com.intellij.ide.actions.CreateFileFromTemplateDialog; //导入方法依赖的package包/类
@Override
protected void buildDialog(Project project, PsiDirectory directory, CreateFileFromTemplateDialog.Builder builder) {
  builder
    .setTitle("New Python file")
    .addKind("Python file", PythonFileType.INSTANCE.getIcon(), "Python Script")
    .addKind("Python unit test", PythonFileType.INSTANCE.getIcon(), "Python Unit Test");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:CreatePythonFileAction.java

示例9: buildDialog

import com.intellij.ide.actions.CreateFileFromTemplateDialog; //导入方法依赖的package包/类
@Override
protected void buildDialog(Project project, PsiDirectory directory, CreateFileFromTemplateDialog.Builder builder) {
  builder
    .setTitle(GroovyBundle.message("newscript.dlg.prompt"))
    .addKind("Groovy script", JetgroovyIcons.Groovy.Groovy_16x16, GroovyTemplates.GROOVY_SCRIPT)
    .addKind("GroovyDSL script", JetgroovyIcons.Groovy.Groovy_16x16, GroovyTemplates.GROOVY_DSL_SCRIPT);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:NewScriptAction.java

示例10: buildDialog

import com.intellij.ide.actions.CreateFileFromTemplateDialog; //导入方法依赖的package包/类
@Override
protected void buildDialog(Project project, PsiDirectory directory, CreateFileFromTemplateDialog.Builder builder) {
  builder
      .setTitle("New Robot File")
      .addKind("Robot Test Case File", RobotIcons.ROBOT, "RobotTestCaseFile")
      .addKind("Robot Keywords File", RobotIcons.ROBOT, "RobotKeywordsFile");

}
 
开发者ID:charlescapps,项目名称:robot-intellij-plugin,代码行数:9,代码来源:NewRobotFileAction.java

示例11: buildDialog

import com.intellij.ide.actions.CreateFileFromTemplateDialog; //导入方法依赖的package包/类
@Override
protected void buildDialog(Project project, PsiDirectory directory, CreateFileFromTemplateDialog.Builder builder) {
    builder
            .setTitle(LatexBundle.message("action.create.file"))
            .addKind(LatexBundle.message("action.create.file.kind.empty"), Icons.FILE, LatexTemplates.LATEX_EMPTY)
            .addKind(LatexBundle.message("action.create.file.kind.article"), Icons.FILE, LatexTemplates.LATEX_ARTICLE)
            .addKind(LatexBundle.message("action.create.file.kind.report"), Icons.FILE, LatexTemplates.LATEX_REPORT)
            .addKind(LatexBundle.message("action.create.file.kind.book"), Icons.FILE, LatexTemplates.LATEX_BOOK)
            .addKind(LatexBundle.message("action.create.file.kind.letter"), Icons.FILE, LatexTemplates.LATEX_LETTER)
            .addKind(LatexBundle.message("action.create.file.kind.presentation"), Icons.FILE, LatexTemplates.LATEX_PRESENTATION);
}
 
开发者ID:hsz,项目名称:idea-latex,代码行数:12,代码来源:CreateLatexFileAction.java

示例12: buildDialog

import com.intellij.ide.actions.CreateFileFromTemplateDialog; //导入方法依赖的package包/类
@Override
protected void buildDialog(Project project, PsiDirectory psiDirectory, CreateFileFromTemplateDialog.Builder builder) {
    super.buildDialog(project, psiDirectory, builder);
    builder.addKind("Class", ApexIcons.CLASS, FileTemplates.APEX_CLASS_TEMPLATE);
    builder.addKind("Interface", ApexIcons.INTERFACE, FileTemplates.APEX_INTERFACE_TEMPLATE);
    builder.addKind("Enum", ApexIcons.ENUM, FileTemplates.APEX_ENUM);
    builder.addKind("Test Class", ApexIcons.CLASS, FileTemplates.APEX_TEST_CLASS_TEMPLATE);
}
 
开发者ID:polyglot-mark,项目名称:salesforce-plugin,代码行数:9,代码来源:NewApexClassAction.java

示例13: buildDialog

import com.intellij.ide.actions.CreateFileFromTemplateDialog; //导入方法依赖的package包/类
@Override
@RequiredDispatchThread
protected void buildDialog(Project project, PsiDirectory psiDirectory, CreateFileFromTemplateDialog.Builder builder)
{
	Set<String> used = new HashSet<>();
	addKind(builder, used, "Class", new IconDescriptor(AllIcons.Nodes.Class).toIcon(), "CSharpClass");
	addKind(builder, used, "Interface", new IconDescriptor(AllIcons.Nodes.Interface).toIcon(), "CSharpInterface");
	addKind(builder, used, "Enum", new IconDescriptor(AllIcons.Nodes.Enum).toIcon(), "CSharpEnum");
	addKind(builder, used, "Struct", new IconDescriptor(AllIcons.Nodes.Struct).toIcon(), "CSharpStruct");
	addKind(builder, used, "Attribute", new IconDescriptor(AllIcons.Nodes.Attribute).toIcon(), "CSharpAttribute");
	if(isCreationOfAssemblyFileAvailable(psiDirectory))
	{
		addKind(builder, used, "Assembly File", AllIcons.FileTypes.Config, "CSharpAssemblyFile");
	}
	addKind(builder, used, "Empty File", CSharpFileType.INSTANCE.getIcon(), "CSharpFile");

	final CSharpCreateFromTemplateHandler handler = CSharpCreateFromTemplateHandler.getInstance();
	for(FileTemplate template : FileTemplateManager.getInstance(project).getAllTemplates())
	{
		if(handler.handlesTemplate(template))
		{
			String name = template.getName().replaceFirst("CSharp", "");
			if(!used.add(name))
			{
				name = template.getName();
			}
			addKind(builder, used, name, CSharpFileType.INSTANCE.getIcon(), template.getName());
		}
	}

	builder.setTitle("Create New File");
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:33,代码来源:CSharpCreateFileAction.java

示例14: buildDialog

import com.intellij.ide.actions.CreateFileFromTemplateDialog; //导入方法依赖的package包/类
@Override
protected void buildDialog(Project project, PsiDirectory directory, CreateFileFromTemplateDialog.Builder builder) {
  builder.setTitle(IdeBundle.message("action.create.new.class"));
  for (FileTemplate fileTemplate : HaxeFileTemplateUtil.getApplicableTemplates()) {
    final String templateName = fileTemplate.getName();
    final String shortName = HaxeFileTemplateUtil.getTemplateShortName(templateName);
    final Icon icon = HaxeFileTemplateUtil.getTemplateIcon(templateName);
    builder.addKind(shortName, icon, templateName);
  }
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:11,代码来源:CreateClassAction.java

示例15: buildDialog

import com.intellij.ide.actions.CreateFileFromTemplateDialog; //导入方法依赖的package包/类
@Override
protected void buildDialog(Project project, PsiDirectory directory, CreateFileFromTemplateDialog.Builder builder) {
  builder.setTitle(HaxeBundle.message("create.nmml.file.action"));
  for (FileTemplate fileTemplate : HaxeFileTemplateUtil.getNMMLTemplates()) {
    final String templateName = fileTemplate.getName();
    final String shortName = HaxeFileTemplateUtil.getTemplateShortName(templateName);
    builder.addKind(shortName, icons.HaxeIcons.Nmml_16, templateName);
  }
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:10,代码来源:CreateNMMLFileAction.java


注:本文中的com.intellij.ide.actions.CreateFileFromTemplateDialog.Builder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。