I've been thinking about what would really make me go 'Wow!' in an IDE.
IDEA has made me go 'wow' several times with refactorings, live
templates, and smart completion.
Inspections are also amazing. I read somewhere that Dave Griffiths
is working on global inspections. I can't wait.
Here something I've been thinking of:
IDEA could analyze methods for effects, side-effects, calculate
pre-conditions and post-conditions. It could use this information
to verify that pre- and post-conditions are not violated.
IDEA could detect that p cannot be null. This piece of information
could be encoded using an annotation, like this:
IDEA would of course provide the option to automatically hide these
IDEA could also calculate if parameters passed are modified, e.g.:
The same thing should be done with return values. Let's say I have
This would tell me that getX requires its parameter to be not null, and p
may be null. This is fixed by annotating the getPoint call in the PointSource
interface to not return null. This requirement is, of course, inherited by the
implementation of getPoint in the Test class. That requirement will generate
a warning since Test.getPoint may produce a null return value.
The updated and fixed code would look like this:
This would make me go 'Wow!'