I would like to create a VS extension in which I need to know the line number the menu was called on. I found a VisualBasic implementation with a macro that seems to do this, but I don't know how to start this in C#. The goal would be to know the exact number of the line the ContextMenu was called on to put a placeholder icon on it just like a break point. Useful links are appreciated since I couldn't find much on this topic.
Visual Studio Extension: How to get the line on which Context Menu was called?
1.7k Views Asked by oneManArmin At
1
There are 1 best solutions below
Related Questions in C#
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in EDITOR
- C editor with text formatting and context awareness
- how to create a pdf editor for grails
- Debug Java in Brackets editor or Visual Studio Code
- How override Print in Kendo UI Editor?
- Set language for syntax highlighting in Visual Studio Code
- Netlogo editor for Eclipse
- WordPress Text Editor Buttons not showing
- Remove duplicates from text file based on second text file
- eclipse pde expandable section of code in editor
- How can I access a Button Press from a different Form? C#
- How to turn off auto code folding in PHPStorm?
- How to drag and open file in editor?
- How do I edit a file after I shell to a Docker container?
- How can I 'change in number' or 'change in digits' in Vim
- Is there a shortcut key to comment multiple lines in matlab editor
Related Questions in VISUAL-STUDIO-2017
- No templates in Visual Studio 2017
- Xamarin.iOS on the Mac Server is not compatible
- NuGet Console in visual studio 2017 RC won't Add-Migration or Update-Database?
- VS2017 RC Web deploy - ERROR_CERTIFICATE_VALIDATION_FAILED
- How to use an ASP.NET Core environment variable in testing with Visual Studio
- How to create F# .Net Core ConsoleApp in Visual Studio 2017 RC
- Can I suppress a specific C6031 warning? CString::LoadString
- InterlockedExchange issue with C28112/3
- AppSettings.*.json files not copied on Publish in ASP.NET CORE 1.1
- Does Visual Studio 2017 Community create a Services folder for Dependency Injection with Core 1.0?
- dotnet exec needs a managed .dll or .exe extension while adding Entity Framework Core (1.1.0) Migrations
- project can't be set as Class Library in visual studio
- How to connect with SQL Server database using .NET Core Class Library (.NET Standard)?
- Using Dependency Injection with .NET Core Class Library (.NET Standard)
- Localisation that can be read by a portable F# project (Profile 259)
Related Questions in VISUAL-STUDIO-EXTENSIONS
- How to build Visual studio extension which install on top of an already installed extension
- Uninstall a visual studio extension using inno setup
- In a Visual Studio Extension, how to detect when the debugger Continues
- How get the current running Visual Studio installation path from VSPackage
- In a Visual Studio Extension, get the line range of the function in which the debugger is stopped
- The new project type and template does not show up after installing VSIX package
- Visual studio 2015 making colour code
- How to get IEditorOperations from IVsTextView?
- How to use IVsPackageSourceProvider provider
- How to use newer Microsoft.CodeAnalysis reference in Roslyn analyzer targeting VS2015
- Using built-in icons in Visual Studio extension
- Visual Studio 2015 Peek Definition Icon not shown
- How to determine whether or not EnvDTE.Project object represents a C/C++ project?
- Adding Entity Framework configuration in Visual Studio extension
- Visual Studio 2015 Package Extension,referenced dll not copied
Related Questions in LINE-NUMBERS
- How to get the current function's name or linenumbers in V8
- How to avoid StackOverflowError when adding a column to the Cplex using Java
- c# richtextbox line numbers column
- Vim -- Enumerate Lines in Base26
- How to get runtime error line number in CodeDom?
- Visual Studio Extension: How to get the line on which Context Menu was called?
- How do debuggers get line numbers of commands?
- Relative line numbers in Visual Studio
- Emacs - Specific Linum Customization
- Unix: How to sort a dat file and keep original line numbers
- Read File in chunks and then read line by line using LineNumberReader. Repeat this activity
- JSR-45 (line numbers in JSP) support in Jetty
- Line numbers in jtextpane in Netbeans
- How to get information about code lines in Qt?
- Is it possible to use addr2line with application compiled with release optimization arguments?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You could create a VSIX project and add a Command item in your project. Then add following code in MenuItemCallback() method to get the code line number.