MakeBuilder, errors visualization

David Nolden david.nolden.kdevelop at art-master.de
Tue May 5 20:58:35 UTC 2009


Am Dienstag 05 Mai 2009 21:09:29 schrieb Vladimir Prus:
> So, you suggest what whenever make plugin sees something that looks like
> and error, it calls TopDUContext.addProblem for an appropriate
> du context? How does one get TopDUContext given an URL of a source file?
This approach would have the advantage that it would be easy to integrate an 
"Assistant" for solving the problem, and one would not need to have to handle 
the editor smartrange stuff manually.

The top-context to use can be retrieved using 
DUChainUtils::standardContextForUrl.

The disadvantage would be that it would work only if there is a top-context 
for the document.

What Andreas was talking about was probably doing it the same way the problem-
reporter does it, using smart-ranges.

The best solution would probably be adding an interface to the problem-
reporter that allows specifying additional problems for an url, apart from 
those of the top-context.

@Ivan Ruchkin:
So the best way would probably be this: in kdevplatform/interfaces: Implement 
and install a new interface that allows removing+adding problems for an url, 
using a similar interface to KDevelop::TopDUContext::addProblem.

In kdevplatform/plugins/problemreporter: Implement that interface, and use 
those additional problems in addition to those from the top-context.

If you want to see how to define and implement an interface, you could take a 
look at IQuickOpen in kdevplatform/language/interfaces together with 
kdevplatform/plugins/quickopen as an example.

Greetings, David





More information about the KDevelop-devel mailing list