In the field that opens, type your condition.įor example, let's type the following regular expression: You can also add other conditions depending on your variable. If, for example, you need to add a regular expression, select Text. In the filter area, click to add a new condition. In the available existing templates list, select the needed template.Ĭonstructor(firstName, lastName, age, eyeColor) is shown.Īs an example, let's add a condition for the $name$ variable. Use one of the existing templates to act as a prototype. WebStorm adds the created template to the existing template list ( Recent node). You can opt to save the template as inspection as well. In the editor area, enter the code template ( $variable$ that represents your code), in the dialog's toolbar click to save it for future use. Select Draft Template from the list of templates. In the Structural Search dialog, do one of the following: In the Structural Search dialog, you can quickly switch to the Structural Replace dialog. Search for a target structurallyįrom the main menu, select Edit | Find | Search Structurally to open the Structural Search dialog. WebStorm finds and replaces fragments of source code, based on the search templates that you create and conditions you apply. The structural search and replace ( SSR) actions let you search for a particular code pattern or grammatical construct in your code considering your code structure. Even if you use regular expressions, WebStorm still treats your code as a regular text. A conventional search process does not take into account the syntax and semantics of the source code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |