Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Red line in Snippet editor is misplaced

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
xMRi Posted - Nov 11 2010 : 03:18:14 AM
I have a column indicator at position 90 for my sources.

In the editor for the VAX-Snipptes I get a red line too. But it isn't located at column 90.

Also a column count would be nice in the Snippet-Editor.

PS: THX again for you absolutely fantastic product and support!
22   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Dec 03 2010 : 3:02:30 PM
I have not gone looking at the relevant code inside VA, but your code example here assumes that VA was explicitly and manually setting the red line position before this change was made.

Since the code editor used inside the VA Snippet editor dialog is a 3rd party edit control it is entirely possible that the red line position was picking up a default that the edit control its self provides. If this was the case, then failing to call "SetRedLine" in one place will produce this bug, without code duplication.

VA is complex, and has to work in a complex environment, sometimes things go wrong, but we try to keep this to a minimum
hfrmobile Posted - Dec 03 2010 : 03:05:14 AM
quote:
Originally posted by feline

Two different methods of opening the dialog, so in a sense that requires "duplication".



Definitively not!


void SetRedLine()
{
  // set position of red line here - ONLY here (e.g. read from config)
}

void MethodAForOpeningSnippedEditor()
{
  // ...
  SetRedLine();
  // ...
}

void MethodBForOpeningSnippedEditor()
{
  // ...
  SetRedLine();
  // ...
}


Code duplication:

void MethodAForOpeningSnippedEditor()
{
  // ...
  m_nRedLinePosition = 80;
  // ...
}

void MethodBForOpeningSnippedEditor()
{
  // ...
  m_nRedLinePosition = Configuration.RedLinePosition;
  // ...
}


You may have a look at http://en.wikipedia.org/wiki/Code_duplication
feline Posted - Dec 02 2010 : 2:27:34 PM
Two different methods of opening the dialog, so in a sense that requires "duplication".
hfrmobile Posted - Dec 02 2010 : 06:43:04 AM
Oooops ... I can reproduce it ;-)

What a strange bug ... looks like code duplication, doesn't it?
accord Posted - Dec 01 2010 : 5:29:52 PM
It seems we found the cause of the problem - it isn't working when using
VA Options -> Advanced -> Suggestions -> Edit VA Snippets
button to open the snippet editor. case 41396 has been reopened.
feline Posted - Nov 30 2010 : 1:43:48 PM
So far no good theories to explain this problem, but I am looking into it.
hfrmobile Posted - Nov 30 2010 : 03:52:46 AM
Sorry for the delayed reply. My configurations where it not works:

OS: Windows 7 Professional, 64bit
VS: Visual Studio 2008, Version 9.0.30729.1 SP, Professional Edition, no other Plug-Ins

OS: Windows Visa Ultimate, 32bit
VS: Visual Studio 2005, ReSharper 5.1

Running with administrator privileges of course!
accord Posted - Nov 29 2010 : 6:15:56 PM
done
feline Posted - Nov 29 2010 : 2:40:22 PM
Still no sign of the positioning problem. The line is always red for me in the VA Snippet editor, but I believe this is the expected behaviour.

Can you put in a case, and assign it to me, with your VA and IDE settings, and your VA Snippet TPL files attached please. I will then try to reproduce on the same OS and IDE.

There is obviously another factor at work here, we just have to find it.
accord Posted - Nov 28 2010 : 11:36:48 AM
feline: I tried this on 4 different configurations, 2 of them were virtual machines, where I used the very default settings of VA and VS. 3 configurations of the 4 doesn't have any other plugin installed. I tried on Windows 7 and XP, on VS2010, 2008 and 2005.

First of all, are we doing the same thing? The results are so different that it seems we are doing something differently. On the off change that it helps, the steps:
1. I open VA options dialog (VAssistX -> Visual Assist X Options...)
2. I check the "Display indicator after column" on the Advanced->Display "tab", and change the setting to 40 or 120.
3. Click apply
4. click Suggestions -> Edit VA Snippets
5. the indicator column is always at 80 both when I resize the window or scroll it
6. Restarting the IDE doesn't help

It is funny that the case was created by me so I should follow the right steps, but I don't know...

Regarding your last question: yes, I do see the correct thing in the IDE editor.
One more interesting thing: the color of this line in the snippet editor is always red, regardless of what I set for color. Are you seeing the same effect when you change the color?
xMRi Posted - Nov 27 2010 : 5:01:32 PM
Works for me in
VS-2010 on Windows 7 32bit+64bit
feline Posted - Nov 27 2010 : 3:31:00 PM
This is working for me on Win 7 64bit, VS2008.

hfrmobile and accord, do either of you have any other IDE extensions installed? Are you running the IDE with admin rights, or as a limited user?

accord can I get your IDE and VA settings for one of the systems? I can then, hopefully, try the same OS and IDE combination here.

Is the indicator margin moving correctly in the IDE editor?
accord Posted - Nov 26 2010 : 3:52:10 PM
Strange. It doesn't work for me on two different configurations. I will speak with feline, I am wondering why is it fails for me and hfrmobile and why is it works for others... Have to find the cause of the different results.
xMRi Posted - Nov 26 2010 : 06:08:21 AM
Build 1837 works for me.
hfrmobile Posted - Nov 26 2010 : 05:06:43 AM
Visual Studio 2008 Professional Edition
Windows 7 Professional, 64bit

Yes, I gone back to the VA options dialog of course!

Still on position 80 in snipped editor.

Someone else experiencing this with VA 1837?
feline Posted - Nov 25 2010 : 2:20:25 PM
for case=41396, which IDE and OS are you using? Is this a 32bit or 64bit OS?

Have you gone back into the VA options dialog since installing VA 1837?

The indicator line is showing up in the correct position for me in both VS2008 and VS2010 when I turn it on and set it to various positions.

The line in the VA Snippet editor, we use a 3rd party editor control in the VA Snippet editor, and the indicator column comes from this editor. While it is a very good editor, it does not always expose every little detail for easy tweaking.
hfrmobile Posted - Nov 25 2010 : 07:57:13 AM
@case=41396: Just downloaded and installed build 1837 but the red line in VAX snipped editor is still at position 80 even I uses 120 as my setting. Btw, is thee a special reason why the indicator in VS editor is dotted and in VAX snipped editor a solid red line (the settings to not match in line color and line style)

@case=52528: Thank you!
accord Posted - Nov 23 2010 : 04:12:03 AM
I have put in a feature request to show column counter in snippet editor to see what the developers make of it.

case=52528
support Posted - Nov 22 2010 : 3:38:40 PM
case=41396 is fixed in build 1837
hfrmobile Posted - Nov 14 2010 : 2:28:56 PM
would be nice for us too
xMRi Posted - Nov 12 2010 : 01:15:09 AM
No I am not using the snippet editor this much.
But I use lines and blocks like
//--------------

/**************\ *
\\**************/


And the alignment of the right column is the column indicator.
And because I wanted to change some things because of a changed coding policy in our company I hit this bug.

And yes it will be required after the bug is fixed. I am still not done woth redesigning.
accord Posted - Nov 11 2010 : 7:48:27 PM
Unfortunately, this is a known problem:

case=41396

But fortunately, this is already marked as fixed internally, so the fix should appear in the next (or in one of the next few) build.
This new beta isn't contain the fix yet:
http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=9837

About column count: are you using snippet editor this much? Will it be required after the bug will be fixed?
Out of interest: what would you use it for?

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000