Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Automaticly implement an Interface or a Subclass
Automaticly implement an Interface or a Subclass [message #60792] Wed, 04 May 2005 12:52 Go to next message
Elad Messing is currently offline Elad MessingFriend
Messages: 26
Registered: July 2009
Junior Member
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).

This feature is available in IntelliJ IDEA, and I couldn't find it in
Eclipse.

Thank you!

Elad
Re: Automaticly implement an Interface or a Subclass [message #60813 is a reply to message #60792] Thu, 05 May 2005 15:11 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Automaticly implement an Interface or a Subclass [message #61451 is a reply to message #60813] Sat, 07 May 2005 10:46 Go to previous message
Eclipse UserFriend
Originally posted by: elad.messing!.gmail.com

Thanks Eric ! This is just what I needed !
Elad
Previous Topic:example plugin
Next Topic:Building Eclipse Problem
Goto Forum:
  


Current Time: Sat Nov 09 02:49:12 GMT 2024

Powered by FUDForum. Page generated in 0.07758 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top