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 answers
Related Questions in C#
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in EDITOR
- Deleting camel humps in Intellij?
- Enhancing Audio Trimmer Widget in Flutter App
- Editor in SQLPLUS gives error when changing default editor
- WPF Image in User Control not showing in editor when I use the User Control
- Open files in new tabs in Kate
- How do I turn off syntax highlighting in micro text editor?
- Change font weight in visual studio code
- Seeking Feedback: Custom Toolbar Implementation for EditorJS
- Excessive spacing on a Weebly section
- How do I visually fake 4-space tabs in a 2-space project in VSCode?
- NodeJS FFMPEG : Issues combining the crops and the trims
- In Slickgrid,Aggregate Function result is not modifying/updating as per the slickgrid data inline edit
- VSCode editor mouse cursor inverts color when moving across panes
- ERROR: failed to solve: error from sender: context canceled
- Can three.js editor export a JS script?
Related Questions in VISUAL-STUDIO-2017
- file download method in visual studio 2017
- Icons for Visual Studio 2017 Solution Explorer file types
- How can I remove a lib file from "Commandline" in VS2017?
- How can I get cascading reference dlls in one project to build into my main website project?
- Qt Addin: Attempt to add newer Qt version "There's no Qt version assigned to project"
- Alternative for nextafter when backporting to visual studio 2013
- Switch. case var b when b.Contains("SomeString"): Won't compile
- simple openmp c++ problem when using for loop
- How to forbidden trotoiseMerge in Vs2017 use the built-in merge tool
- How to change Visual Studio 2017 default Window layout in C++ sytle?
- Run SSIS package through Server its working fine but that package I am running on my local system its not working
- Unable to launch the IIS Express Web server in vs 2017
- Error in displaying the Extension in SSMS created in Visual Studio (VSIX project) when right clicking any tables
- Visual Studio 2017 (or higher) configure IDE to use MetadataAsSource folder under project build folder and not in AppData\Local\Temp
- I can't understand C2665 error (VS 2017 / 15.9.58)
Related Questions in VISUAL-STUDIO-EXTENSIONS
- Is it possible to refresh filters instead of reloading project
- New Extensibility Model for VS. How to add config page for extesion?
- How to add menu item to the debug pop-up context menu of Visual Studio? Visual Studio Extension
- HTML for JavaScript Visual Studio Extension fails to install in Visual Studio 2022
- Visual Studio debugger extension - resolve switched stack
- In VSIX, reading Configuration Properties of CSPROJ throws COMException (method or operation not implemented)
- Reclassify text in span as different IClassifierProvider
- Installing Extensions via VSCode CLI while VS Code is running
- How to perform a caret change in a VisualStudio.Extensibility Extension project?
- How to safely modify the active Document from a ITextViewChangedListener.TextViewChangedAsync event
- How to get the top/bottom line numbers of MSVC pane
- Static code analysis in custom Visual Studio CodeLens Extension
- How to add file type validation , when trying to add existing item in solution explorer of visual studio experimental instance?
- Change the Visual Studio taskbar icon from extension
- How to display two custom tool windows in a same place as tabbed format
Related Questions in LINE-NUMBERS
- Is it possible to make Test::more report the line of an indirect caller (level-n caller)?
- In Emacs, how to add line number for src block by CSS?
- Need to get Line number of Select-String mactch
- python print current line number of running python file
- R XML package - getLineNumber - line number above 65535 - limit inherited from libxml2
- Fetch uncommented line number from monaco editor
- I am using a newer mac, and in bash trying to write things using nano. I can not get it to display line numbers by using -c, -l,, etc?
- Align Line number to Code snippet Vite React js
- How to find the item in a TSQL Select list that throws an exception?
- Is there a way to get a line number of a node in typescript file using typescript compiler API?
- Need to change the colour of line numbers in neovim
- Getting vim to show the lines relative to other screen in splitscreen?
- How can output the pointer (line number) from running powershell script?
- Why is line number wrong in error stack trace in sveltekit app?
- How to offset the line numbering from within `less` (i.e., specify starting number)?
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?
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)
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.