|
Re: Automaticly implement an Interface or a Subclass [message #60813 is a reply to message #60792] |
Thu, 05 May 2005 15:11 |
Eclipse User |
|
|
|
Originally posted by: eclipse.rizzoweb.com
Elad Messing wrote:
> Hello all
> I have a newbie question, which I couldn't find an answer to.
>
> I was wondering if Eclipse provides a way to allow a one click
> "Source" option to create a new class from the interface which is now in
> focus. I think it is called "Auto Implementation".
> Also - the same usage to create a sub class for the class which is now
> in focus.
>
> Having to open the wizard and browse for the desired
> Interface/Superclass in the different text fields is too awkward. I mean
> - It could be known by using the object that is now in focus (editor
> window in focus).
The key is to have a super class or interface already selected in the
workspace, not open in an editor. Select an Interface or Class in one of
the navigation views* (Package Explorer view if your'e using the Java
perspective, Types view if using the Java Browsing pespective). Then
when you click the toolbar button or menus to create a new class, the
selected interface will automatically be selected in the wizard. Works
for classes as super class, too.
* Note: this does not work if the .java _file_ is selected (as in the
Resource Navigator view or in the package explorer), it must be the
_class_ or _interface_ "object" that has the C or I icon next to it.
HTH,
Eric
|
|
|
|
Powered by
FUDForum. Page generated in 0.07758 seconds