TOPIC: new LibraryView features
#1265
new LibraryView features 1 Year, 8 Months ago
One feature I like in Eclipse is how it highlights other occurrences of the word under the cursor. It is really helpful to see where a variable is used. So I implemented it in Suneido:



(The ability to draw a box around text is part of the Scintilla editing component we use.)
 
 
Last Edit: 2008/12/27 21:25 By andrew.
 
andrew
 
#1266
Re:new LibraryView feature 1 Year, 8 Months ago
Here's another recent change. I like how LibraryView marks errors but unused variables are not really "errors". Just like the boy who cried wolf too often, you can miss a real error like an uninitialized variable, among all the warnings.

So I changed it to differentiate errors and warnings. Now I can pay more attention to the real errors.

 
 
Last Edit: 2008/12/21 18:01 By andrew.
 
andrew
 
#1267
Re:new LibraryView features 1 Year, 8 Months ago
Here is another small improvement. When the cursor is after a bracket the corresponding bracket is highlighted by making it bold. This was sometimes hard to see so I changed it to make the background green.

 
 
Last Edit: 2008/12/21 20:52 By andrew.
 
andrew
 
#1269
Re:new LibraryView features 1 Year, 8 Months ago
I also made the foreground color white so that when you are selecting a range of text you get can see if your selection is properly bracketed. (Thanks to Jennie for pointing out this feature.)



I also turned on the Scintilla feature that highlights the current line. Some of my programmers do not like this but I find it helps locate where the cursor is.

(This is a separate post because I can't figure out how to get two images on one post!)
 
 
Last Edit: 2008/12/21 20:52 By andrew.
 
andrew
 
#1270
Re:new LibraryView features 1 Year, 8 Months ago
PS. I should thank Santiago (sanotto) for adding auto-completion lists and reminding me that there is still lots we can do to improve the IDE.
 
 
andrew
 
#1272
Re:new LibraryView features 1 Year, 8 Months ago
Here is another one I have been thinking about for a while. I got the idea from Firefox. When you do Find (e.g. Ctrl+F) the find stuff is inserted at the bottom of the screen, rather than popping up in a dialog. (It is not there all the time.) I like this a lot better. The dialog covers part of the screen and it is "modal" - you can not work in the text while the dialog is open. (Some software makes the dialog non-modal but I still find it annoying to have it floating around.) You can either leave the find bar "open" or you can press Esc or click the X to close it. It was actually quite easy to do - it only took me an hour or so after supper last night.

I have not done it yet, but I plan to handle replace similarly.

I would also like to make the find "incremental" (like Firefox) so it starts searching as soon as you start typing your search.

Another feature I would like in Find is to be able to mark all the occurrences.

Note: I shrunk the window for the screenshot, normally the find field would be bigger.

 
 
Last Edit: 2008/12/22 18:16 By andrew.
 
andrew
 
#1275
Re:new LibraryView features 1 Year, 8 Months ago
those are cool changes... where we can download them? Or will be included in the next suneido version?
Merry christmas to everybody and happy new year.
 
 
#1276
Re:new LibraryView features 1 Year, 8 Months ago
These features will be in the next version, but if anyone wants to look at them, you can download a development snapshot:

http://suneido.com/uploads/suneido081224.zip

It contains the latest suneido.exe, stdlib.su, and scilexer.dll

Unzip these to a new directory and then run:

suneido -load stdlib

This will create a new, empty database.

Some of the code is quite new so there are probably bugs. Let me know if you find any.

Note: I didn't include the help in this snapshot.

Enjoy!
 
 
andrew
 
#1277
Re:new LibraryView features 1 Year, 7 Months ago
Hi... I found an odd behaviour in the new versión, some parts appears with a pink background starting in the middle of the word, see attached picture.
Is it a bug? or a feature?

 
 
#1278
Re:new LibraryView features 1 Year, 7 Months ago
It depends who you ask :-)

I think it is a feature, my programmers do not agree!

It is highlighting everything past column 80 as a reminder to keep lines a reasonable length.

This is probably a feature that should be configurable. Although, then my programmers will turn it off :-(

The reason long lines are "bad" is not because of window or monitor sizes - almost everyone has big monitors now. The reason is readability - long lines are harder to read. There is some debate over this and research gives mixed results, but most of the studies are for prose, not code.

I think the maximum benefits for code are when lines are kept short intelligently, by breaking the lines at meaningful places, keeping indentation to a reasonable level, and factoring out small methods. If you just break lines at 80 characters, ignoring "natural" breaks, then you will not get as much benefit. (I find the automatic wrapping in Eclipse quite annoying because it does not break intelligently, and even worse, overwrites your own more intelligent wrapping!)

Some of the other features should probably be configurable as well - either because people may not like them, or because some may be slow on older computers. (They seem fast on a newer system.)
 
 
Last Edit: 2008/12/27 00:10 By andrew.
 
andrew
 
#1280
Re:new LibraryView features 1 Year, 7 Months ago
The changes also included better syntax highlighting in BookEdit:



Invalid tags are in red and unquoted values are pink.
 
 
Last Edit: 2008/12/27 00:45 By andrew.
 
andrew
 
#1284
Re:new LibraryView features 1 Year, 7 Months ago
I added "mark all occurrences" to the new find bar.

With two more buttons (mark and clear) I was running out of space. So I decided to change them to ImageButtons. Then I wasted too much time, first looking for suitable images, and then when I did not find anything I liked, creating my own. I kept them simple, since I am not a graphics designer, but I think they look ok. They change to green when you mouse over.

There are now 4 kinds of markers - red = error, grey = warning, blue = bookmark, green = find mark

They all show up in the overview bar on the right. (Which you can click on to go to.)

F2 (next marker) steps through all the markers.

In case you want to mark occurrences of more than one find, you can hold down the Ctrl or Shift key when you click "mark all". (Otherwise it clears any old find marks before setting new ones.)

I will post another snapshot soon so you can try it out.

 
 
Last Edit: 2009/01/05 18:14 By andrew.
 
andrew
 
#1296
Re:new LibraryView features 1 Year, 7 Months ago
Hi Andrew:

Testing the new version I've noted that trying to search in the help book raises an exception stating SearchResultBox not found.
Indeed, such control doesn't exist in stdlib.
 
 
#1298
Re:new LibraryView features 1 Year, 7 Months ago
Do you mean BookSearchResultsControl ?

Sorry, my mistake.

Importing the attached file should fix it.

Thanks for reporting the problem.

File Attachment:
File Name: booksearchresults.zip
File Size: 514
 
 
Last Edit: 2009/01/08 23:07 By andrew.
 
andrew