Re: [tasklist] Compiler submodule

Tor Norbye <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.tasklist.devel
Organization Sun Microsystems, Inc
Message-ID <1046118405.11923.41.camel@proto>
On Mon, 2003-02-24 at 10:19, Tim Lebedkov wrote:
> Hello,
> 
> an attachment to this eMail is a new submodule: compiler. It replaces
> default CompilationEngine
> and creates a SuggestionProvider for compilation errors. Each time you
> compile
> something (e.g. F9) it recreates suggestions of this type (use internal
> compilation for better results).

I just had an idea, which I think is the "right" user interface for
this module.

It should not generate suggestions into the suggestions view.
Instead, it should be a replacement for the Output window.

In other words:  When you press F9 to compile today, you get a
new pane in the Output window, called "Compiler - Output" or something
like that. It's a term window, with hyperlinks to errors.

The compiler module will do something similar: when you press F9,
instead of a terminal window, you get a new tasklist window
(just like selecting Tools -> "Scan Directory For Suggestions" does)
and the results of compilation are provided as suggestions/tasks
in the new window. The window label will be "Compiler - Output"
(or "Compiler Errors", etc.) just like before.

I think this has a cleaner user model than showing the suggestions
intermixed with the regular suggestions window, since errors there
are typically computed as the result of document edit, not explicit
user actions.

Over time, I think it makes sense to move some other tools to
generate output into tasklist windows too, instead of the terminal.
The PMD module's output for example, should behave in a similar way.

In fact, I've had an offline request from somebody who wanted to
use a tasklist-output window instead of the regular text one, since
he wanted to put multiple attributes (that the user can select),
context menus on a per action basis, etc.

The only "difficulty" here is that the official tasklist API doesn't
allow you to create new windows - you have to use the tasklist-core
module to do that. But that shouldn't be a big problem.

And yes, I'd still like to integrate some of the javaparsing
code such that the compiler error panel has the same suggestions
for error-fixing.

NEWSFLASH - the java module appears to have integrated what we need
for the javaparser module, so I'll modify my code and commit as 
soon as I get some free time (probably on the train tomorrow).

-- Tor

> 
> There are some things we have to discuss:
> 1. I don't know whether it is a good idea to create a submodule for it. It
> is really small.
>    That's why I did not committed it yet
> (2)(Tor) It would be very nice to combine this functionality with the
>     functionality which is already in "javaparser"; which generates
>     not just suggestions for the errors themselves, but additional
>     suggestions to "autofix" the errors. For example, if you get
>     "undefined class: File", it generates the suggestion
>     "import class java.io.File".  The code which analyzes errors
>     is tightly coupled to the java parser annotations right now,
>     so that would need to be refactored in some way.
> (3)(Tor) On the other hand, it might be nice to keep it optional for two
>     reasons:
>     (a) because it's tied in to the user-activated compilation,
>         it follows a different rescan model than the other suggestion
>         providers.   For example, presumably errors can occur in
>         lots of files, not just the one you're looking at, and all
>         these should be included. When should errors be cleared -
>         not until next recompile? etc. etc.
>     (b) It replaces the builtin compilation engine. I only took
>         a brief look, but it looked as though it duplicated rather
>         than delegate to the builtin engine, which means the
>         architects (yarda, jesse) might have some objection to making
>         it part of the standard release.
> 4 ...
> 
> SUGGESTIONS are welcome
> 
> Tim
> 
> 
> 
> 
> ______________________________________________________________________
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
-- 
Tor Norbye <[email protected]>
Sun Microsystems, Inc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.