Page 1 of 2

Error/Warning tab feature

Posted: Wed Nov 19, 2008 12:45 am
by cenix
I have attempted to create an Errors/Warnings tab to allow faster navigation to errors/warnings and having one overview, by only showing errors or warnings if the user choose so (it is actually the build tab without all the compiler output - only errors and warnings).

Attached is the patch file (rename to .patch).
I'm not sure if the patch will succeed (since it also has to create new files and its the first time I created a patch file :? )

Of course, there is still some work to do. Ideas include:
* Refactoring some code so there are no duplicated between BuildTab and ErrorsTab code (for example GetCompilerByLine and DoOpenFile).
* When selecting (via mouse of F4 (Next Build Error)) an error or warning, also highlight this in the Build Tab, so when opening the Build Tab, you see the compiler output of that specific error/warning.


For future reference, is it allowed to do a check in (commit) directly on the tree, or do new features/changes always be delivered as patched?
Who is responsible for reviewing the changes? Do you do that all Eran?

Re: Error/Warning tab feature

Posted: Wed Nov 19, 2008 12:53 am
by eranif
cenix wrote:For future reference, is it allowed to do a check in (commit) directly on the tree
Currently, only I have commit access to the SVN repository
cenix wrote:or do new features/changes always be delivered as patched?
For now :D
cenix wrote:Who is responsible for reviewing the changes? Do you do that all Eran?
Yes, I am the one who review the patches and approves/reject them and since I am the only one who commits to CodeLite, then I will be the one who will eventually apply them :D

Eran

Re: Error/Warning tab feature

Posted: Wed Nov 19, 2008 9:50 am
by eranif
The patch seems to be broken, also the png file is missing

Eran

Re: Error/Warning tab feature

Posted: Wed Nov 19, 2008 11:06 am
by cenix
Hmm.. I have manually edited the patch since it included some changes that I made, which are not ready to be delivered (fixes some warnings in cpp_lexer I think).
I haven't added a png file, I only referred to one (not sure which at the moment since I'm at work, so I can't check, but its a yellow triangle with an exclamation point in it), so don't know why it is missing,
but maybe I have some time tonight to check it out.

Re: Error/Warning tab feature

Posted: Wed Nov 19, 2008 11:28 am
by eranif
cenix wrote:(fixes some warnings in cpp_lexer I think)
Dont bother fixing those warnings, since this file is auto-generated by the yacc file so your changes probably get lost...

Eran

Re: Error/Warning tab feature

Posted: Wed Nov 19, 2008 11:38 pm
by cenix
Ok, take 2.

The png referred to is the project_conflict icon (also used in the subversion plugin) and is used as wxXmlResource::Get()->LoadBitmap(wxT("project_conflict")), so I do not understand why it is a problem. Further, maybe you want to use another icon for this, but I guess its ok.

Further, I have created the diff with LiteEditor as root, so when applying this patch, make sure you have LiteEditor selected.

I hope it now will work.

Re: Error/Warning tab feature

Posted: Thu Nov 20, 2008 12:08 am
by eranif
Hi,

I applied this patch, some comments:
1) try to build the code on other OSs (like Windows) if you have access, since the code you provided does not compile (apprantly ERROR & WARNING are already defined by Windows include files)
2) try to update the repository since it was not generated using latest SVN (You probably did updated, but just in case you did not)

besides that, looking good :) (I will probably going to do some face lift to the UI...)

Eran

Re: Error/Warning tab feature

Posted: Thu Nov 20, 2008 12:24 am
by eranif
Patch applied:

- I changed the toggle buttons to be 'check box' instead - since I am pretty sure it will not look good on Mac ....

Committed revision 2442.
Eran

Re: Error/Warning tab feature

Posted: Thu Nov 20, 2008 3:55 am
by sdolim
This code in ErrorTab seems like it does nothing useful:

Code: Select all

//set this line with the previous project
std::map<int, LineInfo>::iterator iter = m_lineInfo.find(lineno);
if (iter != m_lineInfo.end()) {
	m_lineInfo[lineno] = iter->second;
}
Sort of like saying "x = x".

Should one of those "lineno" be "lineno-1" or "lineno+1"?

Re: Error/Warning tab feature

Posted: Thu Nov 20, 2008 2:33 pm
by cenix
Correct, but if you scroll up a couple of lines (to line 213), you see that that is done.
This, because I use lineno a couple of times, so calculating a new lineno is only done once.