Skip to content

[Feature] Fix Simulator/Emulator naming inconsistency in launchAndroidEmulator command #2828

Description

@ConnorQi01

Summary

The launchAndroidEmulator.ts command has an internal naming inconsistency: the class is named LaunchAndroidSimulator and its codeName is launchAndroidSimulator, while the file name and user-visible label both correctly use "Emulator". Android virtual devices are called Emulators, not Simulators (that term belongs to iOS). This inconsistency was likely missed during the Android naming alignment work in v1.13.3.

Current state in src/extension/commands/launchAndroidEmulator.ts:

export class LaunchAndroidSimulator extends Command {
    codeName = "launchAndroidSimulator";
    label = "Launch Android Emulator"; // correct

And in package.json:

"command": "reactNative.launchAndroidSimulator",
"title": "%reactNative.command.launchAndroidSimulator.title%"

Why this is useful

Consistent naming reduces confusion for contributors. The file name, class name, codeName, and user-facing label should all agree on "Emulator" for Android. The current mismatch also makes code search less reliable (grepping launchAndroidEmulator does not find the class or command ID).

Suggested scope

  • Rename class LaunchAndroidSimulatorLaunchAndroidEmulator in launchAndroidEmulator.ts
  • Rename codeName from launchAndroidSimulatorlaunchAndroidEmulator
  • Update package.json command key reactNative.launchAndroidSimulatorreactNative.launchAndroidEmulator and the corresponding NLS key
  • Update package.nls.json and any localization files that reference the old key
  • Update any references in src/extension/commands/index.ts or elsewhere
  • Check whether the old command ID needs a deprecation alias for backward compatibility with existing keybindings

Evidence

  • src/extension/commands/launchAndroidEmulator.ts:12-13: class LaunchAndroidSimulator, codeName launchAndroidSimulator
  • package.json:124-125: command registered as reactNative.launchAndroidSimulator
  • CHANGELOG v1.13.3: "Aligning Android launch command naming" — this rename was missed in that pass
  • Compare: launchIosSimulator.ts correctly uses "Simulator" throughout (iOS term)

Validation

  • Verify "Launch Android Emulator" appears in the command palette and triggers correctly after rename
  • Verify no existing tests reference the old launchAndroidSimulator codeName
  • Verify package.json schema validation passes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions