Plugin causing duplicate entries in the document context menu

Kevin Funk kfunk at kde.org
Tue Nov 13 08:48:50 GMT 2018


On Monday, 12 November 2018 16:40:08 CET René J. V. Bertin wrote:
> Friedrich W. H. Kossebau wrote:
> > I propose to not do experimental changes and to not treat the rest of the
> > logic as blackbox to make assumptions about and then potentially confuse
> > yourself and everyone with wrong ones, but to make use of the Open Source
> > nature of kdevelop and your ability to patch things.
> > 
> > Go to KDevelop::TextDocument::populateContextMenu() and from there start
> > to
> > explore
> 
> You're not wrong, and that would indeed be my next move. However, as an
> experimental scientist used to work with very complicated (= living) black
> boxes I like to proceed by elimination so that I have an idea what I do NOT
> have to look for once I do break open that black box. 

Hey,

Great anecdote, but as Friedrich indicated, we would appreciate if you could 
actually take advantage of the fact KDevelop is open-source, and inspect the 
program behavior with the different debugging techniques out there. Anything 
else is wasting us time.

Keep in mind that we as developers cannot possibly know each module in 
KDevelop ourselves. Each time we're investigating an issue, we have to 
rehearse how certain parts of KDevelop (which are potentially related to 
fixing the issue) work ourselves. Check if documented behavior of a function 
is actually representing the actual behavior. If there's documentation. Rinse 
and repeat for other functionality involved.

It takes time, but you'll get there. "I don't have the time to do it" or "I 
don't want to open that black box" doesn't count. If you'd like to have 
something fixed, you'll have to take the time to do a proper analysis of the 
problem supporting your hypothesis, Throwing around with assumptions, bit by 
bit, until finally $someone gives up and does the actual work for you doesn't 
fly (also cf. all the patches marked with "WIP" on Phab by you). 

The SNR ratio is very low again, in this thread, so far the only interesting 
bits were:

"I've started to notice multiple copies of the context menu items provided by 
certain plugins (...). The issue appears when I load the CTags plugin I'm 
working on (D16779); each time I switch to another (already) open document the 
set of duplicate items gets another duplicate. (...)"

Good. This seems wrong. But anything else in this thread is hypothetical 
(including my reply, granted), deceptive at best noisy and does not help. I'd 
need to do the analysis myself in order to help you. But then again: You're 
probably the only person around here that is interested in reviving the CTags 
plugin -- why would I want to invest time here...?

KDevelop/KF5/Qt5 is NOT a black box; quite the opposite, please use a debugger 
or similar debugging techniques to figure out why these functions are called 
twice (and from which context). Document what's wrong (so us developers who 
currently do not have the knowledge about these code parts "cached mentally" 
can relate) and potentially propose a solution.

Regards,
Kevin

> Like "does the CTags
> plugin cause other plugins to be loaded multiple times" as Kevin apparently
> thought.
> 
> populateContextMenu() is complex enough as it is to have as much background
> info as possible, including feedback from others who may have run into and
> solved similar issues. Or decided to drop them as not worth the hassle,
> esp. in a situation where there clearly is the choice of forking the
> plugin. (Although there too I face the question if I and/or others will be
> using it enough to warrant spending a significant amount of time on it.)


-- 
Kevin Funk | kfunk at kde.org | http://kfunk.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20181113/f805e958/attachment.sig>


More information about the KDevelop-devel mailing list