[Kde-extra-gear] KGraphViewer ideas ...

Kleag kleag at free.fr
Wed Jun 24 22:19:40 CEST 2009


Le samedi 20 juin 2009 21:39:02 Sandro Andrade, vous avez écrit :
> Hi Gaël,
>
> In the KDevelop plugin I'm developing the control flow graphs are saved in
> a temporary file and they have to be updated in response to user navigation
> in code editor. So, I'm rewriting the *same* temporary file and everything
> I need is a way to tell the part to reload this temporary file. I know the
> file watcher takes care of file updates and asks the user for reloading it.
>
> Some questions:
>
> 1) What happens if I invoke openUrl more than once with different KUrls ?
> All the files will be watched ?
No, the last loaded one will be displayed and then updated. The previous ones 
are forgotten. This is true for each part instance, but you can have multiple 
instances as what is done in kgraphviewer when showin tabs.
.... In fact, I just checked the code and it is buggy: the watched files are 
never removed even if the only one watched is the last one. I have to correct 
that.

> 2) A watcher that doesn't ask the user for reloading confirmation would
> solve my problem. Can we parameterize this stuff or something similar ?
> Currently, I'm using different temporary files for graph update, which is
> quite time-consuming. If I use the same file, an always increasing number
> of reloading confirmation messages begins to appear, due to the addFile
> invocation on the watcher ...
This is configurable, the KMessageBox::questionYesNo uses the 
"reloadOnChangeMode" string as its dontAskAgainName parameter. So, you should 
be able to set the correct value in the configuration file.


Bye,

Gaël
>
> Thanks,
> Sandro
>
> On Thu, Jun 18, 2009 at 10:24 PM, Sandro Andrade
>
> <sandro.andrade at gmail.com>wrote:
> > Hi Sandro,
> >
> >
> > Hi Gaël
> >
> > Le mercredi 17 juin 2009 15:05:05 Sandro Andrade, vous avez écrit :
> >> > Ok, I'll try connect such signals to slots in my KDevelop plugin.
> >> > BTW, in the attached image you can see some preliminary result on
> >>
> >> control
> >>
> >> > flow graphs inside KDevelop using the KGraphViewer kpart.
> >>
> >> Yes! I also read your blog entry. Great job! Again, if you need some
> >> features
> >> in the part, please tell me. Given my free time, I'll try to implement
> >> them as
> >> soon as possible. You are also free to change the code if necessary.
> >
> > Yes, I tell you if I need something !
> >
> >>  > I'm using Graphviz programmatically to construct the graph from the
> >> >
> >> > function calls collected in the source code. It's API is quite ease
> >> > and complete.
> >>
> >> I'll have a new look at that as soon as possible, maybe during the
> >> summer.
> >
> > It would be nice if the part could also accept an Graphviz 'Agraph_t *'
> > to be visualized, alternatively to the .dot file name. I have to write a
> > temporary file in KDevelop (from the generated Agraph_t), which is then
> > loaded by the KGraphViewer kpart.
> >
> >> When your work will be integrated in the mainstream kdevelop, will it be
> >> a problem to be dependant from a part from extragear ?
> >
> > I don't think so. The features I'm implementing are a single plugin for
> > KDevelop. This plugin is in fact dependant from extragear, but this is
> > totally insulated from KDevelop core.
> >
> > Thanks,
> > Sandro
> >
> >> Regards,
> >>
> >> Gaël
> >>
> >> --
> >> KsirK - a world domination strategy game
> >> http://techbase.kde.org/Projects/Games/Tactic_and_Strategy/KsirK
> >>
> >> KGraphViewer - a GraphViz dot graphs viewer
> >> http://extragear.kde.org/apps/kgraphviewer
> >>
> >> _______________________________________________
> >> Kde-extra-gear mailing list
> >> Kde-extra-gear at kde.org
> >> https://mail.kde.org/mailman/listinfo/kde-extra-gear
> >
> > --
> > Sandro Santos Andrade
> > --------------------------------------------------------
> > Distributed Systems Laboratory (LaSiD)
> > Computer Science Department (DCC)
> > Federal University of Bahia
> > Brazil

-- 
KsirK - a world domination strategy game 
http://techbase.kde.org/Projects/Games/Tactic_and_Strategy/KsirK

KGraphViewer - a GraphViz dot graphs viewer
http://extragear.kde.org/apps/kgraphviewer



More information about the Kde-extra-gear mailing list