IntelliJ IDEA 14.0.0 Web Help

Extract Include File

The Extract Include refactoring is used to extract a fragment of includeLanguages code into a separate include file.

To extract an include file

  1. In the editor, select the code block to be extracted and choose Refactor | Extract | Extract Include File on the main menu or on the context menu of the selection.
  2. In the Extract Include File dialog box that opens, specify the name of the target include file in the Name for extracted include file text box.
  3. In the Extract to directory text box, specify the directory to store the include file in. Leave the predefined directory, or redefine it manually, or click the Browse button browseButton.png and choose the desired folder in the Select Target Directory dialog box that opens.
  4. Click OK, when ready. IntelliJ IDEA extracts the selected source code into the specified file in the target directory and generates the corresponding reference in the source file.

    If there are any duplicates for the selected fragment, IntelliJ IDEA will suggest you to change them for the corresponding reference as well.

See Also

Last modified: 4 December 2014
comments powered by Disqus