Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » Patch: Highlight Errors
Patch: Highlight Errors [message #9540] Wed, 16 May 2007 01:28 Go to next message
Zardos is currently offline  Zardos
Messages: 62
Registered: April 2007
Member
Hello!

I have discovered Ultimate++ some weeks ago. And I LOVE IT!!!

As an exercise to get used to Ultimate++ I made a small patch which adds the functionality to:

Highlight all errors in the editor(s) after an "compile", "build" and "rebuild".

After applying the path, compiling and running TheIDE:
=> Open The Menu: Settings->Environment
=> Go to the tab: Editor
=> Check if "Highlight Errors" is enabled
=> Go to the tab: "Sytax highlightning"
=> Give the entry "Compile Error" your prefered color (Unfortunately i have not found the place in the source where the default colors are defined, ... and the default color is now "transparent" Confused )

=> Open a source file
=> Create an error (type some random stuff)
=> Compile or Build the project
=> See the result

I don't know if there exists interest in further development of the feature and I also don't know if my code matches the expected quality. Especially because I'm just starting with Ultimate++

My next step would be to add a "background compile".
What I mean is: If you are editing a file and make a break for 3 seconds. I would start an compile => all errors gets highlighted.
=> A background syntax check. Of couse it can be enabled/disabled via the settings.

- Ralf
Re: Patch: Highlight Errors [message #9542 is a reply to message #9540] Wed, 16 May 2007 08:52 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Zardos wrote on Tue, 15 May 2007 19:28

Hello!
I have discovered Ultimate++ some weeks ago. And I LOVE IT!!!


We love it too Smile
Quote:


As an exercise to get used to Ultimate++ I made a small patch which adds the functionality to:

Highlight all errors in the editor(s) after an "compile", "build" and "rebuild".



That's great! Mirek, I can check and apply this patch if you don't mind.

Yesterday I also extented highlighing capabilites. I added highlighing of text in UPPER, sql functions, sql boolean expressions and ultimate macros. So now expressions like
SQL * Select(NAME, AGE).From(PEOPLE).Where(ID=1) looks much better IMO.

Quote:


(Unfortunately i have not found the place in the source where the default colors are defined, ... and the default color is now "transparent" Confused )


I'm searching this one too... Wink

[Updated on: Wed, 16 May 2007 08:53]

Report message to a moderator

Re: Patch: Highlight Errors [message #9544 is a reply to message #9542] Wed, 16 May 2007 09:12 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Quote:


(Unfortunately i have not found the place in the source where the default colors are defined, ... and the default color is now "transparent" )


Ok. It's here in void CodeEditor::DefaultHlStyles()
Re: Patch: Highlight Errors [message #9545 is a reply to message #9542] Wed, 16 May 2007 10:33 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

I tried your patch. Seems to work fine. But I miss one thing - ability to clear that highlighting before next compilation Smile
Re: Patch: Highlight Errors [message #9546 is a reply to message #9545] Wed, 16 May 2007 10:50 Go to previous messageGo to next message
Zardos is currently offline  Zardos
Messages: 62
Registered: April 2007
Member
unodgs wrote on Wed, 16 May 2007 10:33

I tried your patch. Seems to work fine. But I miss one thing - ability to clear that highlighting before next compilation Smile


Well, I'm not so satisfied anymore. Have to learn a little bit more about the structure of TheIDE...

I will give it a second try. This time I will use EditBar.cpp (where the breakpoints are located) and mark the backround in red instead of highlightning the whole line.

This will probably solve the problem in the current solution: If you insert a line the highlighted error line does not move down...
=> Errors should more behave like breakpoints.

I'm not satisfied with other parts to:
* Warnings get highlighted, too (not nice, at least it should be in a different color)
...

So, better forget this path... Wink
Re: Patch: Highlight Errors [message #9547 is a reply to message #9546] Wed, 16 May 2007 11:15 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Ok, I'll wait for better solution. Not highlighing the whole line as well as different colors for errors and warnings is a good idea. Keep working Wink
Re: Patch: Highlight Errors [message #9554 is a reply to message #9547] Wed, 16 May 2007 18:55 Go to previous messageGo to next message
Zardos is currently offline  Zardos
Messages: 62
Registered: April 2007
Member
unodgs wrote on Wed, 16 May 2007 11:15

Ok, I'll wait for better solution. Not highlighing the whole line as well as different colors for errors and warnings is a good idea. Keep working Wink


Oops, this took longer than I expected.

Here comes the second try:

Errors and Warnings are now marked with different colors (red / yellow) in the small column where the breakpoint icon is placed.

Build and Rebuild autmatically clearls all existing error markers in all files
Compile File automatically clears all existing error markers in the current file.
Editing a line with an error marker will remove the error marker.
Error markers are moving with newly inserted lines like breakpoints.

In addition to the error/warning marking feature above:
I mark all lines edited since the last start of TheIDE in blue. I really love this featue and I'm very used to it from Source Insight. Very useful to find the places you have edited.

Makes use of existing data structures (breakpoints).

Hope you like it too!
Re: Patch: Highlight Errors [message #9555 is a reply to message #9540] Wed, 16 May 2007 20:01 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
fantastic (and I didn't even try it out, just read about it).
Re: Patch: Highlight Errors [message #9556 is a reply to message #9554] Wed, 16 May 2007 21:19 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

This patch is great! I'm only wonder if that blue markers should not be cleared after save. Or better after some keys combination pressing. But what I think would be really superb is that after each save the old blue marker become lighter and the new change gets initial blue color. What do you think?
Anyway I have added this patch. Let people try it and make suggestion.

BTW: I'm in process of reimplementing quicktabs. Expect something really great Wink (at least I think so Smile )

[Updated on: Wed, 16 May 2007 21:20]

Report message to a moderator

Re: Patch: Highlight Errors [message #9558 is a reply to message #9556] Wed, 16 May 2007 22:43 Go to previous messageGo to next message
Zardos is currently offline  Zardos
Messages: 62
Registered: April 2007
Member
unodgs wrote on Wed, 16 May 2007 21:19

This patch is great! I'm only wonder if that blue markers should not be cleared after save. Or better after some keys combination pressing. But what I think would be really superb is that after each save the old blue marker become lighter and the new change gets initial blue color. What do you think?
Anyway I have added this patch. Let people try it and make suggestion.

BTW: I'm in process of reimplementing quicktabs. Expect something really great Wink (at least I think so Smile )


Nice to hear you like it.
I like your suggestion to dim out the edited marker. Sounds not to complicated to implement. But I would prefer to have them allways slightly visible. At least not to remove them after save... But if necessary I could add a hot key and/or toolbar icon.

What I'm still missing are tooltips. I would be great to have a tooltip fo each line with an error/warning with the error message.
If you like the idea I can try it.
This would be a good starting point for more tooltips in the editor like for a variable the type. Or in the debugger the current value of a variable.


I'm interested in you quicktabs! This was another point which I consider improveable beside some other small things.

Well, and what I really would like to have are some basic refractoring functions like renaming a class, function, etc.
But I guess I have to collect some more experion points with Ultimate++ before thinking about implementing it, but on the other hand the internal parser and the functionality from assist seems to be allready enough to try to implement it.

So, after the new version becomes available in subversion I will continue with edit/error markers fo a short time.

- Ralf
Re: Patch: Highlight Errors [message #9559 is a reply to message #9558] Wed, 16 May 2007 23:17 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Quote:


But I would prefer to have them allways slightly visible.


yes, you're right - that's what I thought but not wrote.
Quote:


But if necessary I could add a hot key and/or toolbar icon.


That and option in configuration dialog to disable this future completely. Probably there is someone who doesn't like it Wink
Quote:


I'm interested in you quicktabs! This was another point which I consider improveable beside some other small things.


Just wait a few days. Concentrate on those small things Smile Later we can improve my tabs if somthing missing/not working as expected.
Quote:


Well, and what I really would like to have are some basic refractoring functions like renaming a class, function, etc.
But I guess I have to collect some more experion points with Ultimate++ before thinking about implementing it, but on the other hand the internal parser and the functionality from assist seems to be allready enough to try to implement it.


That would be fantastic!
I thought also about functions like add class (from user templates) to the project, add dialog to the project (this should add dialog.h dialog.cpp and dialog.lay files) etc.

If Mirek would implement block operations and improve c++ parser theide would be the best in the market Wink
Re: Patch: Highlight Errors [message #9579 is a reply to message #9559] Thu, 17 May 2007 22:13 Go to previous messageGo to next message
Zardos is currently offline  Zardos
Messages: 62
Registered: April 2007
Member
The aging of the edit marker works, now. Plus some small bugfix, some files were marked edited, even if there was no edit.

unodgs wrote on Wed, 16 May 2007 23:17


Quote:


But if necessary I could add a hot key and/or toolbar icon.


That and option in configuration dialog to disable this future completely. Probably there is someone who doesn't like it Wink



I was starting to add the other stuff, but then I got unsure.

Is one hot key to clear all edit markers in all files enough, or do you think it is necesary to have another hot key to clear only the markers in the current file?

Do you think we should have a toolbar icon for it?

In the settings:
Is it enough to have the option to disable the edit markers. Or do you think the marking of the errors and warnings should also be configureable?

I'm asking because I think: The edit markers are not such an important thing to polute the toolbar and settings with it...
But thats just my personal opinion.

So I would suggest:
One hot key to clear all markers in all files. No toolbar icon.
One option in the settings to disable the edit /errors / warning markers together.

But I'm open for other opinions!

- Ralf
Re: Patch: Highlight Errors [message #9580 is a reply to message #9579] Thu, 17 May 2007 22:42 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Quote:

The aging of the edit marker works, now. Plus some small bugfix, some files were marked edited, even if there was no edit

I also noticed a bug when one undo changes. Markers should be cleared then.
Quote:

So I would suggest:
One hot key to clear all markers in all files. No toolbar icon.
One option in the settings to disable the edit /errors / warning markers together.

I agree + hotkey to clear markers in one file.
Re: Patch: Highlight Errors [message #9581 is a reply to message #9580] Thu, 17 May 2007 23:22 Go to previous messageGo to next message
Zardos is currently offline  Zardos
Messages: 62
Registered: April 2007
Member
unodgs wrote on Thu, 17 May 2007 22:42


I also noticed a bug when one undo changes. Markers should be cleared then.


I absolutely agree thats not nice. Unfortunately this is probably not easy to fix.
This would require a deeper change to the internal structures.

But there might exist a simpler solution:

If I would store the original line for each edit marker I could change the edit markers to "changed lines markers".

Which means if you change a line and later change it back to the original line, even by typing -> the marker would disapear completely.

May be thats even better than an edit marker?
Re: Patch: Highlight Errors [message #9590 is a reply to message #9581] Fri, 18 May 2007 13:09 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I just installed the latest Upp-mingw-dev-whatever package from SourceForge and the default highlight colour for Upp macros is set to white.

Being completely unaware of the highlighting changes this resulted in great confusion Laughing

I think this should probably be fixed.
Re: Patch: Highlight Errors [message #9591 is a reply to message #9590] Fri, 18 May 2007 14:00 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Yes this is already fixed.
Re: Patch: Highlight Errors [message #9593 is a reply to message #9581] Fri, 18 May 2007 16:08 Go to previous messageGo to next message
Zardos is currently offline  Zardos
Messages: 62
Registered: April 2007
Member
Here is the new patch for the edit markers.

* bugfix: Some files ware marked edited, even if there was no edit
* bugfix: If editor window is split: In Editor2 all lines were marked as edited
* Edit markes slowly blend out with each edit (I prefered this over aging them with each save)
* Edit / Error / Warning markers can now switched of in Settings-Editor
* Hot Keys and entry in Edit-Menu: I added a third option: Remove Markers for selection. Menu entries will disapear if Markers are turned of via Settings. I didn't know how to add a hot key without generating a menu entry... But may be its good to have it in the menu, anyway.

Undo bug is still not fixed...

I will try to change the "edit markers" to "change markers".
I think I have found a way to track the changes and mark all changed /new / deleted lines with it's own color without wasting much memory and cpu-cycles. This would solve the undo problem, too. In addition there would be the possibility to select some changed lines and revert to the original lines with a hot key. Similar to an undo for selected lines. The revert to original lines operation would be stored in the general undo history. So you can still do a complete undo of the file, even if you have performed a revert opertaion for some lines.

[Updated on: Fri, 18 May 2007 16:15]

Report message to a moderator

Re: Patch: Highlight Errors [message #9616 is a reply to message #9593] Mon, 21 May 2007 22:05 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Thanks! I merged the patch. I really like these markers Smile
Re: Patch: Highlight Errors [message #9618 is a reply to message #9616] Tue, 22 May 2007 00:36 Go to previous messageGo to next message
Zardos is currently offline  Zardos
Messages: 62
Registered: April 2007
Member
unodgs wrote on Mon, 21 May 2007 22:05

Thanks! I merged the patch. I really like these markers Smile


Thanks!
Here comes the update (patch is based on revision 58).

I gave up on tracing the changes instead of the edits...

Instead the following changes:

* UNDO removes the edit markers, now! Was a lot of work!
* Removed "Remove change markers from Selection" in menu and hot keys, because I considered it not very useful.
* Find in Files marks the line where the search term occurs in green.

- Ralf

[Updated on: Tue, 22 May 2007 01:05]

Report message to a moderator

Re: Patch: Highlight Errors [message #9633 is a reply to message #9618] Tue, 22 May 2007 23:15 Go to previous messageGo to previous message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Quote:


* Find in Files marks the line where the search term occurs in green.


this one dosn't work at least on my computer.
Previous Topic: ArrayCtrl and TreeCtrl...
Next Topic: Middle mouse button...
Goto Forum:
  


Current Time: Thu Mar 28 14:26:36 CET 2024

Total time taken to generate the page: 0.00990 seconds