-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support for creating sbt files #SCL-21374
- Loading branch information
Showing
5 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
14 changes: 14 additions & 0 deletions
14
scala/scala-impl/resources/fileTemplates/internal/Sbt File.sbt.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<html> | ||
<body> | ||
<table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111"> | ||
<tr> | ||
<td colspan="3"> | ||
<font face="verdana" size="-1"> | ||
This is a built-in template used by <b>IntelliJ IDEA</b> each time you create a | ||
Sbt File | ||
</font> | ||
</td> | ||
</tr> | ||
</table> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
scala/scala-impl/src/org/jetbrains/plugins/scala/actions/NewSbtFileAction.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.jetbrains.plugins.scala.actions | ||
|
||
import com.intellij.ide.fileTemplates.actions.CreateFromTemplateActionBase | ||
import com.intellij.ide.fileTemplates.{FileTemplate, FileTemplateManager} | ||
import com.intellij.openapi.project.Project | ||
import com.intellij.psi.PsiDirectory | ||
import org.jetbrains.sbt.icons.Icons | ||
import org.jetbrains.plugins.scala.ScalaBundle | ||
|
||
final class NewSbtFileAction extends CreateFromTemplateActionBase( | ||
ScalaBundle.message("newclassorfile.menu.action.sbt.text"), | ||
ScalaBundle.message("newclassorfile.menu.action.sbt.description"), | ||
Icons.SBT_FILE | ||
) { | ||
|
||
override def getTemplate(project: Project, dir: PsiDirectory): FileTemplate = FileTemplateManager.getDefaultInstance.getInternalTemplate("Sbt File") | ||
|
||
} |