Re: Hello... Tasklist developement question..
Tor Norbye <[email protected]> Fri, 28 Nov 2003 17:47:55 -0800
| Newsgroups | gmane.comp.java.netbeans.modules.tasklist.devel |
|---|---|
| Message-ID | <[email protected]> |
On Nov 28, 2003, at 10:57 AM, Trond Norbye wrote: > > Hello, > > I'm really glad to see that you are doing cleanup to the tasklist > module. I've > been kind of busy the last year at work, but the fact that you are > doing so much > great "cleanup" to the module has inpired me to try to find some time > to get > back into the project. Welcome Back!!! (I'm probably the wrong person to say welcome since I've been too busy working on Project Rave even in my spare time to be able to do any work on the tasklist. But one of these days....) > I was therefore wondering if there is something special things that I > should > work on, or if I should "find my own things". > > There are some things I would like to clean up: > * The source code comment parser creates a lot of unneeded String > objects. Sice > we don't need to support java 1.3 anymore (as far as I know) I would > like to > "refactor" this support to use StringBuffers and the internal regexp > library... I vaguely remember doing the last part already - migrating the code away from org.apache.regexp and using java.util.regex instead. But yes, the scanner could definitely use some work, especially the one which works only in comments; if I recall correctly, it's splitting each and every line up into a separate String. It would be ideal if you could for example just scan the source, and identify each comment range starting and ending index, and then do a regexp match (with a precompiled regular expression) on each range. > > * The "date selection panel" could probably be modified to use a > JSpinner to > select the time instead of the JTextFields it use... Yes. And I think that the date customizer could use some other usability enhancements too; I don't remember what they are at the moment, but I remember noticing a couple of things last time I used it. Take a look at for example Evolution or some commercial alternatives if you have them available. > > What do you think (or should I just "go back to sleep"? ;) I think it would be really useful if you could do work to get the "other" suggestion providers working, since Petr is focusing on the docscan module (and copyright? I see that it was split apart from the docscan module, but I don't know if that means copyright will no longer be supported or if it was for purity reasons only.), and Tim is focusing on the compiler module. (By the way Tim - any chance the compiler module can be integrated with the javaparser module soon? (Yes, I know it's difficult. But it would be OH so cool! Compile Project. Shift Select Errors. Click Fix. Voila.) In particular, pmd, javaparser, and javadoc. I see that the pmd guys are going to provide auto fixers for their rules soon (I already have some for pmd in the tasklist/pmd module). It would be cool to make sure these are integrated - and of course to include the latest version of pmd, since they have some cool new rules. Also, the javaparser could use some new autofixers - and this is pretty fun programming I think: identify a compiler error javac produces, and see if you can come up with some heuristics for suggesting how the error could be fixed. Adding try/catch blocks is hard without an AST for the code, but other errors, such as figuring out that the user has copied a class file but forgotten to rename the constructor, is pretty straightforward. And, wouldn't it be cool to offer to automatically upgrade code? E.g. "I see you're using org.apache.regexp, shall I convert to java.util.regex?. Or perhaps a more practical example, offer to fix @deprecated method calls with the new "correct" APIs (when possible or straightforward; sometimes deprecated methods are more difficult to fix. But you can easily scan the JDK javadocs for example and see all the places where they're saying - deprecated - use <method> instead. This is a simple map, which should easily lend itself to a javaparser module autofix suggestion.) -- Tor