nizienko / property_switcher

An Idea plugin that can toggle values in local property files. This is useful when running tests in different environments.
4 stars 2 forks source link

Property Switcher

The Property Switcher Plugin is a lightweight IntelliJ IDEA plugin that streamlines working with local property files. It offers convenient shortcuts for quickly switching property values, making it ideal for tasks like running tests locally. Additionally, the plugin provides a customizable status bar widget that displays the values of selected properties. Stay informed about important property values at a glance with the Property Switcher Plugin's intuitive widget. Simplify your property file management, boost productivity, and effortlessly replace property values with ease.

Installation

Usage

Create a new file with the .propswitch extension in your project [New -> Property Switcher]. Define the properties and their options in the JSON format. Here's an example:

{
  "propertyFile": "local.properties",
  "properties": [
    {
      "name": "url",
      "options": [
        "http://112.88.44.13",
        "http://112.88.46.33",
        "http://112.88.46.63"
      ],
      "showInStatusBar": true
    },
    {
      "name": "theme",
      "options": [
        "light",
        "dark"
      ],
      "showInStatusBar": true
    }
  ]
}
Property Description
propertyFile Specify the name of the property file where the properties will be modified (e.g., local.properties).
properties Define an array of properties.
name Specify the name of the property.
options Provide an array of available options for the property.
showInStatusBar Set this to true if you want the property value to be displayed in the status bar widget. [optional]

If you've configured the status bar widget, current values of the specified properties will be displayed in the status bar.

License

This plugin is licensed under the MIT License.