本文整理汇总了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());
}
}
}
示例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());
}
}
}
示例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);
}
示例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");
}
示例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");
}
示例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");
}
示例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);
}
示例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");
}
示例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);
}
示例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);
}
示例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");
}
示例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);
}
}
示例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);
}
}