public abstract class ScratchFileCreationHelper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ScratchFileCreationHelper.Context |
Modifier and Type | Field and Description |
---|---|
static LanguageExtension<ScratchFileCreationHelper> |
EXTENSION |
Constructor and Description |
---|
ScratchFileCreationHelper() |
Modifier and Type | Method and Description |
---|---|
void |
beforeCreate(Project project,
ScratchFileCreationHelper.Context context) |
static PsiFile |
parseHeader(Project project,
Language language,
java.lang.String text) |
boolean |
prepareText(Project project,
ScratchFileCreationHelper.Context context,
DataContext dataContext)
Override to change the default initial text for a scratch file stored in
ScratchFileCreationHelper.Context.text field. |
static java.lang.String |
reformat(Project project,
Language language,
java.lang.String text) |
public static final LanguageExtension<ScratchFileCreationHelper> EXTENSION
public boolean prepareText(Project project, ScratchFileCreationHelper.Context context, DataContext dataContext)
ScratchFileCreationHelper.Context.text
field.
Return true if the text is set up as needed and no further considerations are necessary.public void beforeCreate(Project project, ScratchFileCreationHelper.Context context)
public static PsiFile parseHeader(Project project, Language language, java.lang.String text)