...
- Performs reference variants filtering based on expected type. If say an int is expected, only the variables/fields/methods of int type will be suggested.
- New! If there is a one-element array of expected type (like the one created automatically to communicate with inner classes), and its name is say
ref
, thenref[0]
is completed. - After new suggests all the classes descending from the expected type, inserts parentheses, if the selected class is abstract, will generate anonymous class body and suggest methods to implement.
- After throw new suggests only the runtime exceptions merged with those explicitly declared in throws-clause.
- In Javadoc throws tag suggests exceptions from method's throws-clause.
- After catch suggests the exceptions that are thrown inside try.
- After instanceof suggests inheritors of the checked expression type.
- When
Class<? extends X>
is expected, suggestsClass<Y>
for all Y inheriting from X. - Completes generic parameters where missing:
List<String> l = new ArrayList<|>();
- Inserts explicit method type parameters where necessary:
collect(Collections.emptyLis|)
wherecollect
expectsList<String>
- Suggests to cast to expected type after opening parenthesis:
String s = (|
- New! When calling a method or constructor with matching signature (e.g. a super method), fills all the parameters immediately.
- Suggests live templates with statically-determineable type and 'Smart completion' checkbox on.
- Searches expected class's static members for matching values:
Singleton s = |
will result inSingleton s = Singleton.getInstance();
- Searches method containing class for primitive constant fields which may suit.
- New! Analyzes dataflow in search for typecasts and *instanceof*s and suggests to cast expressions to expected type where possible.
- Keywords:
- Adds .class if Class is expected.
- Suggests this. If accessing outer class instance, qualifies it. class, this (possibly qualified), true, falsenull if there's a non-empty matching prefix and there are no other variants., null
- Second:
- Iterates over the visible methods/fields to check if their return value contains members of expected type, resulting in chained calls like
getModule().getProject()
. Prefix matching is done on both the first and the second member in chain (so you may get this result from bothgetMo|
andgetPro|
). - Converts between arrays and lists when you have one in context and need another.
- Adds array member access when you have an array of expected type:
int a = |
will result inint a = intArray[|]
.
- Iterates over the visible methods/fields to check if their return value contains members of expected type, resulting in chained calls like
...
- Context-specific reference and keyword completion, inserts parentheses, semicolons etc. where necessary.
- Runtime members:
- DefaultGroovyMethods
- SwingBuilder
- New! Grails domain class & controller dynamic properties and methods
- Gant script dynamic methods (e.g. depends, target) and properties (e.g. includeTargets, message)
Smart
- New! After new in variable initializer with known type suggests possible inheritors:
CharSequence c = new |
...