Is there any way to tell IntelliJ IDEA not to look at files during a search/replace or during refactorings?

前端 未结 3 453
星月不相逢
星月不相逢 2021-01-12 08:41

Basically my question is the topic ^

I have 4 files that are massive. I need to put them in resources under my maven project structure. Whenever I do a string-based

3条回答
  •  攒了一身酷
    2021-01-12 09:22

    There are two questions there:

    1) How to exclude these files in string based refactoring such as search and replace

    You can set up a custom scope when you do a find and replace. This custom scope is saved so you don't have to set it up every time you do a find and replace.

    Open the find-and-replace window or the find-in-path window and you will see the scope section in the window with "Custom" as the last option. You can select the files that you want to include/exclude here.

    2) How to prevent files from being modified in the IDE without write protecting them

    This I'm not sure about. You can add them to a separate change list so that they will always be grouped away from your main set of changes or add them to the vc ignore list. But this doesn't stop the IDE from modifying them. Perhaps you should find out what is editing those files and stop that process?

提交回复
热议问题