Re: [anjuta-devel] Sharing code between Nemiver and Anjuta
- From: Sébastien Granjoux <seb sfo free fr>
- To: Dodji Seketeli <dodji seketeli org>, The mailing list of the Nemiver project <nemiver-list gnome org>
- Cc: anjuta-devel-list <anjuta-devel-list gnome org>
- Subject: Re: [anjuta-devel] Sharing code between Nemiver and Anjuta
- Date: Mon, 07 Oct 2013 22:56:43 +0200
Hi,
I have spent some time to check how I can use Nemiver code inside
Anjuta. I see two ways to do this.
The first one is the easiest. I will reuse only the debugger backend. On
Nemiver side, it corresponds to the IDebugger interface. I agree that
it's better to use this interface than the gdb backend directly. On
Anjuta side, this will replace the gdb plugin.
The Anjuta plugin will be in C++, using libnemivercommon and loading the
module gdbmod. I have to write a wrapper around the debugger backend
object to implement the C IAnjutaDebugger interface.
The Nemiver IDebugger interface has quite a lots of functions, so it is
quite some work to wrap all of them and I haven't checked yet if some
functions are difficult to wrap comparing to the IAnjutaDebugger interface.
It can be possible that a change in Nemiver or in IAnjutaDebugger could
help here. Except that, I don't expect other changes. I have been able
to load the gdbmod module outside Nemiver quite easily.
The second possibility is to reuse the GUI of Nemiver: the Context,
Register, Memory, Breakpoints windows... The advantage is that it allows
to share much more code. In Anjuta the debugger backend plugin is much
smaller than the debugger GUI plugin. If we have similar ratio, this
solution allows to share more than 3 time more code.
Another advantage of this solution is that the interface is simpler. The
debugger GUI interface needs simpler functions like start or stop the
debugger, load a program, get the debugger window....
The Nemiver widgets could communicate with the Nemiver debugger backend
in C++ like it works in Nemiver.
Of course, there are some drawbacks too. The main issue is that it is
much more difficult to reuse the Nemiver GUI because, contrary to the
debugger backend, it is organized in a bit different way than in Anjuta.
In Nemiver the GUI is handled by the IDBGPerspective object. This object
is responsible for creating and organizing all widgets. It can be
compared to the debugger manager plugin of Anjuta which is responsible
for the debugger GUI. The difference is that the Anjuta plugin handles
only the debugger specific windows like the breakpoint or the stack
windows and can use windows provided by other plugins like the editor or
the terminal window. Moreover Anjuta plugin doesn't control the layout
of the windows and give only hints for their position.
Another difference is the Nemiver Workbench object. It plays the role of
the AnjutaShell object in Anjuta as a parent of the other parts of the
application. I think one option is to write a custom Workbench object
that will redirect most requests to the AnjutaShell object. One issue is
that it has to be loaded as a module. Then the toolbar and the menu are
handled in a different way in Anjuta, they are described in a .xml file.
I think the second option is more interesting but it needs more work, to
avoid any ambiguities, I don't ask anyone to do it. I plan to work on
it. It will all take the time needed, I don't have a deadline.
What do you think about these two options?
Regards,
Sébastien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]