[ANN] Lineage 3.0

Lineage - High Powered Class Creation
Available from the Plugin Manager or download it manually from
http://plugins.intellij.net/plugin/?id=104

Changes

  • Added new Paste Class functionality. Just copy some source (from http://javaalmanac.com for example) and paste it in your project tree. It is an extension of the default paste mechanism, which means the keyboard shortcut is the default Ctrl+V

  • All of IntelliJ IDEA's class creation replaced with the improved class creation of Lineage. Now you can make a class abstract, static or specify its visibility at creation time and specifying the location where the class will be created is more flexible too.


Plugin description

  • Use Lineage to extend and implement classes with more flexibility via the intentions or a keyboard shortcut.

  • Lineage replaces the Create from Usage quick fixes with its own, so you can specify visibility, abstractness and location faster and easier.

  • Paste classes into your project structure from examples found on the web or other external source files.

  • The standard Create Class functionality has been expanded and improved.

  • Extended Highlight Usages: Invoke it on an import keyword to see where in the file import statements are used.


All features are accessible via the keyboard.

0
13 comments
Avatar
Permanently deleted user

Hi Bas,

Changes

  • Added new Paste Class functionality. Just copy some source (from http://javaalmanac.com for example) and paste it in your project tree. It is an extension of the default paste mechanism, which means the keyboard shortcut is the default Ctrl+V

  • All of IntelliJ IDEA's class creation replaced with the improved class creation of Lineage. Now you can make a class abstract, static or specify its visibility at creation time and specifying the location where the class will be created is more flexible too.


Sounds (and works) great! There's a small issue though: I'm getting an exception when trying to copy
directories in IDEA:

Argument 1 for @NotNull parameter of
com/intellij/psi/impl/PsiJavaParserFacadeImpl.createFileFromText must not be null
java.lang.IllegalArgumentException: Argument 1 for @NotNull parameter of
com/intellij/psi/impl/PsiJavaParserFacadeImpl.createFileFromText must not be null
at com.intellij.psi.impl.PsiJavaParserFacadeImpl.createFileFromText(PsiJavaParserFacadeImpl.java)
at net.intellij.plugins.lineage.actions.PasteClassAction.performAction(PasteClassAction.java:158)
at net.intellij.plugins.lineage.actions.OverridingAction.actionPerformed(OverridingAction.java:33)


Sascha

0

Hi Sascha,

Please try version 3.0.1 which I have just uploaded.
Also note that copying directories currently not supported by the plugin. The Past Class functionality is meant to copy plain text sources from for example a forum:

Into your project. Copying directories from the file system or other directories will be supported in a later version of Lineage.

Thanks for your support,
Bas

0
Avatar
Permanently deleted user

Hi Bas,

Please try version 3.0.1 which I have just uploaded.


Works fine now, thanks.

Also note that copying directories currently not supported by the plugin.


I actually didn't expect anything special to happen. The exception was the result of Ctrl-C, Ctrl-V
on a directory inside IDEA.


Sascha

0
Avatar
Permanently deleted user

Hi,

I just installed the latest version of this plugin and it's very cool. I'm a
bit confused by the "Create Interface" dialog, however. See the attached
image. Since I'm creating an interface, it doesn't make sense to declare it
abstract. Also, the Class box should say "Interface" in this context and
since an interface doesn't extend anything, the label "Extend class
'java.lang.Object' with" should be changed and the button should
say .

Finally, the default directory that appears for "Choose Destination
Directory" is the first directory instead of the one for the current module.
Can this be fixed?

Thanks for the great plugin!

;ted






Attachment(s):
Lineage-CreateInterface.png
0
Avatar
Permanently deleted user

Bas,

I've just tried Lineage 3.0.1 and found a problem.

I have class


Interface A doesn't exist yet.

If I place the cursor before "A" and pressing Alt + Enter, IDEA will show the action list (see the screenshot). After selecting "Create Class 'A'" and pressing Enter, nothing is created. If I try Alt + Enter one more time, "Create Class 'A'" doesn't appear in the list anymore.

Try to do the same process with "Create Enum 'A'", "Create Inner Class 'A'", "Create Interface 'A'", I find that they have same problem.

Please fix it.

Regards,

T.



Attachment(s):
lineage.png
0

I just installed the latest version of this plugin
and it's very cool. I'm a
bit confused by the "Create Interface" dialog,
however. See the attached
image. Since I'm creating an interface, it doesn't
make sense to declare it
abstract. Also, the Class box should say "Interface"
in this context and
since an interface doesn't extend anything, the label
"Extend class
'java.lang.Object' with" should be changed and the
button should
say .


Thanks for the report. These issues are fixed in version 3.0.2 of the plugin.

Finally, the default directory that appears for
"Choose Destination
Directory" is the first directory instead of the one
for the current module.
Can this be fixed?


This will be fixed in a future version.

Thanks for the great plugin!


I am glad you like it.
Enjoy the new version,

Bas

0

Hi t800t8,

Please try version 3.0.2 of the plugin. Your issue should be fixed there.

Bas

0
Avatar
Permanently deleted user

Thanks, Bas. It works correctly :)

Regards,

T.

0
Avatar
Permanently deleted user

Bas,

After create a class, it will be better if the caret is placed after class name so user can easily enter "extends" or "implements".

Regards,

T.

0
Avatar
Permanently deleted user

Hello Ted,

Bas Leijdekkers wrote:
>> Finally, the default directory that appears for
>> "Choose Destination
>> Directory" is the first directory instead of the one
>> for the current module.
>> Can this be fixed?


This will be fixed in a future version.


This should now be fixed in 3.0.5.

Enjoy,
Bas

0
Avatar
Permanently deleted user

Hi t800t8,

t800t8 wrote:

After create a class, it will be better if the caret is placed after
class name so user can easily enter "extends" or "implements".


This is fixed for Create class in Lineage version 3.0.5. For the
intentions and quick fixes (Extend Class, Create Unknown Inner Class and
others) this is a harder problem and will hopefully be fixed in a future
version.

Bas

0
Avatar
Permanently deleted user

A bug report:
If I execute quick fix on 'NotYetCreatedInterface' in this code:

public interface MyInterface extends Serializable, NotYetCreatedInterface
{
}

The intention options are "create class" rather than "create interface",
and do indeed create classes.

Cheers,
N.

0

Nathan,

Thanks for the report. If you are using EAP version of IntelliJ IDEA Diana, a fix for this issue is available in version 3.1 of Lineage. I will release a version of Lineage for IntelliJ IDEA Selena sometime in the next couple of days.


Enjoy!
Bas

0

Please sign in to leave a comment.