P
polym
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_textEditorEvents_LineChanged(TextPoint StartPoint,
TextPoint EndPoint, int Hint)
What 's that hint ?
x_textEditorEvents = events.get_TextEditorEvents (Filter);
What 's that filter ?
My experiences :
private EnvDTE.TextEditorEvents x_textEditorEvents = null ;
EnvDTE.Events events;
events = applicationObject.Events;
x_textEditorEvents = events.get_TextEditorEvents (null);
x_textEditorEvents.LineChanged +=(new
_dispTextEditorEvents_LineChangedEventHandler(x_textEditorEvents_LineChanged));
private void x_textEditorEvents_LineChanged(TextPoint StartPoint,
TextPoint EndPoint, int Hint)
{
//vsTextChangedMultiLine 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.
//vsTextChangedSave 2 A line was committed by saving the file.
//vsTextChangedCaretMoved 4 The insertion point was moved.
//vsTextChangedReplaceAll 8 A replace all operation occurred.
//vsTextChangedNewLine 16 A new line was created.
//vsTextChangedFindStarting
//MessageBox.Show ("x_textEditorEvents_LineChanged");
}
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_textEditorEvents_LineChanged(TextPoint StartPoint,
TextPoint EndPoint, int Hint)
What 's that hint ?
x_textEditorEvents = events.get_TextEditorEvents (Filter);
What 's that filter ?
My experiences :
private EnvDTE.TextEditorEvents x_textEditorEvents = null ;
EnvDTE.Events events;
events = applicationObject.Events;
x_textEditorEvents = events.get_TextEditorEvents (null);
x_textEditorEvents.LineChanged +=(new
_dispTextEditorEvents_LineChangedEventHandler(x_textEditorEvents_LineChanged));
private void x_textEditorEvents_LineChanged(TextPoint StartPoint,
TextPoint EndPoint, int Hint)
{
//vsTextChangedMultiLine 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.
//vsTextChangedSave 2 A line was committed by saving the file.
//vsTextChangedCaretMoved 4 The insertion point was moved.
//vsTextChangedReplaceAll 8 A replace all operation occurred.
//vsTextChangedNewLine 16 A new line was created.
//vsTextChangedFindStarting
//MessageBox.Show ("x_textEditorEvents_LineChanged");
}