List Info

Thread: Re: Accessing View from Plugin Part




Re: Accessing View from Plugin Part
user name
2007-03-12 05:29:10
2007/3/12, Andreas Pakulat <apakugmx.de>:
> On 12.03.07 01:15:03, dukju ahn wrote:
> > Hi, again.
> >
> > I also don't know how to access view pointer from
plugin part.
> >
> > At the part constructor, we initialize view
factory, addToolView(factory)
> > And, upon the user's request, views are created
and
> > embedded. Am I right so far?
> >
> > However, I cannot find any interfaces to access
already created views.
> > It is the plugin part that starts any action. And
we will have
> > to know the pointer of view associated with that
part.
> >
> > The problem is more complicated because one part
can have
> > more than two views.
> >
> > Is it not yet implemented? or is there any way to
access views
> > >from plugin part?
>
>
> I'm not sure why you think you need to access a
view/toolview of one
> plugin from another. The way to access another plugin
is to use the
> extension interface of that plugin. See
buildtools/builder/qmakebuilder,
> buildtools/builder/makebuilder.

No, I did not say that I need to access a view/toolview of
another plugin.
What I want to access is plugin's own toolview.

And, To be clear, I am talking about KDev4. And I am talking
about
toolviews, such as konsolview, snippet view etc..

First example, think about debugger (which is not yet
implemented).
The user sets breakpoint. Then debugger part should update
its breakpoint table. To update its table, the part needs to
have pointer
for its toolview.

Another example is subversion or CVS part. The part received
log history
from repository. Then, part should print its history via
toolview widgets.

In any case, plugin part should handle its widget.
And I cannot find the interfaces to these toolview.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: Accessing View from Plugin Part
user name
2007-03-12 06:10:39
On 12.03.07 03:29:10, dukju ahn wrote:
> 2007/3/12, Andreas Pakulat <apakugmx.de>:
> > On 12.03.07 01:15:03, dukju ahn wrote:
> > > Hi, again.
> > >
> > > I also don't know how to access view pointer
from plugin part.
> > >
> > > At the part constructor, we initialize view
factory, addToolView(factory)
> > > And, upon the user's request, views are
created and
> > > embedded. Am I right so far?
> > >
> > > However, I cannot find any interfaces to
access already created views.
> > > It is the plugin part that starts any action.
And we will have
> > > to know the pointer of view associated with
that part.
> > >
> > > The problem is more complicated because one
part can have
> > > more than two views.
> > >
> > > Is it not yet implemented? or is there any
way to access views
> > > >from plugin part?
> >
> >
> > I'm not sure why you think you need to access a
view/toolview of one
> > plugin from another. The way to access another
plugin is to use the
> > extension interface of that plugin. See
buildtools/builder/qmakebuilder,
> > buildtools/builder/makebuilder.
> 
> No, I did not say that I need to access a view/toolview
of another plugin.
> What I want to access is plugin's own toolview.

No you don't because you can't. There might be hundreds of
toolviews for
your plugin all showing the same data. What you want to do
is let the
toolview know about the plugin (as it is done for the
projectmanagerview) and then react on signals sent by the
part when
something happens (like a breakpoint is created).

> First example, think about debugger (which is not yet
implemented).
> The user sets breakpoint. Then debugger part should
update
> its breakpoint table. To update its table, the part
needs to have pointer
> for its toolview.

No it doesn't need that, thats the beauty of signals+slots
you don't
need tight coupling between the objects.

> Another example is subversion or CVS part. The part
received log history
> >from repository. Then, part should print its
history via toolview widgets.

No it should emit a signal that new log history can be
fetched. 

> In any case, plugin part should handle its widget.

No, definetly not. The plugin doesn't know how many
toolviews exist or
in which area they might be.

Andreas

-- 
You possess a mind not merely twisted, but actually
sprained.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )