public class KV<K, V> { public K key; public V value; public KV(K key, V value) { this.key = key; this.value = value; } }
I am trying to reorganize a class variable of value that happens in place. This means that the dialog does not open; I press the enter button and he is trying to reorganize the entire project, including comments, and what is not, including:
<%--<link href="<c:url value="../core/core.css" />" />--%>
in the .jsp file. It's too smart to try to reorganize comments that fit the entire project. This often leads to a big risk of error, and refactoring in the Java environment is no longer safe.
The same thing happened in Intellij 12. Seriously, I do not need Intellij to recommend anything that is considered unsafe, or when it is not sure that it is one and the same!
I can rule out refactoring, but I don’t have time to evaluate the five “sentences” each time. It just increases the likelihood of human error: most of the time I just press the enter button and all things are reorganized.
Refactoring is also a serious issue in the Java environment when it sometimes tries to replace files in .js. Seriously, this should stop.
Without a pop-up dialog, I cannot cancel the "search bar". Even if this has been noted, Intellij should never include default sentences, especially if it is outside the current file. He may also recommend reorganizing them, but they should be excluded by default. That is, it should be a selection function, and not by default destroy everything.
This is a serious problem with a user with the later so-called Intellij smart refactoring. When refactoring JS files, I don’t want to look for Java files for comments or lines! Period! And vice versa!
Safety comes first! Developers who know what they are doing will look for the strings themselves if necessary. In a dynamic language environment, this makes Intellij impossible to use, because often and without any clear picture, sometimes refactoring goes on, sometimes it changes things according to the project and what doesn't.
There should be an option that says: "refactoring only in relation to this file or when 100% is output!", Especially for dynamic languages! For static languages, it should not even try to search for comments and lines outside the file.
I was not going to publish this, but I posed this question more than 2 years ago in bugtracker, but no one paid attention.
EDIT
For those of you who think I can go far, I just tried this:
With this class:
public class KV<K, V> { public K key; public V val; public KV(K key, V val) { this.key = key; this.val = val; } }
And adding this to any Java class, for example:
public class CoreConfig { String abc = "kv.val"; String def = "somethingElse.val"; }
When refactoring KV.val , as before, I get the following recommendations: ENTER from the disaster and something that I should evaluate and exclude one at a time. It takes effort and is simply annoying and risky. It's like someone screaming, STOP! And then oh, nothing after a minute, disappointment and a 1000 long word essay (this).

Seriously, is there a way to disable this risky behavior !? And is there a reason this is the default?