I'm trying to create a new language for Resharper using SDK. My language is based on XmlLanguage and services you already have in the SDK. For the reference I'm using dotPeek and looking into JetBrains.ReSharper.Psi.WebConfig.dll and the web.config language you've implemented there.
I've created basic classes following the http://confluence.jetbrains.net/display/ReSharper/New+Language+Support tutorial. However I inherited from XmlLanguage classes just like WebConfig language classes do.
When testing my plugin I've got the following exception. It's actually several exceptions that endup in the PsiProjectFileTypeCoordinator unable to get the IProjectFileLanguageService
--- EXCEPTION #2/2 [LoggerException]
Message = “Sequence contains more than one element”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.Application.Components.ComponentContainer.LogException(Exception e, Type type, IEnumerable`1 descriptors)
at JetBrains.Application.Components.ComponentContainer.TryGetComponentDescriptor(Type type, IComponentDescriptor dependee)
at JetBrains.Application.Components.ComponentContainer.ResolveDynamicImpl(Type type, IComponentDescriptor dependee)
at JetBrains.Application.Components.ComponentContainer.ResolveDynamic(Type type)
at JetBrains.Application.Components.ComponentContainerEx.TryGetComponent[TInterface](IComponentContainer container)
at JetBrains.Application.Extensibility.SplittedComponentContainer`2.TryGetService[T](TDefinition definition)
at JetBrains.ProjectModel.ProjectFileTypeServices.JetBrains.ProjectModel.IProjectFileTypeServices.TryGetService[T](ProjectFileType )
at JetBrains.ReSharper.Psi.PsiProjectFileTypeCoordinator.TryGetService[T](ProjectFileType projectFileType)
at JetBrains.ReSharper.Psi.PsiProjectFileTypeCoordinator.TryGetService(ProjectFileType projectFileType)
I've tried to debug the pluging with Reflector with decompiled sources and have found out that when ComponentContainer resolves the IProjectFileLanguageService for my language project file type it has both XmlProjectFileLanguageService and MyProjectFileLanguageService mapped to it and it fails, logs exception and uses XmlProjectFileLanguageService afterwards. But for some reason for WebConfig language it doesn't happed and there is only WebConfigProjectFileLanguageSevice in the interfaceMap there.
Do you have an idea what I'm doing wrong? I believe the same exception occurs for ILanguageService as well.