For 1) howabout not having the sub menu items - complicates things - but
just some way of declaring which (if any) class/interface you'd like to
descend from (using code completion), and what modifiers (final/abstract)
you'd like the class to have... maybe this could be done inplace like a live
template?

+1 for 2).  This is the behaviour that SoftAmis implemented in their
IDEA-alike open tool for JBuilder - Productivity.  I suppose the basic
concept to keep in mind is that the IDE should help you by keeping code
valid (as far as possible) whatever it does.

It would be nice to combine the two... In general you can say that if you
choose an abstract class as a superclass or add an interface to the
implements clause then the abstract method implementations are generated for
you (but only if you haven't declared the class to be abstract).

N.

Guillaume Laforge wrote:
> Hello
>
> When creating a new class extending a base class with abstract
> methods or implementing a certain interface, it would be really cool
> if we could automatically insert the methods that need to be
> implemented.
>
> As an example, when you create a MouseListener, you can type :
>
> MouseListener msl = new [TAB]
>
> When you hit TAB, you have the choice to implement an inline
> MouseListener or a MouseAdapter.
> It's pretty convenient.
>
> But when you create a new class, you just have a blank class, with no
> methods, no implementation or extension.
> So my IDEA, would be to provide two new helper features :
>
> 1) When you click on the project pane, and then in your sourcepath you
> right-click to invoke the contextual menu.
> You get a "New" item, with a list of new stuffs : "Class",
> "Interface", "File" and "Package".
> The first idea is to add another sub-list after "Class" and
> "Interface" : Class should have as sub-items : "extends class" and
> "implements class" that would show up a nice pop-up window with a
> list of Class or a list of Interface to extend or to implement
> (respectively). For the Interface item, it could also have an
> "extends interface" which would give us also a window within which we
> could choose an interface to extend.
>
> 2) Second enhancement, when a class is already created (or a newly
> created class not implementing or extending anything), the user has
> that :
>
> public class Stuff extends | [CTRL-SPACE]
> {
> }
>
> When he starts writting "extends" or "implements" and asks for the
> auto-completion feature using CTRL-SPACE, when the user choose a
> class with abstract methods or an interface, all the methods that
> need to be implemented should be auto-magically inserted in the class
> (if they don't already exist).
>
>
> Let's vote on these features ! What do you think about these things ?
> Personnaly, I'd appreciate a lot to do that. Especially since lately
> I've been implementing some comparators that implements the
> Comparator interface, creating some derived class from some abstract
> base class returned by factories, etc... There are many cases when
> you have to implement an interface or extends a class. That's one of
> the basis of object oriented programming !
> All you comments are welcome !


_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-features

Reply via email to