I am developing Visual Studio add-in by using VS2003 C#
I am trying to handle bookmarks by name , filename , line in XML
document.
Projects works fine . I can get bookmark name , filename and line
number when user add a bookmark on a file. But if end user delete a
line or add a line my bookmarks lines are going wrong.
How can i get how many lines added , deleted in _LineChanged event ?
private void x_textEditorEve nts_LineChanged (TextPoint StartPoint,
TextPoint EndPoint, int Hint)
What 's that hint ?
x_textEditorEve nts = events.get_Text EditorEvents (Filter);
What 's that filter ?
My experiences :
private EnvDTE.TextEdit orEvents x_textEditorEve nts = null ;
EnvDTE.Events events;
events = applicationObje ct.Events;
x_textEditorEve nts = events.get_Text EditorEvents (null);
x_textEditorEve nts.LineChanged +=(new
_dispTextEditor Events_LineChan gedEventHandler (x_textEditorEv ents_LineChange d));
private void x_textEditorEve nts_LineChanged (TextPoint StartPoint,
TextPoint EndPoint, int Hint)
{
//vsTextChangedMu ltiLine 1 A change to text occurred that affected
more than one line, such as pasting with newlines, deleting across
lines, replace all, and so forth.
//vsTextChangedSa ve 2 A line was committed by saving the file.
//vsTextChangedCa retMoved 4 The insertion point was moved.
//vsTextChangedRe placeAll 8 A replace all operation occurred.
//vsTextChangedNe wLine 16 A new line was created.
//vsTextChangedFi ndStarting
//MessageBox.Show ("x_textEditorE vents_LineChang ed");
}
I am trying to handle bookmarks by name , filename , line in XML
document.
Projects works fine . I can get bookmark name , filename and line
number when user add a bookmark on a file. But if end user delete a
line or add a line my bookmarks lines are going wrong.
How can i get how many lines added , deleted in _LineChanged event ?
private void x_textEditorEve nts_LineChanged (TextPoint StartPoint,
TextPoint EndPoint, int Hint)
What 's that hint ?
x_textEditorEve nts = events.get_Text EditorEvents (Filter);
What 's that filter ?
My experiences :
private EnvDTE.TextEdit orEvents x_textEditorEve nts = null ;
EnvDTE.Events events;
events = applicationObje ct.Events;
x_textEditorEve nts = events.get_Text EditorEvents (null);
x_textEditorEve nts.LineChanged +=(new
_dispTextEditor Events_LineChan gedEventHandler (x_textEditorEv ents_LineChange d));
private void x_textEditorEve nts_LineChanged (TextPoint StartPoint,
TextPoint EndPoint, int Hint)
{
//vsTextChangedMu ltiLine 1 A change to text occurred that affected
more than one line, such as pasting with newlines, deleting across
lines, replace all, and so forth.
//vsTextChangedSa ve 2 A line was committed by saving the file.
//vsTextChangedCa retMoved 4 The insertion point was moved.
//vsTextChangedRe placeAll 8 A replace all operation occurred.
//vsTextChangedNe wLine 16 A new line was created.
//vsTextChangedFi ndStarting
//MessageBox.Show ("x_textEditorE vents_LineChang ed");
}
Comment