Child pages
  • Lineage
Skip to end of metadata
Go to start of metadata

Lineage - Subclassing the easy way

Easy subclassing

Position the text cursor on the class or reference to a class you want to subclass and press Alt+Enter.

An Extend Class intention will appear, which when invoked, pops up an Extend Class dialog.

Here you can specify name, visibility and destination package. The default visibility for a new class is public and the destination package is prefilled to be the package from which you invoked the intention. Naturally only legal java identifiers are accepted as class or package names. And when you specify a non-existing package, IntelliJ IDEA will offer to create it for you. All fields and buttons are accessible via the keyboard for the highest efficiency.

Easy subclassing with an inner class

Creating an inner subclass of another class is just as easy as creating a regular subclass. Press Alt+Enter on a class or reference to a class and invoke Extend Class with Inner Class.

The Extend Class dialog now allows you to specify a destination class (using IntelliJ IDEA's familiar Class Chooser dialog) instead of a package.

  Here you can also specify if the inner class should be declared static and what its visibility should be.

Highlight Usages in File for "import"

Invoking Highlight Usages in File (default Ctrl+Shift+F7) usages on the import keyword, will highlight all references to the class imported in the file.

When the import statement is an on demand import, a chooser will first pop up, allowing you to choose which class to highlight or to highlight all imported classes.

  In version 2.1 of the Lineage it is also possible to highlight all reference to members imported by an import static statement.

Create Inner Class from Usage intention

The Create Inner Class from Usage intention makes it possible to quickly create an inner classes from an unknown reference.


Very similar to the quick fix IntelliJ IDEA provides for regular classes, but as an intention.


Features and bugs

Have you found a bug? Do you want to request a feature? Go to the Lineage project in Jetbrains' JIRA. There you can view planned and fixed bugs and features. Submit your own by clicking "Create New Issue".

  • No labels

1 Comment

  1. Anonymous

    I wonder why you think that, maybe if you thought about it a bit more you would change your mind.  Or maybe I am just being a bit egotistical.  What does everyone else think.

    Lineage Adena