-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow project settings to be configurable (#31)
* Add basic project settings Uses team number setting in generated preferences file * Include project json file in project export * Add a UI for configuring settings * Respect epilogue support setting when generating code * Show settings when creating a new project * Default new project names to empty string * Move project name to settings object for consistency * Validate settings to prevent saving with bad input (eg no project name or team number) * Trim leading and trailing whitespace from text on save * Make settings flexible * Add definitions for grouping settings together * Allow custom settings to be defined (eg by plugins)
- Loading branch information
1 parent
4127315
commit e5f1199
Showing
13 changed files
with
434 additions
and
83 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
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,10 +1,13 @@ | ||
import { Project } from "../bindings/Project" | ||
import { unindent } from "../codegen/java/util" | ||
|
||
export const BundledPreferences = unindent(` | ||
{ | ||
"enableCppIntellisense": false, | ||
"currentLanguage": "java", | ||
"projectYear": "2025", | ||
"teamNumber": 9999 | ||
} | ||
`).trim() | ||
export const generateBundledPreferences = (project: Project): string => { | ||
return unindent(` | ||
{ | ||
"enableCppIntellisense": false, | ||
"currentLanguage": "java", | ||
"projectYear": "2025", | ||
"teamNumber": ${ project.settings["robotbuilder.general.team_number"] } | ||
} | ||
`).trim() | ||
} |
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
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.