Bug 19688 - autoscroll to the first error/warning
Summary: autoscroll to the first error/warning
Status: RESOLVED FIXED
Alias: None
Product: kdevplatform
Classification: Developer tools
Component: outputview (show other bugs)
Version: git master
Platform: unspecified Other
: NOR wishlist
Target Milestone: ---
Assignee: Andreas Pakulat
URL:
Keywords:
: 156128 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-02-03 10:18 UTC by Gerke
Modified: 2008-07-04 09:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerke 2001-02-03 10:16:11 UTC
(*** This bug was imported into bugs.kde.org ***)

Bugreport ID : 08:3003.02.01

Originator: Gerke
E-Mail: gkokmdam@dds.nl

Subject : Build messages

Error Class: change-request
Error Location: build process
Priority: low
Bug Description ---------------------------

When a build stops with errors it would be so nice to have the message output to be autoscrolled to the first error/warning.
Verry ofter this is the only one you are intrested in and it saves a lot of time whn the computer auto-scrolles to it..

Thanks any way for maing development such a lot easier. Without KDevelop I would not know how to use autoconf etc. etc.

How to repeat the error -------------------

Build something with a missing ';' of a unknown type...

Bugfix or Workaround ----------------------

Scroll back with you M$ mouse wheel... :-( (That I don't have...)

System Information ------------------------

KDevelop version: 1.2
KDE version: 2.0.1
QT version: going allong with that
OS/Distribution: SuSE 7.0
Compiler: NA

misc :
NA
Comment 1 John Firebaugh 2002-09-15 21:09:02 UTC
IMO it is easy enough to press F4 to go to the first error. 
Comment 2 Maciej Pilichowski 2007-11-24 16:02:50 UTC
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.
Comment 3 Andreas Pakulat 2008-07-02 00:40:10 UTC
*** Bug 156128 has been marked as a duplicate of this bug. ***
Comment 4 Maciej Pilichowski 2008-07-02 14:55:35 UTC
> 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?
Comment 5 Maciej Pilichowski 2008-07-02 19:02:13 UTC
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.
Comment 6 Andreas Pakulat 2008-07-02 19:06:10 UTC
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.
Comment 7 Maciej Pilichowski 2008-07-02 20:06:58 UTC
>  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.
Comment 8 Andreas Pakulat 2008-07-02 23:05:23 UTC
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.
Comment 9 Maciej Pilichowski 2008-07-03 07:02:27 UTC
Yes, this is a wished behaviour -- thank you Andreas.

Option, I really doubt it -- user is "missing" the list of successfully compared files.
Comment 10 Andreas Pakulat 2008-07-03 09:55:18 UTC
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.
Comment 11 Maciej Pilichowski 2008-07-03 10:37:10 UTC
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?
Comment 12 Andreas Pakulat 2008-07-03 11:23:44 UTC
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
Comment 13 Andreas Pakulat 2008-07-03 11:51:32 UTC
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.
Comment 14 Maciej Pilichowski 2008-07-03 12:11:57 UTC
> 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!).


Comment 15 Andreas Pakulat 2008-07-03 13:09:07 UTC
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.
Comment 16 Andreas Pakulat 2008-07-03 23:46:44 UTC
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
Comment 17 Maciej Pilichowski 2008-07-04 09:13:20 UTC
Andreas, you are great!!! Thank you very much!