-
Notifications
You must be signed in to change notification settings - Fork 9
Usages & Renaming
Finding usages refers to looking into every SQF file and finding the usage of something in each file. Rename refactoring refers to finding all usages of something and renaming those usages with only one action.
Finding usages is available by alt+F7 or by right clicking a variable and clicking "Find Usages". You can see what happens in the below image.
You can click on each of the usages and open them up in the editor as you please.
Renaming is available by pressing shift+F6 or by right clicking a variable and clicking "Refactor" and then "Rename".
All variables can be renamed inline. When a variable corresponds to a function, the rename function dialog is opened.
Renaming functions that are defined in CfgFunctions opens a dialog seen below.
The drop down box lists all know tags inside CfgFunctions. You can also define a new one if you wish.
The next text field corresponds to the function class name.
Below is a check box that reads "Rename root tag element". If checked, the tag class's tag attribute value will be changed rather than just the specified function's tag.
Finally, the file name in this case is read-only; it is just a preview of what the new function's file name will be. In the scenario when the function class name doesn't determine the file name, the file name is modifiable. Example:
class CfgFunctions
{
class myTag
{
class myCategory
{
class myFunction {file = "myFile.sqf";};
class other;
};
};
};
For the above example, myTag_fnc_myFunction's file is changeable in the dialog. On the other hand, myTag_fnc_other's file is non-changeable in the dialog and is simply fn_other.sqf
Clarification on tag classes and function classes is available at the Arma wiki.