tunnelvisionlabs / inheritancemargin Goto Github PK
View Code? Open in Web Editor NEWShow inheritance information in the glyph margin
Home Page: https://marketplace.visualstudio.com/items?itemName=SamHarwell.InheritanceMargin
License: MIT License
Show inheritance information in the glyph margin
Home Page: https://marketplace.visualstudio.com/items?itemName=SamHarwell.InheritanceMargin
License: MIT License
I installed VS2015 Update 2 and before I installed, this extension was working, now it is not.
Suddenly Inheritance Margin is not longer present with VS 2017.
When I downloaded and executed the vsix it tells me that it is already installed.
What can I do?
Forget it, it came back after a while
You never know how helpful a tool is until it does not work anymore... Unfortunately the extension is broken in VS2015 Update 3, this is the exception:
DbContextBase.cs: Background parse (C# Inheritance Analyzer) failed in 0ms. Cannot bind to the target method because its signature or security transparency is not compatible with that of the delegate type. at System.Delegate.CreateDelegate(Type type, MethodInfo method, Boolean throwOnBindFailure)
at System.Delegate.CreateDelegate(Type type, MethodInfo method)
at Tvl.VisualStudio.InheritanceMargin.CSharp.CSharpInheritanceAnalyzer.<>c.<.cctor>b__15_1()
at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Lazy`1.get_Value()
at Tvl.VisualStudio.InheritanceMargin.CSharp.CSharpInheritanceAnalyzer.ReParseImpl()
at Tvl.VisualStudio.InheritanceMargin.CSharp.BackgroundParser.ReParse()
Seems like MS has changed the API again
If I close and re-open a VS 2015 solution roughly every second time I'm unable to open .cs files in Visual Studio. I'm left with a blank screen that never goes away.
Uninstalling this extension fixes the problem. Re-installing it brings it back. I love this extension so I'd hate to have to leave it uninstalled!
To reproduce:
IProjectDependenciesSubTreeProvider.cs
IProjectDependenciesSubTreeProvider.cs: Background parse (C# Inheritance Analyzer) succeeded in 4ms.
No icons are displayed in the gutter, although they should be present as this interface has implementation in the project.
This doesn't happen on all files.
If I define an interface for example ICar. I'm unable to see implemented types or interfaces.
Currently, refreshing the Inheritance Margin glyphs is only triggered by two things:
Notably missing from this list is the case where another document is updated which affects the current document. For example:
Open IMyType.cs containing the following interface:
public interface IMyType
{
void Method(int argument);
}
Open MyType.cs containing the following class:
public class MyType
{
public void Method(int argument) { }
}
Observe: In MyType.cs, the Method
method has an inheritance glyph next to it.
In IMyType.cs, change the signature of Method
to the following:
void Method(short argument);
Observe: In IMyType.cs, the Method
method no longer has an inheritance glyph next to it.
Observe: In MyType.cs, the Method
method does have an inheritance glyph next to it, even though the method no longer implements any interface method.
For some reason, when working with Visual Studio 2017 version 15.5 Preview 2 and dotnet/roslyn@05ef4df2, the Inheritance Margin fails to reveal all implementations of this method:
For example, the following method should appear in the list of implementations, but does not:
https://github.com/dotnet/roslyn/blob/cc1c7110e960d083cd9c2674a579c25ac7c89efa/src/Workspaces/Core/Desktop/Workspace/Storage/PersistentStorageService.cs#L63
When trying to navigate to a location that is not in source text a NRE is being thrown in
> Microsoft.VisualStudio.LanguageServices.Implementation.dll!Microsoft.VisualStudio.LanguageServices.RoslynVisualStudioWorkspace.TryResolveSymbol(Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Project project, System.Threading.CancellationToken cancellationToken, out Microsoft.CodeAnalysis.ISymbol resolvedSymbol, out Microsoft.CodeAnalysis.Project resolvedProject).
I looked into the source of that and the only thing I could find that could potentially be null is the project parameter. The project comes from here. Because the location is not in source it is not part of a project and _solution.GetProject is probably returning null.
Please make the tooltip clickable. Add hyperlinks to all targets, let me click to go there.
I usually know all about my code base, but when using other packages from NuGet it is sometimes useful to know which built-in implementations of a certain interface or a base class there are. Is there a way to do this using InheritanceMargin
in VS2019?
After installing the extension, I started seeing bubbles next to methods and class definitions (took some time to figure out this is what this extension does). But this happens only for "my code". When I need to return an IActionResult
in ASP.NET Core
I'm still completely lost about the existing implementations like FileResult
, etc. ASP.NET core is open source, has great docs and is structured pretty intuitively, but not all packages are like this and there should be an easy way to search for a class that implements a certain interface or inherits a class.
Or maybe InheritanceMargin
supports this and I'm using it wrong, or it's broken for VS2019?
For some files, but always for those ones, Visual Studio throws an error:
An exception has been encountered. This may be caused by an extension.
You can get more information by examining the file
'C:\Users<USERNAME>\AppData\Roaming\Microsoft\VisualStudio\15.0_221550df\ActivityLog.xml'
This happens only when I double-click on a file under Changes in the TeamExplorer - Changes window. It is a git repository on which I want to show the Diff - window for that specific file.
If I disable your extension there is no error thrown. After re-enabling it, the error re-appears when I double click, but only on specific files.
Maybe for this kind of windows your extension should not do anything, just skip them.
I am using Visual Studio Professional 2017 15.9.5
If I can help you with more details just let me know; uploading the original file(s) may be problematic - but I am willing to do locally all kind of tests :)
Thanks,
radusun
Hello,
I'm happy to use InheritanceMargin with VS2017.
Now I would like to use InheritanceMargin (3.6.1) also with VS2019 but I don't see the icon on the margin.
The installation went fine and I don't see any error but nothing happens.
Can you help me?
Thanks
Fabio
While editing a csx file lots of errors like the following were printed to the output window under TVL Diagnostics
.
CSharpTyping2.csx: Background parse (C# Inheritance Analyzer) failed in 9ms. Object reference not set to an instance of an object. at Tvl.VisualStudio.InheritanceMargin.CSharp.CSharpInheritanceAnalyzer.ReParseImpl()
at Tvl.VisualStudio.InheritanceMargin.CSharp.BackgroundParser.ReParse()
I'm currently seeing occasional failures in Visual Studio 2015 when jumping to interface member implementations via the menu. When this occurs, I find it is not a problem to jump instead to a type which implements the same interface. I haven't yet tracked down the particular conditions in which this situation arises.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.