Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

Remove preview mode for CLUE #336

Merged
merged 4 commits into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions locales/en/package.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@
"deviceSimulatorExpressExtension.configuration.title": "Device Simulator Express configuration",
"deviceSimulatorExpressExtension.configuration.properties.configEnvOnChange": "When you change the Python interpreter, the Device Simulator Express will automatically configure itself for the required dependencies.",
"deviceSimulatorExpressExtension.configuration.properties.debuggerPort": "The port the Server will listen on for communication with the debugger.",
"deviceSimulatorExpressExtension.configuration.properties.dependencyChecker": "Whether or not to ask if we can download dependencies. If unchecked, the extension will default to never download dependencies, except when automatically creating a virtual environment in the extension files.",
"deviceSimulatorExpressExtension.configuration.properties.previewMode": "Enable this to test out and play with the new Adafruit CLUE simulator!"
"deviceSimulatorExpressExtension.configuration.properties.dependencyChecker": "Whether or not to ask if we can download dependencies. If unchecked, the extension will default to never download dependencies, except when automatically creating a virtual environment in the extension files."
}
6 changes: 0 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,6 @@
"default": 5577,
"description": "%deviceSimulatorExpressExtension.configuration.properties.debuggerPort%",
"scope": "resource"
},
"deviceSimulatorExpress.previewMode": {
"type": "boolean",
"default": false,
"description": "%deviceSimulatorExpressExtension.configuration.properties.previewMode%",
"scope": "resource"
}
}
},
Expand Down
3 changes: 1 addition & 2 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@
"deviceSimulatorExpressExtension.configuration.title": "Device Simulator Express configuration",
"deviceSimulatorExpressExtension.configuration.properties.configEnvOnChange": "When you change the Python interpreter, the Device Simulator Express will automatically configure itself for the required dependencies.",
"deviceSimulatorExpressExtension.configuration.properties.debuggerPort": "The port the Server will listen on for communication with the debugger.",
"deviceSimulatorExpressExtension.configuration.properties.dependencyChecker": "Whether or not to ask for dependency downloads. If unchecked, the extension will default to never download dependencies, except when automatically creating a virtual environment in the extension files.",
"deviceSimulatorExpressExtension.configuration.properties.previewMode": "Enable this to test out and play with the new Adafruit CLUE simulator!"
"deviceSimulatorExpressExtension.configuration.properties.dependencyChecker": "Whether or not to ask for dependency downloads. If unchecked, the extension will default to never download dependencies, except when automatically creating a virtual environment in the extension files."
}
1 change: 0 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const CONFIG = {
PYTHON_PATH: "python.pythonPath",
SHOW_DEPENDENCY_INSTALL: "deviceSimulatorExpress.showDependencyInstall",
SHOW_NEW_FILE_POPUP: "deviceSimulatorExpress.showNewFilePopup",
ENABLE_PREVIEW_MODE: "deviceSimulatorExpress.previewMode",
};

export const CONSTANTS = {
Expand Down
31 changes: 3 additions & 28 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,8 @@ export async function activate(context: vscode.ExtensionContext) {
const openSimulator: vscode.Disposable = vscode.commands.registerCommand(
"deviceSimulatorExpress.common.openSimulator",
async () => {
const isPreviewMode = getIsPreviewMode();

const chosen_device = await vscode.window.showQuickPick(
Object.values(CONSTANTS.DEVICE_NAME_FORMAL).filter(
device =>
isPreviewMode ||
device !== CONSTANTS.DEVICE_NAME_FORMAL.CLUE
)
Object.values(CONSTANTS.DEVICE_NAME_FORMAL)
);

if (!chosen_device) {
Expand Down Expand Up @@ -420,14 +414,8 @@ export async function activate(context: vscode.ExtensionContext) {
const newFile: vscode.Disposable = vscode.commands.registerCommand(
"deviceSimulatorExpress.common.newFile",
async () => {
const isPreviewMode = getIsPreviewMode();

const chosen_device = await vscode.window.showQuickPick(
Object.values(CONSTANTS.DEVICE_NAME_FORMAL).filter(
device =>
isPreviewMode ||
device !== CONSTANTS.DEVICE_NAME_FORMAL.CLUE
)
Object.values(CONSTANTS.DEVICE_NAME_FORMAL)
);

if (!chosen_device) {
Expand Down Expand Up @@ -797,14 +785,8 @@ export async function activate(context: vscode.ExtensionContext) {
const deployToDevice: vscode.Disposable = vscode.commands.registerCommand(
"deviceSimulatorExpress.common.deployToDevice",
async () => {
const isPreviewMode = getIsPreviewMode();

const chosen_device = await vscode.window.showQuickPick(
Object.values(CONSTANTS.DEVICE_NAME_FORMAL).filter(
device =>
isPreviewMode ||
device !== CONSTANTS.DEVICE_NAME_FORMAL.CLUE
)
Object.values(CONSTANTS.DEVICE_NAME_FORMAL)
);

if (!chosen_device) {
Expand Down Expand Up @@ -1024,13 +1006,6 @@ export async function activate(context: vscode.ExtensionContext) {
}
);

const getIsPreviewMode = (): boolean => {
const isPreviewMode: boolean = vscode.workspace
.getConfiguration()
.get(CONFIG.ENABLE_PREVIEW_MODE);
return isPreviewMode;
};

context.subscriptions.push(
installDependencies,
runSimulator,
Expand Down