-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58202ed
commit f9ff9f2
Showing
8 changed files
with
300 additions
and
91 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
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
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
25 changes: 24 additions & 1 deletion
25
src/main/kotlin/insyncwithfoo/ryecharm/uv/generator/UVNewProjectSettings.kt
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 |
---|---|---|
@@ -1,6 +1,29 @@ | ||
package insyncwithfoo.ryecharm.uv.generator | ||
|
||
import com.jetbrains.python.newProject.PyNewProjectSettings | ||
import insyncwithfoo.ryecharm.Labeled | ||
import insyncwithfoo.ryecharm.message | ||
import insyncwithfoo.ryecharm.propertiesComponent | ||
|
||
|
||
internal class UVNewProjectSettings : PyNewProjectSettings() | ||
internal enum class ProjectKind(override val label: String) : Labeled { | ||
APP(message("newProjectPanel.settings.projectKind.app")), | ||
LIBRARY(message("newProjectPanel.settings.projectKind.library")), | ||
PACKAGED_APP(message("newProjectPanel.settings.projectKind.packagedApp")); | ||
} | ||
|
||
|
||
internal class UVNewProjectSettings : PyNewProjectSettings() { | ||
var initializeGit: Boolean | ||
get() = propertiesComponent.getBoolean("PyCharm.NewProject.Git") | ||
set(value) = propertiesComponent.setValue("PyCharm.NewProject.Git", value) | ||
|
||
var distributionName: String? = null | ||
set(value) { | ||
field = value?.takeIf { it.isNotEmpty() } | ||
} | ||
|
||
var projectKind = ProjectKind.APP | ||
var createReadme = true | ||
var pinPython = true | ||
} |
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
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
Oops, something went wrong.