Enable method creation where no method exists with params.

Issue #1325 duplicate
Justin Julicher created an issue

IntelliJ java has a feature where if you type in a name with brackets it will prompt you to create a method.

e.g:

Integer i = 1;
CustomClass myCustomClass = new CustomClass();
ConvertedClass myConvertedClass = convertCustomClassToConvertedClass(i, myCustomClass);

At the moment Webstorm/Intellij will just highlight with an error.

Would be good if it could on alt-enter give the following options:

  1. create instance method ( private ConvertedClassconvertCustomClassToConvertedClass(Integer i, CustomClass myCustomClass){}
  2. create static method (public static ConvertedClassconvertCustomClassToConvertedClass(Integer i, CustomClass myCustomClass){}
  3. create static method in helper class - creates new method in a new helper class (or gives option to select helper class).

Comments (3)

  1. Justin Julicher reporter

    Ah thanks sorry I didn’t do a search for multiple search terms (only searched method creation).

    Yes a duplicate.

  2. Log in to comment