Skip to content

Commit

Permalink
Removed add examples code gen option from webview
Browse files Browse the repository at this point in the history
Signed-off-by: paulober <[email protected]>
  • Loading branch information
paulober committed Sep 10, 2024
1 parent f37915e commit 3126024
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
11 changes: 0 additions & 11 deletions src/webview/newProjectPanel.mts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ interface SubmitMessageValue extends ImportProjectMessageValue {
picoWireless: number;

// code generation options
addExamples: boolean;
runFromRAM: boolean;
entryPointProjectName: boolean;
cpp: boolean;
Expand Down Expand Up @@ -155,7 +154,6 @@ enum PicoWirelessOption {
}

enum CodeOption {
addExamples = "Add examples from Pico library",
runFromRAM = "Run the program from RAM rather than flash",
entryPointProjectName = "Use project name as entry point file name",
cpp = "Generate C++ code",
Expand Down Expand Up @@ -233,8 +231,6 @@ function enumToParam(
return "-f picow_poll";
case PicoWirelessOption.picoWBackground:
return "-f picow_background";
case CodeOption.addExamples:
return "-x";
case CodeOption.runFromRAM:
return "-r";
case CodeOption.entryPointProjectName:
Expand Down Expand Up @@ -1097,7 +1093,6 @@ export class NewProjectPanel {
: null,
].filter(option => option !== null) as Library[],
codeOptions: [
theData.addExamples ? CodeOption.addExamples : null,
theData.runFromRAM ? CodeOption.runFromRAM : null,
theData.entryPointProjectName
? CodeOption.entryPointProjectName
Expand Down Expand Up @@ -1933,12 +1928,6 @@ export class NewProjectPanel {
<div id="section-code-gen" class="snap-start mt-10 project-options">
<h3 class="text-xl font-semibold text-gray-900 dark:text-white mb-8">Code generation options</h3>
<ul class="mb-2 items-center w-full text-sm font-medium text-gray-900 bg-white border border-gray-200 rounded-lg sm:flex dark:bg-gray-700 dark:border-gray-600 dark:text-white">
<li class="w-full border-b border-gray-200 sm:border-b-0 sm:border-r dark:border-gray-600">
<div class="flex items-center pl-3">
<input id="add-examples-code-gen-cblist" type="checkbox" value="" class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500">
<label for="add-examples-code-gen-cblist" class="w-full py-3 ml-2 text-sm font-medium text-gray-900 dark:text-gray-300">Add examples from Pico library</label>
</div>
</li>
<li class="w-full border-b border-gray-200 sm:border-b-0 sm:border-r dark:border-gray-600">
<div class="flex items-center pl-3">
<input id="run-from-ram-code-gen-cblist" type="checkbox" value="" class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500">
Expand Down
2 changes: 0 additions & 2 deletions web/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ var exampleSupportedBoards = [];
}

// code-gen options
const addExamplesCodeGen = document.getElementById('add-examples-code-gen-cblist').checked;
const runFromRamCodeGen = document.getElementById('run-from-ram-code-gen-cblist').checked;
const nameEntryPointProjectName = document.getElementById('entry-project-name-code-gen-cblist').checked;
const cppCodeGen = document.getElementById('cpp-code-gen-cblist').checked;
Expand Down Expand Up @@ -402,7 +401,6 @@ var exampleSupportedBoards = [];
picoWireless: picoWireless,

// code-gen options
addExamples: addExamplesCodeGen,
runFromRam: runFromRamCodeGen,
entryPointProjectName: nameEntryPointProjectName,
cpp: cppCodeGen,
Expand Down
8 changes: 0 additions & 8 deletions web/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class State {
hwinterpolationFeature;
hwtimerFeature;
picoWirelessSelection;
addExamplesCodeGen;
runFromRamCodeGen;
entryProjectNameCodeGen;
cppCodeGen;
Expand Down Expand Up @@ -131,10 +130,6 @@ function restoreState(state) {
document.getElementById('hwtimer-features-cblist').checked = state.hwtimerFeature;
}

if (state.addExamplesCodeGen !== undefined) {
document.getElementById('add-examples-code-gen-cblist').checked = state.addExamplesCodeGen;
}

if (state.runFromRamCodeGen !== undefined) {
document.getElementById('run-from-ram-code-gen-cblist').checked = state.runFromRamCodeGen;
}
Expand Down Expand Up @@ -431,9 +426,6 @@ function setupStateSystem(vscode) {
case "usb-stdio-support-cblist":
state.usbStdioSupport = checkbox.checked;
break;
case "add-examples-code-gen-cblist":
state.addExamplesCodeGen = checkbox.checked;
break;
case "run-from-ram-code-gen-cblist":
state.runFromRamCodeGen = checkbox.checked;
break;
Expand Down

0 comments on commit 3126024

Please sign in to comment.