public CodeFunction FindCodeFunction(VsProjectScope projectScope, IBindingMethod bindingMethod) { var project = projectScope.Project; var function = FindCodeFunction(project, bindingMethod); if (function != null) { return(function); } var specFlowProject = projectScope.SpecFlowProjectConfiguration; if (specFlowProject != null) { foreach (var assemblyName in specFlowProject.RuntimeConfiguration.AdditionalStepAssemblies) { string simpleName = assemblyName.Split(new[] { ',' }, 2)[0]; var stepProject = VsxHelper.FindProjectByAssemblyName(project.DTE, simpleName); if (stepProject != null) { function = FindCodeFunction(stepProject, bindingMethod); if (function != null) { return(function); } } } } return(null); }
private IEnumerable <Completion> GetCompletionsForBlock(ScenarioBlock scenarioBlock) { var project = specFlowServices.GetProject(textBuffer); List <Completion> result = new List <Completion>(); GetCompletionsFromProject(project, scenarioBlock, result); var specFlowProject = languageService.ProjectScope.SpecFlowProjectConfiguration; if (specFlowProject != null) { foreach (var assemblyName in specFlowProject.RuntimeConfiguration.AdditionalStepAssemblies) { string simpleName = assemblyName.Split(new[] { ',' }, 2)[0]; var stepProject = VsxHelper.FindProjectByAssemblyName(project.DTE, simpleName); if (stepProject != null) { GetCompletionsFromProject(stepProject, scenarioBlock, result); } } } result.Sort((c1, c2) => string.Compare(c1.DisplayText, c2.DisplayText)); return(result); }
public BindingAssemblyInfo(string assemblyName, Project mainProject) { AssemblyName = assemblyName; Project = VsxHelper.FindProjectByAssemblyName(mainProject.DTE, AssemblyShortName); if (Project != null && VsProjectScope.GetTargetLanguage(Project) == ProgrammingLanguage.FSharp) //HACK: we force the f# libs to be used as assembly reference { Project = null; } if (Project == null) { Reference = VsxHelper.GetReference(mainProject, assemblyName); } }
public BindingAssemblyInfo(string assemblyName, DTE dte) { AssemblyName = assemblyName; Project = VsxHelper.FindProjectByAssemblyName(dte, AssemblyShortName); }