AppCode 2018.2 Help

Extract Property

In, while editing pom.xml, one needs to define a property and replace the occurrences of some value - artifact version, for example, - with this property.

For these purposes, AppCode provides the Extract Property refactoring.

Extract Property refactoring creates a new property definition in the specified pom.xml file, finds all the occurrences of the selected string in the hierarchy of pom.xml files, and replaces them with the above property in the format: ${<property_name>}

The Extract Property refactoring lets you move expressions and local declarations to properties.

To extract a property

  1. Place the cursor within the expression or declaration of a variable to be replaced with a property.
  2. Choose Refactor | Extract | Property in the main menu, or on the context menu.
  3. If more than one occurrence of the expression is found within the class, specify whether you wish to replace only the selected occurrence, or all the found occurrences with the new property.
  4. Choose the semantic for the property.
  5. If you want the constant to be defined in the private category, select the Put to private category checkbox.
  6. To complete the refactoring, press or .

    If you haven't completed the refactoring and want to cancel the changes you have made, press .

Last modified: 16 August 2018