Re: [Anjuta-list] [RFC] Customizable Tools



On 25 Nov 2002 17:24:48 +0530
Biswapesh Chattopadhyay <biswapesh_chatterjee tcscal co in> wrote:
> R1) The user should be able to define a program to execute and associate
> a name with it.
> R2) The user should be able to specify command line parameters.
> Parameters might be fixed or variables (e.g. file name of the current
> buffer, top project directory, etc.)
> R3) The user should be able to specify the directory from which the toll
> would be invoked. This should also expect variable names (e.g. directory
> of the current file, top project directory, etc.)
> R4) The user should be able to define the use tools which are like
> filters, i.e. take the current buffer from standard input (e.g. indent)
> R5) The user should be able to direct the output of the tool. I can
> think of the following options here:
> 	1) The tool is invoked in a seperate terminal and the output goes
> there.
> 	2) The tool output goes to one of the message panes (e.g. Find/Build,
> etc.)
> 	3) The tool modifies the current buffer (replaces, inserts at current
> cursor, appends)
> 	4) The tool output pops up as a message box.
> 	5) The tool output opens a new buffer.
> 	6) Too output is discarded.
> Similar options should exist for standard error.

This sounds pretty cool, although I think R5.3 above is superfluous to
begin with.

It'd be pretty cool if we could define some idea of what the output "means".

I have this vague, but crass, example in my head:

1) I define a "grep" external tool, which takes a prompted string
argument prompted with "Pattern:", and runs grep -nH '%a'. (%a being my
argument.)

2) I define stderr to go to a newly defined tab in my "messages", called
"greperr".

3) I define stdout to go to a new (each time) tab in my "messages",
called (I dunno) "Grep %a", with %a being my argument.

4) I tell Anjuta that these tabs will contain "filename:linenum:text", somehow.

5) I run my grep tool, Anjuta prompts me for my pattern and I type
"fish", runs grep, and dumps the output I wanted into my "Grep fish"
tab, where I can click on it to take me to the line where "fish" was
mentioned.

I realise all the above is easily doable in Anjuta already, without
defining any new "tools", but consider the possible next step - that a
method for encoding how a script should be called by Anjuta as a tool is
defined. This could be, for instance, a chunk of XML preceeded by an
escape sequence (to Anjuta - any string of identifiable characters), or
simply some other magic incantation in a comment or unused string
literal.

You've suddenly got an IDE that's very easily extensible via shell (or
perl, or python, or whatever) scripting, and an easy way of sharing your
enhancements.

EMACS and VIM are both extensible, but only via arcane languages that
don't have a really vast number of users. Anjuta, on the other hand,
would be extensible at least in this limited respect by anyone capable
of writing the tool in virtually any language - given that Anjuta is
written for developers, that could almost mean every user.

Of course, I'm only tossing about ideas here, and won't be offended if
you don't want to use them.

Dave.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]