Visual Studio Add-in

  • Thread starter Thread starter polym
  • Start date Start date
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");

}
 
private void x_textEditorEvents_LineChanged(TextPoint StartPoint,
TextPoint EndPoint, int Hint)
What 's that hint ?

That hint is intended to tell you what caused the event, but in practice
won´t give you enough information.
x_textEditorEvents = events.get_TextEditorEvents (Filter);
What 's that filter ?

The TextDocument where you want to receive events for, or null if you want
all text documents.


This is not the best newsgroup for add-ins questions. I'd suggest you to use

microsoft.public.vsnet.ide
microsoft.public.vstudio.extensibility

or the best one: http://groups.yahoo.com/group/vsnetaddin/


--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 
Back
Top