Re: [anjuta-devel] Sharing code between Nemiver and Anjuta



Sébastien Granjoux <seb sfo free fr> a écrit:

Maybe we could define a
layout kind of "none" or "embedding-friendly" that would *NOT* parent
the widgets of the components of the DBGPerspective.  It would
essentially do nothing.  That way, you can query the components of the
IDBGPerspective interface, get their widgets from the Anjuta shell (I
think) and parent them (effectively laying them out) as the shell sees
fit.  Would that work?

Yes, I think it will work. Now I'm not sure it needs to be a
perspective if it is used only by Anjuta.

Right, in the abstract it would be at the same abstraction level as a
perspective, but it wouldn't need to implement the IPerspective
interface.

But to be even more precise, the component is an object that implements
one or more interfaces.  So you need to specify the name of the object
(that name is exported/set by a naming registration mechanism) and
specify the interface that you want, from that object.
Hence something like:
     IPerspective::lookup_iface<IEditor> ("org.gnome.devtools.TextEditor", "IEditor");

Yes, you need to specify the name. But we can imagine that if the name
is not specified we can take any module implementing that interface,
for the code it will be enough.

I guess I have more comments about this, but it would be nitpicking at
this point.  We can dive into the details once we are at the point of
implementing this, I guess.  I think we generally agree on the
principles.

What do you mean by "split"?  You mean pack them in a separate shared
library?  separate directory in the source code? (they are the stuff
under src/persp/dbgperspective/nmv-*.{cc,h} today.

I mean pack them in a separate shared libraries or separate
modules.

OK, a shared library of widgets then.  That shared library would then be
used by the dbgperspective dynmod.  Note that the library would also
need to contain the workbench interface, at least, because some widgets
query the workbench for some stuff sometimes.  I think this should be
doable.

If it's possible, I think I don't need to write a specific
perspective for Anjuta and I can use these components directly, like I
can already use the gdbengine module.

Right.  But then I think you can already -- almost --do this.  That is,
load the IDBGPerspective iface, just to pull the symbols of all the
widgets/components that are used by the debugging perspective into your
Anjuta process.  Then you can just instantiate e.g, a nemiver::CallStack
or a nemiver::BreakpointView type right away.  The only surgery needed
is to arrange for make install to put the headers of these widgets
somewhere under in $includedir/nemiver/someplace so that your client
code can compile against it.  Or am I missing something?

Cheers.

-- 
                Dodji


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