Visual Studio Add-in

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • polym

    Visual Studio Add-in

    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");

    }


  • Carlos J. Quintero [.NET MVP]

    #2
    Re: Visual Studio Add-in

    > private void x_textEditorEve nts_LineChanged (TextPoint StartPoint,[color=blue]
    > TextPoint EndPoint, int Hint)
    > What 's that hint ?[/color]

    That hint is intended to tell you what caused the event, but in practice
    won´t give you enough information.
    [color=blue]
    > x_textEditorEve nts = events.get_Text EditorEvents (Filter);
    > What 's that filter ?[/color]

    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.publi c.vsnet.ide
    microsoft.publi c.vstudio.exten sibility

    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:
    MZ-Tools has a single goal: To make your everyday programming life easier. As an add-in to several Integrated Development Environment (IDEs) from Microsoft, MZ-Tools adds new menus and toolbars to them that provide many new productivity features.





    Comment

    • polym

      #3
      Re: Visual Studio Add-in

      Thank you .


      Comment

      Working...