toggle line numbers & inline errors (View)

Discussion about CodeLite development process and patches
petah
CodeLite Expert
Posts: 231
Joined: Sat Nov 24, 2012 8:04 pm
Genuine User: Yes
IDE Question: c++
Location: Los Angeles
Contact:

toggle line numbers & inline errors (View)

Post by petah »

Hi Eran,

I'd like to add keyboads accelerators for 'toggle line numbers' and 'toggle inline errors', can I just add them to the XRC files or are they automatically generated from wxCrafter and would be zapped?

I love the inline error reporting btw but once I start fixing the error it's weird the cursor jumps around the line, plus when I recompile and the inline error disappears I always wonder if I accidentally deleted a line :)

Wrt line numbers, I generally have them off but when fixing some external files (Lua, javascript) I have to turn them on temporarily.

thx!

-- p
main: Debian Jessie x64 + custom wxTrunk
solewalker
CodeLite Veteran
Posts: 75
Joined: Thu Mar 14, 2013 11:24 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: toggle line numbers & inline errors (View)

Post by solewalker »

+1 for toggle line numbers, its not needed always though. but whats 'inline errors', normally I have to see in the output pane what the error is, but it would be cool if we could see error or warnings by just hovering cursor over red/yellow arrow or a text annotation pop up, something like that. I know its not easy just saying :)
petah
CodeLite Expert
Posts: 231
Joined: Sat Nov 24, 2012 8:04 pm
Genuine User: Yes
IDE Question: c++
Location: Los Angeles
Contact:

Re: toggle line numbers & inline errors (View)

Post by petah »

solewalker wrote:whats 'inline errors', normally I have to see in the output pane what the error is, but it would be cool if we could see error or warnings by just hovering cursor over red/yellow arrow or a text annotation pop up, something like that. I know its not easy just saying :)
It's not a hover (which would be annoying since it'd occlude source) but inlined, non-editable text below the error with a light-red background; it's really cool. The cursor automatically skips around it when moving around, it's hard to explain with words, you have to try it out. Maybe you don't see it because it's only in CL trunk, which is all I use.

Hope I didn't give away a secret ;)

cheers,

-- p
main: Debian Jessie x64 + custom wxTrunk
solewalker
CodeLite Veteran
Posts: 75
Joined: Thu Mar 14, 2013 11:24 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: toggle line numbers & inline errors (View)

Post by solewalker »

oh, wow, I built 5.3 now and amazing :) how did I live without this.

Image

Edit: Then +2 for "toggle inline errors/warnings reporting", one thing, e.g. if I miss a ';' on line 11, then the arrow is shown in line 12, inline error is after 12, so if I want to toggle (if available) inline error, in which line I would put my caret and press key short-cut, of course it must be either line 11 or 12.
solewalker
CodeLite Veteran
Posts: 75
Joined: Thu Mar 14, 2013 11:24 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: toggle line numbers & inline errors (View)

Post by solewalker »

I know this feature is experimental, but I made a weird discovery, if there is both error and warning in a single line, it shows warnings which hides the error message, this code produces both error and a warning at line 10,

Code: Select all

int main(int argc, char **argv)
{
   int i;
   i printf("hello world\n");
   
	return 0;
}
Build log :

Code: Select all

E:/workspace/test/main.cpp:10:6: error: expected ';' before 'printf'
E:/workspace/test/main.cpp:10:29: warning: statement has no effect [-Wunused-value]
It shows like this, does not show the error message,
Image

It would be perfect, if the error message is given higher priority when there is both an error and warning in a same line. Also I would like to disable/enable warnings (i can disable both using "Errors/warnings markers:" but not individually) to show up as inline messages. As it disturbs me and not as important as errors. Usually I pay attention to warnings less often may be once in a day, its like optimization, its always done later in the project. I hope I am clear :)
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: toggle line numbers & inline errors (View)

Post by eranif »

solewalker wrote:It would be perfect, if the error message is given higher priority when there is both an error and warning in a same line
I saw this and my plan is the concatenate the message into a single message based on the line number

I would also like to remove the file part from the error message based on the regex used so the message will be:
"statement has no effect"

Eran
Make sure you have read the HOW TO POST thread
solewalker
CodeLite Veteran
Posts: 75
Joined: Thu Mar 14, 2013 11:24 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: toggle line numbers & inline errors (View)

Post by solewalker »

I saw this and my plan is the concatenate the message into a single message based on the line number

I would also like to remove the file part from the error message based on the regex used so the message will be:
"statement has no effect"
That would be great ! I would still want to disable/enable warnings, if its not that much of a work ;)
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: toggle line numbers & inline errors (View)

Post by eranif »

Here is the fix I applied to trunk:
1.png
Eran
You do not have the required permissions to view the files attached to this post.
Make sure you have read the HOW TO POST thread
solewalker
CodeLite Veteran
Posts: 75
Joined: Thu Mar 14, 2013 11:24 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: toggle line numbers & inline errors (View)

Post by solewalker »

That's so fast. How do I access the trunk, I tried "git pull origin" but it says already up-to-date.
Another thing, imho "error:' and "warning:" part should have been there, because its confusing, which one is error and which one is warning. But thanks for the quick update :)
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: toggle line numbers & inline errors (View)

Post by eranif »

solewalker wrote:That's so fast. How do I access the trunk, I tried "git pull origin" but it says already up-to-date.
Another thing, imho "error:' and "warning:" part should have been there, because its confusing, which one is error and which one is warning. But thanks for the quick update :)
My goal is to have different color for each message type (its basically line oriented).
Keeping the error/warning is not possible because the regex allows me to remove the entire file:line: prefix but not part of it...

Eran
Make sure you have read the HOW TO POST thread
Post Reply