Summary: | autoscroll to the first error/warning | ||
---|---|---|---|
Product: | [Developer tools] kdevplatform | Reporter: | Gerke <gkokmdam> |
Component: | outputview | Assignee: | Andreas Pakulat <apaku> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | apaku, bluedzins |
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Other | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Gerke
2001-02-03 10:16:11 UTC
IMO it is easy enough to press F4 to go to the first error. Nope -- F4 does something different, so it is not a help. The wish is this -- please scroll the pane, just pane, do not jump to the error itself. Regardless this questionable "enough" easiness (it is not easy), current behaviour serves __no__ purposes. Please reopen. *** Bug 156128 has been marked as a duplicate of this bug. *** > I don't see it valuable enough to just scroll to an error. If there's an
> error you almost always want to fix it, so jumping to the place is exactly
> what you want. I don't see enough benefit for a relatively complicated
> support for just scrolling to an error item.
Because often the error pointed out by compiler is not the error place.
File A:
TUPLE2(Something,int,x,int,y);
10 files which include file A, and file B (11th on the list):
Something S;
s.x = 5;
And then you do some changes + you make typo in A;
TUPLE2(Something,int,_x,int,y);
The error will be B file.
This very _rough_ example, but I see it all the time, that it would be useful for me to see error first and then decide if I want to jump to it, or not.
Andreas, besides -- what harms is done by skipping lines with info about compiled files?
Real life example: Error: /usr/include/boost/lambda/detail/function_adaptors.hpp:45: error: no match for call to '(const refMax) (const double&, double&)' /usr/include/boost/lambda/detail/function_adaptors.hpp: In static member function 'static RET boost::lambda::function_adaptor<Func>::apply(A1&, A2&, A3&) [with RET = double, A1 = const refAdd, A2 = const double, A3 = double, Func = refAdd]': but one line above is: /home/macias/prg/mambo/source/Creator.cpp:650: instantiated from here With current behaviour I call "goto error", then close the /usr/include/boost/lambda/detail/function_adaptors.hpp (because it is useless) and then I click on the one line above and get to the correct cause of the error. And I repeat this over and over because Kdevelop does not automatically scroll to the error line, so it is slow but as well the fastest available way. With autoscroll it would be faster though. Please reopen, thank you. thats even more a wontfix. How should kdevelop know that the line above the one with the error is actually the one with the real error? There's no way to do that, I suggest you talk to gcc people to improve the error messages. Apart from that: The amount of code and architectural changes in the outputview/model simply isn't justified for such a minor thing. > How should kdevelop know that the line above the one with the error is
> actually the one with the real error?
It should not at all! With autoscroll I would see an error immediately, so I would know I should not goto this error, but the message above. This is my task. Now, I either have to scroll manually or goto an error and close the file. After doing that for half an hour I have to say that autoscroll would be very helpful.
Autoscroll is just like half of "goto to next error" (first half :-) ) so I really doubt there are any architectural changes. The code is already there.
I was misremembering the code and you do have a point :) I'll have to figure out the details, but I think what can be done is having Select Next/Previous "Item" (in kdevelop4 this is used for all kinds of outputs, not just compiler) just scroll to the item in the outputview and select it. Then a simple "enter" or click could activate it (and for make output this would mean open the mentioned file on the mentioned line). Eventually this behaviour could need an option, but I'll probably wait for the first bugreport asking for that. Yes, this is a wished behaviour -- thank you Andreas. Option, I really doubt it -- user is "missing" the list of successfully compared files. You see, I'm stubborn, but not stupid :) Anyway, I've got some time on the flight today so this is already done. With two options in fact (available in the toolbar of each output view). One for focussing the toolview when using the next/prev item shortcuts the other for automatically activating the item when using next/prev shortcuts. The default currently is as it always was. I never said or thought that way, come on! :-) Andreas, thanks for that, it is better than intended! Btw. after unsuccessful compilation the first one is called once, right? SVN commit 827529 by apaku: New Options for - focussing the outputview when using next/prev item selection - disabling activation item when using next/prev item selection BUG:19688 PS: Icons will come later M +35 -7 outputwidget.cpp M +3 -0 outputwidget.h WebSVN link: http://websvn.kde.org/?view=rev&revision=827529 you mean that kdevelop automatically scrolls to the first error? Thats quite a bit harder to achieve, because the model shouldn't know about the view, hence cannot scroll to the first error it finds. OTOH the view doesn't know what lines in the model represent errors. I'll have to think more about this before I can say wether its feasible without too much hackery to do this. As this report is actually about exactly that feature I'll re-open. > you mean that kdevelop automatically scrolls to the first error? ...after compilation. Not -- this is this wish. > because the model shouldn't know about the view, hence cannot scroll to the > first error it finds. OTOH the view doesn't know what lines in the model > represent errors. Ok, maybe I explain this in steps. I assume the current fixes gives my the ability to (just example) press F4 to "goto to next error" and F5 "scroll to first error message". So the wish is: a) I build b) ok, compilation is in progress c) everything was fine no change here. The second case. a) I build b) ok, compilation is in progress c) ah, error somewhere (*) so at point (*) Kdevelop could "press" F5 for me, i.e. scroll to the first error (in the message list view pane, not in the source code!). yeah, so I understood correctly :) As I said this needs a bit more thinking as model and view don't know about each other and that should stay this way. SVN commit 827836 by apaku: Use the new function to automatically scroll to the first error. Finally fixes: BUG:19688 M +15 -1 makejob.cpp M +1 -0 makejob.h WebSVN link: http://websvn.kde.org/?view=rev&revision=827836 Andreas, you are great!!! Thank you very much! |