 |
And another new NetBeans plug-in...
Posted by timboudreau on September 20, 2005 at 01:44 AM | Comments (5)
A few people have mentioned that they would like to see better support for managing import statements in NetBeans.
Having the flu gave me plenty of time to code this weekend...so, here is a module that does that.
There are some bells and whistles still to be added - like using wildcard imports if the number of imports from a single package exceeds some threshold number. But still, right now it should do what a lot of people have been asking for:
- Sort imports
- Break up groups of imports with newlines
- Replace FQNs in source with simple class names and add imports for them
- Replace wildcard import statements with explicit imports of all classes that are actually used
Probably eventually this functionality should be merged with Fix Imports in NetBeans, but I figured I could make some people happy by writing a small module that does that now.
Bookmark blog post: del.icio.us Digg DZone Furl Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment
-
Hi Tim.
What is the reason plugins like this one are not available on auto update center?
What is the process for an external contributor to be published there?
How hard is it to create a personal update center?
If this is possible, we could federate the update centers so that they can be discovered via NetBeans IDE...
The issue I see if that If I do not read blogs, there is not a chance I can see this new plugin.
Now that is sooooo easy to create plug-ins in NetBeans 5.0, we might want to address these questions.
Ludo
Posted by: ludo on September 20, 2005 at 09:25 AM
-
Hi Tim,
I second Ludo's request. For examlple, the simple file chooser module is now on UC, and it's DA BEST. Had I not noticed it there, I'd probably never found out about it.
Thanks,
Dmitri
Posted by: trembovetski on September 21, 2005 at 08:16 AM
-
I'll get both of these up there soon. Editing the master build script is always a minor source of tribulation :-)
Posted by: timboudreau on September 21, 2005 at 08:43 AM
-
Dear Tim,
Slowly but surely my vision will come true: no import hassles for the programmer.
Some day tools like these will completely hide the import block at the beginning of the code and give us a more intuitive way of managing this stuff so we don't need to skip back and forth...
Tim, now you have a tool which we need to activate, but somewhere in the near future your tool will be integrated with the hinting system and will be running in the background... ;-)
Thank you for this nice work.
Sincerely,
Patrick Holthuizen
Posted by: pholthuizen on September 21, 2005 at 10:39 PM
-
Tim
What version of NetBeans is this for? I'm using NB 4.1 final, on Windows XP with JDK 1.5--and getting an error when I try to install this.
"The following module dependencies could not be satisfied: MODULE: org.netbeans.modules.importcrunchermodule org.openide.execution.deprecated > 1.0"...and more, it's quite a long list. I'll send a screenshot by email.
Thanks for this, it sounds good!
Patrick
Posted by: pdoubleya on September 22, 2005 at 01:05 AM
|