congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
CreateFileFromTemplateAction
Code IndexAdd Tabnine to your IDE (free)

How to use
CreateFileFromTemplateAction
in
com.intellij.ide.actions

Best Java code snippets using com.intellij.ide.actions.CreateFileFromTemplateAction (Showing top 7 results out of 315)

origin: go-lang-plugin-org/go-lang-idea-plugin

 private static void doTemplateTest(@NotNull PsiDirectory dir, @NotNull String newFileName, @NotNull String expectedPackage, @NotNull  CustomFileTemplate template) {
  GoFile file = (GoFile)CreateFileFromTemplateAction.createFileFromTemplate(newFileName, template, dir, null, true);
  assertNotNull(file);
  assertEquals(expectedPackage, file.getPackageName());
  WriteCommandAction.runWriteCommandAction(dir.getProject(), file::delete);
 }
}
origin: Camelcade/Perl5-IDEA

@Override
protected boolean isAvailable(DataContext dataContext) {
 return PerlProjectManager.isPerlEnabled(dataContext) && super.isAvailable(dataContext);
}
origin: AlexanderBartash/hybris-integration-intellij-idea-plugin

@Override
protected void postProcess(PsiFile createdElement, String templateName, Map<String, String> customProperties) {
  super.postProcess(createdElement, templateName, customProperties);
}
origin: AlexanderBartash/hybris-integration-intellij-idea-plugin

@Override
protected boolean isAvailable(final DataContext dataContext) {
  return super.isAvailable(dataContext) && ActionUtils.isHybrisContext(dataContext);
}
origin: Camelcade/Perl5-IDEA

@Override
protected boolean isAvailable(DataContext dataContext) {
 return PerlProjectManager.isPerlEnabled(dataContext) && super.isAvailable(dataContext);
}
origin: Camelcade/Perl5-IDEA

 @Override
 protected PsiFile createFileFromTemplate(String name, FileTemplate template, PsiDirectory dir) {
  final List<String> pathChunks = new ArrayList<>();

  if (StringUtil.contains(name, PerlPackageUtil.PACKAGE_SEPARATOR)) {
   pathChunks.addAll(StringUtil.split(name, PerlPackageUtil.PACKAGE_SEPARATOR));
  }
  else if (StringUtil.contains(name, "/")) {
   pathChunks.addAll(StringUtil.split(name, "/"));
  }
  else {
   pathChunks.add(name);
  }
  name = pathChunks.remove(pathChunks.size() - 1);

  for (String pathChunk : pathChunks) {
   if (StringUtil.isNotEmpty(pathChunk)) {
    final PsiDirectory sub = dir.findSubdirectory(pathChunk);
    dir = sub == null ? dir.createSubdirectory(pathChunk) : sub;
   }
  }
  return super.createFileFromTemplate(name, template, dir);
 }
}
origin: Camelcade/Perl5-IDEA

@Override
protected boolean isAvailable(DataContext dataContext) {
 return PerlProjectManager.isPerlEnabled(dataContext) && super.isAvailable(dataContext);
}
com.intellij.ide.actionsCreateFileFromTemplateAction

Most used methods

  • isAvailable
  • createFileFromTemplate
  • postProcess

Popular in Java

  • Making http requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSupportFragmentManager (FragmentActivity)
  • setRequestProperty (URLConnection)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Kernel (java.awt.image)
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now