Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Visual Studio Add-In C#

Visual Studio Add-In C#

Scheduled Pinned Locked Moved C#
csharpvisual-studiohelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nxsis
    wrote on last edited by
    #1

    Hi! Now that I have asked a few single questions about my project, and I couldn't find a proper solution let me please explain the whole problem: I would like to program an add-in that allows the user of vs to use comments similar to the word-comments. I thougt it would be a good idea to show the comment in a tool-tip but this is not as simple as it seems. The problem is, that the textselection (that should be commented) should become an persistent object in the active document providing a mouse-hover-event that shows the tooltip if fired. By now I think, that it is impossible (with justified effort) to carry out this plan. Perhaps anyone of you has an idea. As this is a scientific project for my study of information sciences it is very important to me finding a proper solution. Please help. Thanks in advance Christian

    H 1 Reply Last reply
    0
    • N Nxsis

      Hi! Now that I have asked a few single questions about my project, and I couldn't find a proper solution let me please explain the whole problem: I would like to program an add-in that allows the user of vs to use comments similar to the word-comments. I thougt it would be a good idea to show the comment in a tool-tip but this is not as simple as it seems. The problem is, that the textselection (that should be commented) should become an persistent object in the active document providing a mouse-hover-event that shows the tooltip if fired. By now I think, that it is impossible (with justified effort) to carry out this plan. Perhaps anyone of you has an idea. As this is a scientific project for my study of information sciences it is very important to me finding a proper solution. Please help. Thanks in advance Christian

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      For all the automation objects provided to you by the Visual Studio Design-Time Extensibility object model (DTE), you are limited by what it can do (it's the code that implements the functionality you're trying to use). So, persisting information is up to you. You have control - using the DTE object model - to select text, display objects (you can display tooltips; just search this site or http://google.com[^] for keywords like "DTE" and "tooltip", but it works much differently than with the .NET assemblies; they're entirely different classes implemented by entirely different platforms), and persist data. For example, you could persist the line numbers when lines are changed (there are events for when lines change) and store a diff (or just a comment similar to what you'd see in Word's tracking feature) to a persist file. When the file changes, update your persisted data accordingly. As the user scrolls you must track the position of where this data is to be displayed. It's all possible, but probably not in the way you're expecting. You're going to have to provide the implementation to persist and display these changes, but the code to catch changes, displays UI adornments, interact with the text editor, and more are provided to you through the DTE object model. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups