Adding {} in string template if necessary.
#KT-2637 in progress
This commit is contained in:
@@ -219,6 +219,12 @@ public class JetPsiFactory {
|
||||
return whenEntry;
|
||||
}
|
||||
|
||||
public static JetStringTemplateEntryWithExpression createBlockStringTemplateEntry(@NotNull Project project, @NotNull JetExpression expression) {
|
||||
JetStringTemplateExpression stringTemplateExpression = (JetStringTemplateExpression) createExpression(project,
|
||||
"\"${" + expression.getText() + "}\"");
|
||||
return (JetStringTemplateEntryWithExpression) stringTemplateExpression.getEntries()[0];
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static JetImportDirective createImportDirective(Project project, @NotNull String path) {
|
||||
return createImportDirective(project, new ImportPath(path));
|
||||
|
||||
Reference in New Issue
Block a user