Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 sticky highlighting of a section of code
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Old as dirt
Tomato Guru

USA
246 Posts

Posted - Apr 28 2004 :  3:03:46 PM  Show Profile
The problem I am trying to solve here is when I have a chunk of code that spans several screens, say a huge loop or an if statement etc, and I'm only wanting to change things in that section of code. It happens too often that I forget where I am and change something outside of that section.

Now therefore:
Can you let us either press a hot key or a button on the toolbar and have the section of code have a different (specifyable)background color or, since I realize that you have had troubles with colors, how about putting something like the column marker (which you know how to do already) in just the selected lines of code.

We could toggle the special marking just like we do comments now.

Ken

LarryLeonard
Tomato Guru

USA
1041 Posts

Posted - Apr 28 2004 :  3:24:23 PM  Show Profile
Maybe an "easy" way to do this would be to give us a way to bookmark every line in the currently selected range?

I just did this with a quick macro, but of course it only does one line for each press of Ctrl-P...
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Apr 28 2004 :  3:39:45 PM  Show Profile
What about "write protecting" parts of code? That way you could protect all, except for the range you want to edit (and of course, show that its protected someway).
Go to Top of Page

Old as dirt
Tomato Guru

USA
246 Posts

Posted - Apr 28 2004 :  3:47:58 PM  Show Profile
I thought about using bookmarks a while and if that is all we can get, then that is certainly better than what we have now, but I would still like to be able to bookmark (for real) lines that may be in the selected code.

Something that will be necessary to make this usefull is a button to clear all of the sticky highlighting sort of like the clear all breakpoints and I wouldn't want to clear all of my real bookmarks then.

I would rather have the background color change but you saw how long it took to get syntax coloring right. If WT learned enough in that exercize to tackle the background color, then I would want to be able to specify what it is because I wouldn't want it to be the same color as the selection highlighting.

The reason I picked the column marker is that WT already knows how to do that. Also, I haven't needed to know when I get to column 72 since I quit using punched cards.

Ken

Edited by - Old as dirt on Apr 28 2004 3:49:04 PM
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Apr 28 2004 :  3:51:33 PM  Show Profile
quote:
Originally posted by Not yet as old as dirt

Also, I haven't needed to know when I get to column 72 since I quit using punched cards.



Quite a modern guy, eh?
Go to Top of Page

LarryLeonard
Tomato Guru

USA
1041 Posts

Posted - Apr 28 2004 :  4:16:00 PM  Show Profile
quote:
Originally posted by Not yet as old as dirt

I thought about using bookmarks a while and if that is all we can get, then that is certainly better than what we have now, but I would still like to be able to bookmark (for real) lines that may be in the selected code.
What I do in that situation is use the breakpoint (F9) as an alternate type of bookmark.

quote:
Something that will be necessary to make this useful is a button to clear all of the sticky highlighting sort of like the clear all breakpoints and I wouldn't want to clear all of my real bookmarks then.
Ah, well, there is that... I know, you could cut your section of code to the clipboard, and then paste it into a new window, make your changes, and then paste it back! Okay, maybe not... Wait, here's an idea: simply cordon off you section of code with Microsoft's Wizard code markers: that will turn your code yellow (or gray, or whatever color you set). The great part about this idea is that it doesn't matter that the comment markers are, as long as they start with //{{AFX_ and //}}AFX_:

	//{{AFX_LARRY
	if (bWeHadAnyHam) {
		
		do  {
			HaveHamAndEggs();
		}
		while (bHaveAnyEggs);
	}
	//}}AFX_LEONARD
quote:
I would rather have the background color change but you saw how long it took to get syntax coloring right. If WT learned enough in that exercise to tackle the background color, then I would want to be able to specify what it is because I wouldn't want it to be the same color as the selection highlighting.
My instinct is that I wouldn't want to hang on a rope waiting for them to implement background color changing: from their comments, it seems like one of the more impossible facets of the IDE. But you never know.

quote:
The reason I picked the column marker is that WT already knows how to do that.
You must not have been here for all the fun with the column marker; it had a lot bugs early on. At one point, one of the WT guys said he wished they'd never implemented the thing, as it just opened a whole can of Microsoft worms... I suppose you could say that about everything, though.

quote:
Also, I haven't needed to know when I get to column 72 since I quit using punched cards.
026 or 029? Actually, I use it at column 80 so that I know the file can be printed out in portrait orientation for code reviews.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Apr 29 2004 :  08:10:24 AM  Show Profile
now i see this idea, it sounds really useful

i have just tried the wizard code markers, and of course this wipes out the syntax highlighting in the relevant area...

*flash of inspiration*

#if 0   //{{AFX_COMMENTED_OUT
    // now in a different colour
#endif  //}}AFX_COMMENTED_OUT


this thread has just solved one ongoing irritation of mine, many thanks Larry

the problem of using this for the block i am editing is that i have come to rely on the syntax highlighting to give me clues about the code i am writing.

would it be possible for WT to add a custom marker (perhaps a tomato ) to the left hand column where the break points and bookmarks go?

this isn't part of the main editor window, so perhaps it is easier to draw into...

does anyone know if this is true, or is this just a wild flight of fancy on my part?

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000