mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 17:20:54 +07:00
When a user call a static member of a class (field or method) they might not realize that there is still the `new` keyword present in the beginning of the expression. It's might be annoying, since the user need to go back to the beginning and remove the keyword manually and then go back where they were. This patch adds a quick-fix that removes `new` if the new expression can be treated as a valid call expression to either a method or a field of a class. GitOrigin-RevId: eac92b3904049546d7ca3a3b93f73386a5381b2c
21 lines
301 B
Java
21 lines
301 B
Java
// "Remove 'new'" "true"
|
|
|
|
class A {
|
|
class Nested {
|
|
public static A factory() { return new A(); }
|
|
}
|
|
|
|
}
|
|
|
|
class B {
|
|
{
|
|
new /*
|
|
* hello
|
|
* world
|
|
*/ A.// nested
|
|
Nested./* method */
|
|
<caret>factory// parameters
|
|
/* below */
|
|
(/* parameters are empty */);
|
|
}
|
|
} |