Re: Text editors



Christopher Atlee wrote:
> 
> This is exactly what I'm suggesting :)  Provide a set of CORBA components,
> each of which implements a standard Editor interface.  Then you can choose
> the right tool for the job and leave the project developers to code their
> project and not yet another text editor.
> 

I've spent a lot of time working on how to interface external editors to
IDEs. The previous interface I described handles probably 60 percent of
the integration. For example, when a user clicks on a function or 
method in a tree browser view, the browser calls the gotoFile method
of the editor, with the file name, row, and column. The editor determines
whether the file is already loaded, loads it if necessary, activates
this window, and positions the cursor. The real difficulty comes in
trying to design the interface for a debugger, since the debugger
need to have the editor display things like breakpoints, etc.

You also need to have the ability to give commands or callbacks to 
the editor so that the editor could bind commands to keys. For example,
our debugger would like to give a function to emacs to set a breakpoint 
on the current line.

For general application use, you also need the concept of a blocking
gotoFile call, e.g. a mail program that needs to wait until the user
is finished editing the file before continuing. 

Ultimately, things like syntax highlighting probably shouldn't be 
handled by the editor, but by a CORBA parser service. This would
give every editor source browsing and syntax highlighting, and
allow parsers to only be written once. this is where it gets thorny,
because the editor and parser pretty much have to share the buffer,
with the editor generating events for any text change.

Lastly, a good desktop facility would be a CORBA server to provide 
user-preference keybindings. Every application should query for what
the user prefers as his 'end-of-line' keystroke. There would be
a single app for editing key bindings. Every app could register
additional commands to be bound to keys.

I would love to see this, it would make every application developers
life much easier. I would be willing to contribute if someone wants
to start such an effort.

Thomas



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