.net - Get BaseName Of Element DTE _applicationObject Visual Studio Add-In -



.net - Get BaseName Of Element DTE _applicationObject Visual Studio Add-In -

i'm trying definition of element visual studio add-in can't reach signature of element on selected line.

i have code blocks like:

sub test(){ dim testvariable new testclass testvariable.execute() }

i select line is

testvariable.execute()

but operation, in add-in:

_applicationobject.activedocument.projectitem.filecodemodel. _ codeelementfrompoint(sel.anchorpoint, vscmelement.vscmelementfunction)

returns me test(), topmost element, need innermost.

i tried alter 'vscmelementfunction' property attribute etc. returned nothing.

does know way this?

i found solution problem, , wanted share it.

'when cursor on element, phone call add-in 'in exec() function can follow these steps: 'open object browser , re-create signature _applicationobject.executecommand("edit.gotodefinition") _applicationobject.executecommand("edit.copy") 'to close object browser dim win envdte.window win = directcast(_applicationobject.activewindow, envdte.window) 'and ta ta, total signature of element basename = my.computer.clipboard.gettext() 'and here base of operations name dim tobjbasearr string() = basename.split(cchar(".")) dim tobjbase string = tobjbasearr(0)

.net visual-studio add-in

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -