You can change or rename almost any identifier selected within the body of a method in the editor pane (for example, a local variable or a method) of the Class Browser, by positioning the cursor in the entity and then selecting the Rename / Change command from the Refactor submenu of the Edit menu (or you can press Shift+F2). This then attempts to process the identifier under the cursor to perform a rename or change. Alternatively, you can select the whole identifier.
The JADE development security library is called, to ensure that you have access to the schema in which the entity will be renamed when it is not defined in the currently selected schema.
The result of the refactor action depends on the type of the identifier, as follows. When the:
Identifier is a local constant, variable, or method parameter, the Rename entity-name dialog is then displayed so that you can specify the required name in the New Name text box.
When you specify the new name and click the OK button, the local identifier is renamed throughout the method and the cursor is positioned after the identifier.
To undo a change, press Ctrl+Z for each identifier position in the method.
The change or rename action is performed, even if the method has been modified and is unsaved.
Variable is a user-defined global constant, the Global Constant maintenance dialog is displayed for that constant definition, regardless of the schema in which the global constant is defined. You can change or rename the global constant definition.
After the change or rename action is committed, the cursor is positioned after the global constant name.
You cannot use Ctrl+Z to undo this change.
This action is rejected if the method is changed or locked, because changes made will cause that method to be recompiled.
This action is equivalent to browsing to the global constants in the schema in which it is defined and then selecting the Change command from the Constants menu.
Variable is a method, the Rename Method dialog is displayed, regardless of the class or schema in which the method is defined.
After the rename action is committed, the cursor is positioned after the method name.
You cannot use Ctrl+Z to undo this change.
This action is rejected if the method is changed or locked, because changes made will cause that method to be recompiled.
This action is equivalent to browsing to the method in the Class Browser and then selecting the Rename command from the Methods menu.
Variable is a class constant, the Define Constant dialog is displayed, regardless of the schema or class in which the class constant is defined. After the change or rename action is committed, the cursor is positioned after the constant name.
You cannot use Ctrl+Z to undo this change.
This action is rejected if the method is changed or locked, because changes made will cause that method to be recompiled.
This action is equivalent to browsing to the class constant in the Class Browser and then selecting the Change command from the Constants menu.
Variable is a class property, the respective Define Attribute or Define Reference dialog is then displayed, regardless of the schema or class in which the property is defined. After the change or rename action is committed, the cursor is positioned after the property name.
You cannot use Ctrl+Z to undo this change.
This action is rejected if the method is changed or locked, because changes made will cause that method to be recompiled.
This action is equivalent to browsing to the property in a Class Browser and then selecting the Change command from the Properties menu.
If you rename a property of a class that is versioned (either the current or latest version), the reorganization treats the property as being new and it deletes the prior property name content. To prevent loss of data, you should therefore rename properties when the class is not versioned.
Variable is a class name, the Define Class dialog is displayed, regardless of the schema in which the class is defined. After the change or rename action is committed, the cursor is positioned after the class name.
You cannot use Ctrl+Z to undo this change.
This action is rejected if the method is changed or locked, because changes made will cause that method to be recompiled.
This action is equivalent to browsing to the class in a Class Browser and then selecting the Change command from the Classes menu.
If the cursor is not positioned on one of the variables in this list or it is a package or an interface entity, a message box is displayed advising you that the cursor is not positioned on an entity that can be changed or renamed in this way.
The action can also be rejected because:
The entity cannot be changed for a variety of standard reasons
The new name already exists as a local entity such as a parameter, local variable, or constant
A property, method, or constant already exists in the selected class or its superclasses
You are not entitled to change that entity (that is, security library rules apply)
Normal versioning and patch versioning rules apply, based on the schema of the entity that is changed.