Ejemplo n.º 1
0
        public static void Initialize()
        {
            if (initialized)
            {
                return;
            }

            initialized    = true;
            projectOptions = new Dictionary <string, CSharpFormattingOptionsPersistence>();

            // Load global settings
            GlobalOptions = new CSharpFormattingOptionsPersistence(
                SD.PropertyService.MainPropertiesContainer, new CSharpFormattingOptionsContainer()
            {
                DefaultText = StringParser.Parse("${res:CSharpBinding.Formatting.GlobalOptionReference}")
            });
            GlobalOptions.Load();

            // Handlers for solution loading/unloading
            var projectService = SD.GetService <IProjectService>();

            if (projectService != null)
            {
                SD.ProjectService.SolutionOpened += SolutionOpened;
                SD.ProjectService.SolutionClosed += SolutionClosed;
            }
        }
        void FetchGacContents()
        {
            IGlobalAssemblyCacheService gacService = SD.GetService <IGlobalAssemblyCacheService>();
            HashSet <string>            fullNames  = new HashSet <string>();

            UpdateProgressBar(pg => { pg.Visibility = System.Windows.Visibility.Visible; pg.IsIndeterminate = true; });
            var list = gacService.Assemblies.TakeWhile(_ => !cancelFetchThread).ToList();

            UpdateProgressBar(pg => { pg.IsIndeterminate = false; pg.Maximum = list.Count; });
            foreach (var r in list)
            {
                if (cancelFetchThread)
                {
                    break;
                }
                if (fullNames.Add(r.FullName))                   // filter duplicates
                {
                    var file = gacService.FindAssemblyInNetGac(r);
                    if (file != null)
                    {
                        var entry = new GacEntry(r, file);
                        UpdateProgressBar(pg => { pg.Value = pg.Value + 1; AddNewEntry(entry); });
                    }
                }
            }
            UpdateProgressBar(pg => { pg.Visibility = System.Windows.Visibility.Hidden; });
        }
        public IAssemblyModel GetAssemblyModel(FileName fileName, bool includeInternalMembers = false)
        {
            LoadedAssembly assembly = GetLoadedAssembly(fileName, includeInternalMembers);

            if (assembly.Model == null)
            {
                // Get references
                DefaultAssemblySearcher assemblySearcher = new DefaultAssemblySearcher(fileName);
                var referencedAssemblies = new List <IUnresolvedAssembly>();
                foreach (var referencedAssemblyName in assembly.References)
                {
                    var assemblyFileName = assemblySearcher.FindAssembly(referencedAssemblyName);
                    if (assemblyFileName != null)
                    {
                        var loadedRefAssembly = GetLoadedAssembly(assemblyFileName, includeInternalMembers);
                        if (loadedRefAssembly != null)
                        {
                            referencedAssemblies.Add(loadedRefAssembly.ProjectContent);
                        }
                    }
                }

                IEntityModelContext      context = new AssemblyEntityModelContext(assembly.ProjectContent, referencedAssemblies.ToArray());
                IUpdateableAssemblyModel model   = SD.GetService <IModelFactory>().CreateAssemblyModel(context);

                model.Update(EmptyList <IUnresolvedTypeDefinition> .Instance, assembly.ProjectContent.TopLevelTypeDefinitions.ToList());
                model.AssemblyName     = assembly.ProjectContent.AssemblyName;
                model.FullAssemblyName = assembly.ProjectContent.FullAssemblyName;
                model.UpdateReferences(assembly.References);
                assembly.Model = model;
            }

            return(assembly.Model);
        }
Ejemplo n.º 4
0
        public override void Execute(object parameter)
        {
            var classBrowser = SD.GetService <IClassBrowser>();

            if (classBrowser != null)
            {
                IAssemblyModel assemblyModel = parameter as IAssemblyModel;
                if (assemblyModel == null)
                {
                    // Node is a project?
                    IProject project = parameter as IProject;
                    if (project != null)
                    {
                        assemblyModel = project.AssemblyModel;
                    }
                }

                if (assemblyModel == null)
                {
                    // Node is an assembly reference?
                    IAssemblyReferenceModel assemblyReference = parameter as IAssemblyReferenceModel;
                    if (assemblyReference != null)
                    {
                        // Model is an assembly reference
                        IAssemblyParserService   assemblyParserService = SD.GetRequiredService <IAssemblyParserService>();
                        IEntityModelContext      entityModelContext    = assemblyReference.ParentAssemblyModel.Context;
                        CombinedAssemblySearcher searcher = new CombinedAssemblySearcher();
                        if ((entityModelContext != null) && (entityModelContext.Project != null))
                        {
                            searcher.AddSearcher(new ProjectAssemblyReferenceSearcher(entityModelContext.Project));
                        }
                        searcher.AddSearcher(new DefaultAssemblySearcher(assemblyReference.ParentAssemblyModel.Location));
                        var resolvedFile = searcher.FindAssembly(assemblyReference.AssemblyName);
                        if (resolvedFile != null)
                        {
                            assemblyModel = assemblyParserService.GetAssemblyModelSafe(resolvedFile);
                        }
                        else
                        {
                            // Assembly file not resolvable
                            SD.MessageService.ShowWarningFormatted("Could not resolve reference '{0}'.", assemblyReference.AssemblyName.ShortName);
                        }
                    }
                }

                if (assemblyModel != null)
                {
                    // Try to remove AssemblyModel from list of UnpinnedAssemblies
                    classBrowser.UnpinnedAssemblies.Assemblies.RemoveAll(a => a.FullAssemblyName == assemblyModel.FullAssemblyName);

                    if (!classBrowser.MainAssemblyList.Assemblies.Contains(assemblyModel))
                    {
                        classBrowser.MainAssemblyList.Assemblies.Add(assemblyModel);
                    }

                    // Bring the node into view
                    classBrowser.GotoAssemblyModel(assemblyModel);
                }
            }
        }
Ejemplo n.º 5
0
        public override void Run(ResolveResult symbol)
        {
            var classBrowser = SD.GetService <IClassBrowser>();
            var entity       = GetSymbol(symbol) as IEntity;

            if ((classBrowser != null) && (entity != null))
            {
                classBrowser.GoToEntity(entity);
            }
        }
        static void InitializeWorkbench(Workbench workbench, IWorkbenchLayout layout)
        {
            SD.Services.AddService(typeof(IWorkbench), workbench);

            SD.Services.AddService(typeof(IWinFormsService), new WinFormsService());
            SD.Services.AddService(typeof(IWinFormsToolbarService), new WinFormsToolbarService());
            SD.Services.AddService(typeof(IWinFormsMenuService), new WinFormsMenuService());
            SD.Services.AddService(typeof(IProjectService), new SDProjectService());
            SD.Services.AddService(typeof(IBuildService), new BuildService());
            SD.Services.AddService(typeof(IParserService), new ParserService());
            SD.Services.AddService(typeof(IFileService), new FileService());
            SD.Services.AddService(typeof(IStatusBarService), new StatusBarService());
            SD.Services.AddService(typeof(IMSBuildEngine), new MSBuildEngine());
            SD.Services.AddService(typeof(IDisplayBindingService), new DisplayBindingService());
            SD.Services.AddService(typeof(IBookmarkManager), new BookmarkManager());

            LanguageService.ValidateLanguage();

            TaskService.Initialize();
            CustomToolsService.Initialize();

            workbench.Initialize();
            workbench.SetMemento(PropertyService.NestedProperties(workbenchMemento));
            workbench.WorkbenchLayout = layout;

            var applicationStateInfoService = SD.GetService <ApplicationStateInfoService>();

            if (applicationStateInfoService != null)
            {
                applicationStateInfoService.RegisterStateGetter(activeContentState, delegate { return(SD.Workbench.ActiveContent); });
            }

            WorkbenchSingleton.OnWorkbenchCreated();

            // initialize workbench-dependent services:
            NavigationService.InitializeService();

            workbench.ActiveContentChanged += delegate
            {
                //Debug.WriteLine("ActiveContentChanged to " + workbench.ActiveContent);
                LoggingService.Debug("ActiveContentChanged to " + workbench.ActiveContent);
            };
            workbench.ActiveViewContentChanged += delegate
            {
                //Debug.WriteLine("ActiveViewContentChanged to " + workbench.ActiveViewContent);
                LoggingService.Debug("ActiveViewContentChanged to " + workbench.ActiveViewContent);
            };
            workbench.ActiveWorkbenchWindowChanged += delegate
            {
                //Debug.WriteLine("ActiveWorkbenchWindowChanged to " + workbench.ActiveWorkbenchWindow);
                LoggingService.Debug("ActiveWorkbenchWindowChanged to " + workbench.ActiveWorkbenchWindow);
            };
        }
        public static void Detach(Debugger.Process process)
        {
            var classBrowser = SD.GetService <IClassBrowser>();
            var nodes        = classBrowser.AssemblyLists
                               .OfType <DebuggerProcessAssemblyList>()
                               .Where(n => n.Process == process)
                               .ToArray();

            foreach (var node in nodes)
            {
                classBrowser.AssemblyLists.Remove(node);
            }
        }
Ejemplo n.º 8
0
        static void InitializeWorkbench(WpfWorkbench workbench, IWorkbenchLayout layout)
        {
            SD.Services.AddService(typeof(IWorkbench), workbench);

            UILanguageService.ValidateLanguage();

            TaskService.Initialize();
            Project.CustomToolsService.Initialize();

            workbench.Initialize();
            workbench.SetMemento(SD.PropertyService.NestedProperties(workbenchMemento));
            workbench.WorkbenchLayout = layout;

            // HACK: eagerly load output pad because pad services cannnot be instanciated from background threads
            SD.Services.AddService(typeof(IOutputPad), CompilerMessageView.Instance);

            var dlgMsgService = SD.MessageService as IDialogMessageService;

            if (dlgMsgService != null)
            {
                dlgMsgService.DialogSynchronizeInvoke = SD.MainThread.SynchronizingObject;
                dlgMsgService.DialogOwner             = workbench.MainWin32Window;
            }

            var applicationStateInfoService = SD.GetService <ApplicationStateInfoService>();

            if (applicationStateInfoService != null)
            {
                applicationStateInfoService.RegisterStateGetter(activeContentState, delegate {
                    return(SD.Workbench.ActiveContent);
                });
            }

            WorkbenchSingleton.OnWorkbenchCreated();

            // initialize workbench-dependent services:
            NavigationService.InitializeService();

            workbench.ActiveContentChanged += delegate {
                Debug.WriteLine("ActiveContentChanged to " + workbench.ActiveContent);
                LoggingService.Debug("ActiveContentChanged to " + workbench.ActiveContent);
            };
            workbench.ActiveViewContentChanged += delegate {
                Debug.WriteLine("ActiveViewContentChanged to " + workbench.ActiveViewContent);
                LoggingService.Debug("ActiveViewContentChanged to " + workbench.ActiveViewContent);
            };
            workbench.ActiveWorkbenchWindowChanged += delegate {
                Debug.WriteLine("ActiveWorkbenchWindowChanged to " + workbench.ActiveWorkbenchWindow);
                LoggingService.Debug("ActiveWorkbenchWindowChanged to " + workbench.ActiveWorkbenchWindow);
            };
        }
        public override void Execute(object parameter)
        {
            var classBrowser = SD.GetService <IClassBrowser>();

            if (classBrowser != null)
            {
                IAssemblyModel assemblyModel = (IAssemblyModel)parameter;

                // Create a new copy of this assembly model
                IAssemblyModel newAssemblyModel = SD.AssemblyParserService.GetAssemblyModelSafe(new ICSharpCode.Core.FileName(assemblyModel.Context.Location), true);
                if (newAssemblyModel != null)
                {
                    classBrowser.MainAssemblyList.Assemblies.Add(newAssemblyModel);
                }
            }
        }
Ejemplo n.º 10
0
        ITypeDefinitionModel GetTypeDefinitionModel(ITypeDefinition mainTypeDefinition, ITypeDefinition derivedTypeDefinition)
        {
            ITypeDefinitionModel resolveTypeDefModel = null;
            var            assemblyFileName          = mainTypeDefinition.ParentAssembly.GetRuntimeAssemblyLocation();
            IAssemblyModel assemblyModel             = null;

            try {
                // Try to get AssemblyModel from project list
                IProjectService projectService = SD.GetRequiredService <IProjectService>();
                if (projectService.CurrentSolution != null)
                {
                    var projectOfAssembly = projectService.CurrentSolution.Projects.FirstOrDefault(p => p.AssemblyModel.Location == assemblyFileName);
                    if (projectOfAssembly != null)
                    {
                        // We automatically have an AssemblyModel from project
                        assemblyModel = projectOfAssembly.AssemblyModel;
                    }
                }

                if (assemblyModel == null)
                {
                    // Nothing in projects, load from assembly file
                    var assemblyParserService = SD.GetService <IAssemblyParserService>();
                    if (assemblyParserService != null)
                    {
                        if (assemblyFileName != null)
                        {
                            assemblyModel = assemblyParserService.GetAssemblyModel(assemblyFileName);
                        }
                    }
                }

                if (assemblyModel != null)
                {
                    // Look in found AssemblyModel
                    resolveTypeDefModel = assemblyModel.TopLevelTypeDefinitions[derivedTypeDefinition.FullTypeName];
                    if (resolveTypeDefModel != null)
                    {
                        return(resolveTypeDefModel);
                    }
                }
            } catch (Exception) {
                // TODO Can't load the type, what to do?
            }

            return(resolveTypeDefModel);
        }
Ejemplo n.º 11
0
        public override void Execute(object parameter)
        {
            var classBrowser = SD.GetService <IClassBrowser>();

            if (classBrowser != null)
            {
                IAssemblyModel assemblyModel = (IAssemblyModel)parameter;
                if (assemblyModel.IsUnpinned())
                {
                    classBrowser.UnpinnedAssemblies.Assemblies.Remove(assemblyModel);
                }
                else
                {
                    classBrowser.MainAssemblyList.Assemblies.Remove(assemblyModel);
                }
            }
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Checks if an assembly model is added to the unpinned (temporary) list of ClassBrowser service.
        /// </summary>
        /// <param name="model">Assembly model to check.</param>
        /// <returns>True if in unpinned list, false otherwise.</returns>
        public static bool IsUnpinned(this IAssemblyModel model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }

            var classBrowser = SD.GetService <IClassBrowser>();

            if (classBrowser != null)
            {
                // Look in unpinned list
                return(classBrowser.UnpinnedAssemblies.Assemblies.Any(m => m.Location == model.Location));
            }

            return(false);
        }
Ejemplo n.º 13
0
        public SDProjectService()
        {
            allSolutions     = new NullSafeSimpleModelCollection <ISolution>();
            allProjects      = allSolutions.SelectMany(s => s.Projects);
            projectBindings  = SD.AddInTree.BuildItems <ProjectBindingDescriptor>("/SharpDevelop/Workbench/ProjectBindings", null);
            targetFrameworks = SD.AddInTree.BuildItems <TargetFramework>("/SharpDevelop/TargetFrameworks", null);

            SD.GetFutureService <IWorkbench>().ContinueWith(t => t.Result.ActiveViewContentChanged += ActiveViewContentChanged).FireAndForget();

            var applicationStateInfoService = SD.GetService <ApplicationStateInfoService>();

            if (applicationStateInfoService != null)
            {
                applicationStateInfoService.RegisterStateGetter("ProjectService.CurrentSolution", delegate { return(CurrentSolution); });
                applicationStateInfoService.RegisterStateGetter("ProjectService.CurrentProject", delegate { return(CurrentProject); });
            }

            SD.Services.AddService(typeof(IProjectServiceRaiseEvents), this);
        }
Ejemplo n.º 14
0
        public void Initialize()
        {
            if (initialized)
            {
                return;
            }

            initialized    = true;
            projectOptions = new Dictionary <string, AlFormattingPolicy>();

            // Handlers for solution loading/unloading
            var projectService = SD.GetService <IProjectService>();

            if (projectService != null)
            {
                SD.ProjectService.SolutionOpened += SolutionOpened;
                SD.ProjectService.SolutionClosed += SolutionClosed;
            }
        }
Ejemplo n.º 15
0
        public ICompilation CreateCompilationForSingleFile(FileName fileName, IUnresolvedFile unresolvedFile)
        {
            DecompiledTypeReference reference = DecompiledTypeReference.FromFileName(fileName);

            if (reference != null)
            {
                var model = SD.GetService <IClassBrowser>().FindAssemblyModel(reference.AssemblyFile);
                if (model == null)
                {
                    model = SD.AssemblyParserService.GetAssemblyModelSafe(reference.AssemblyFile, true);
                }
                if (model != null)
                {
                    return(model.Context.GetCompilation());
                }
            }
            return(new CSharpProjectContent()
                   .AddOrUpdateFiles(unresolvedFile)
                   .CreateCompilation());
        }
Ejemplo n.º 16
0
        public override void Execute(object parameter)
        {
            var classBrowser = SD.GetService <IClassBrowser>();
            var modelFactory = SD.GetService <IModelFactory>();

            if ((classBrowser != null) && (modelFactory != null))
            {
                OpenFileDialog openFileDialog = new OpenFileDialog();
                openFileDialog.Filter          = "Assembly files (*.exe, *.dll)|*.exe;*.dll";
                openFileDialog.CheckFileExists = true;
                openFileDialog.CheckPathExists = true;
                if (openFileDialog.ShowDialog() ?? false)
                {
                    IAssemblyModel assemblyModel = SD.AssemblyParserService.GetAssemblyModelSafe(new ICSharpCode.Core.FileName(openFileDialog.FileName), true);
                    if (assemblyModel != null)
                    {
                        classBrowser.MainAssemblyList.Assemblies.Add(assemblyModel);
                    }
                }
            }
        }
Ejemplo n.º 17
0
        public override void Execute(object parameter)
        {
            var classBrowser = SD.GetService <IClassBrowser>();
            var modelFactory = SD.GetService <IModelFactory>();

            if ((classBrowser != null) && (modelFactory != null))
            {
                OpenFromGacDialog gacDialog = new OpenFromGacDialog();
                if (gacDialog.ShowDialog() ?? false)
                {
                    foreach (string assemblyFile in gacDialog.SelectedFileNames)
                    {
                        IAssemblyModel assemblyModel = SD.AssemblyParserService.GetAssemblyModelSafe(new ICSharpCode.Core.FileName(assemblyFile), true);
                        if (assemblyModel != null)
                        {
                            classBrowser.MainAssemblyList.Assemblies.Add(assemblyModel);
                        }
                    }
                }
            }
        }
        public bool GoToEntity(IEntity entity)
        {
            // Try to find assembly in workspace
            var entityAssembly = entity.ParentAssembly;

            if (entityAssembly != null)
            {
                ITypeDefinition entityType = null;
                if (entity is ITypeDefinition)
                {
                    entityType = (ITypeDefinition)entity;
                }
                else
                {
                    entityType = entity.DeclaringTypeDefinition;
                }

                SharpTreeNodeCollection namespaceChildren = null;
                var root = this.Root as WorkspaceTreeNode;

                // Try to find assembly of passed entity among open projects in solution
                var solutionTreeNode = this.Root.Children.OfType <SolutionTreeNode>().FirstOrDefault();
                if (solutionTreeNode != null)
                {
                    // Ensure that we have children
                    solutionTreeNode.EnsureLazyChildren();

                    var projectTreeNode = solutionTreeNode.Children.FirstOrDefault(
                        node => {
                        if (node is ProjectTreeNode)
                        {
                            var treeNode = (ProjectTreeNode)node;
                            if (node.Model is IProject)
                            {
                                var projectModel = (IProject)node.Model;
                                return(projectModel.AssemblyModel.FullAssemblyName == entityAssembly.FullAssemblyName);
                            }
                        }

                        return(false);
                    });
                    if (projectTreeNode != null)
                    {
                        projectTreeNode.EnsureLazyChildren();
                        namespaceChildren = projectTreeNode.Children;
                    }
                }

                if (namespaceChildren == null)
                {
                    // Try to find assembly of passed entity among additional assemblies
                    var assemblyTreeNode = FindAssemblyTreeNode(entityAssembly.FullAssemblyName);
                    if (assemblyTreeNode != null)
                    {
                        assemblyTreeNode.EnsureLazyChildren();
                        namespaceChildren = assemblyTreeNode.Children;
                    }
                }

                if (namespaceChildren == null)
                {
                    // Add assembly to workspace (unpinned), if not available in ClassBrowser
                    IAssemblyParserService assemblyParser = SD.GetService <IAssemblyParserService>();
                    IClassBrowser          classBrowser   = SD.GetService <IClassBrowser>();
                    if (assemblyParser != null && classBrowser != null)
                    {
                        IAssemblyModel unpinnedAssemblyModel = assemblyParser.GetAssemblyModel(new FileName(entityAssembly.UnresolvedAssembly.Location));
                        if (unpinnedAssemblyModel != null)
                        {
                            classBrowser.UnpinnedAssemblies.Assemblies.Add(unpinnedAssemblyModel);
                            var assemblyTreeNode = FindAssemblyTreeNode(entityAssembly.FullAssemblyName);
                            if (assemblyTreeNode != null)
                            {
                                assemblyTreeNode.EnsureLazyChildren();
                                namespaceChildren = assemblyTreeNode.Children;
                            }
                        }
                    }
                }

                if (namespaceChildren != null)
                {
                    var nsTreeNode = namespaceChildren.FirstOrDefault(
                        node =>
                        (node is NamespaceTreeNode) &&
                        (((NamespaceTreeNode)node).Model is INamespaceModel) &&
                        (((INamespaceModel)((NamespaceTreeNode)node).Model).FullName == entityType.Namespace)
                        ) as ModelCollectionTreeNode;

                    if (nsTreeNode != null)
                    {
                        // Ensure that we have children
                        nsTreeNode.EnsureLazyChildren();

                        SharpTreeNode entityTypeNode = null;

                        // Search in namespace node recursively
                        var foundEntityNode = nsTreeNode.FindChildNodeRecursively(
                            node => {
                            var treeNode = node as SharpTreeNode;
                            if (treeNode != null)
                            {
                                var treeNodeTypeModel = treeNode.Model as ITypeDefinitionModel;
                                if (treeNodeTypeModel != null)
                                {
                                    var modelFullTypeName = treeNodeTypeModel.FullTypeName;
                                    if (modelFullTypeName == entityType.FullTypeName)
                                    {
                                        // This is the TypeDefinitionModel of searched entity (the type itself or its member)
                                        entityTypeNode = treeNode;
                                        if (entity is ITypeDefinition)
                                        {
                                            // We are looking for the type itself
                                            return(true);
                                        }
                                    }
                                }

                                if ((entity is IMember) && (treeNode.Model is IMemberModel))
                                {
                                    // Compare parent types and member names
                                    IMemberModel memberModel   = (IMemberModel)treeNode.Model;
                                    IMember member             = (IMember)entity;
                                    bool isSymbolOfTypeAndName =
                                        (member.DeclaringType.FullName == memberModel.UnresolvedMember.DeclaringTypeDefinition.FullName) &&
                                        (member.Name == memberModel.Name) &&
                                        (member.SymbolKind == memberModel.SymbolKind);

                                    if (isSymbolOfTypeAndName)
                                    {
                                        var parametrizedEntityMember   = member as IParameterizedMember;
                                        var parametrizedTreeNodeMember = memberModel.UnresolvedMember as IUnresolvedParameterizedMember;
                                        if ((parametrizedEntityMember != null) && (parametrizedTreeNodeMember != null))
                                        {
                                            // For methods and constructors additionally check the parameters and their types to handle overloading properly
                                            int treeNodeParamsCount = parametrizedTreeNodeMember.Parameters != null ? parametrizedTreeNodeMember.Parameters.Count : 0;
                                            int entityParamsCount   = parametrizedEntityMember.Parameters != null ? parametrizedEntityMember.Parameters.Count : 0;
                                            if (treeNodeParamsCount == entityParamsCount)
                                            {
                                                for (int i = 0; i < entityParamsCount; i++)
                                                {
                                                    // Compare full type names or at least only type names without namespace
                                                    // This is not precise, but sufficient in most cases.
                                                    var entityParamType   = parametrizedEntityMember.Parameters[i].Type;
                                                    var treeNodeParamType = parametrizedTreeNodeMember.Parameters[i].Type.Resolve(
                                                        new SimpleTypeResolveContext(entityAssembly));
                                                    if ((entityParamType.FullName != treeNodeParamType.FullName) &&
                                                        (entityParamType.Name != treeNodeParamType.Name))
                                                    {
                                                        return(false);
                                                    }
                                                }

                                                // All parameters were equal
                                                return(true);
                                            }
                                        }
                                        else
                                        {
                                            return(true);
                                        }
                                    }
                                }
                            }

                            return(false);
                        });

                        // Special handling for default constructors: If not found, jump to type declaration instead
                        if ((foundEntityNode == null) && (entity.SymbolKind == SymbolKind.Constructor))
                        {
                            foundEntityNode = entityTypeNode;
                        }

                        if (foundEntityNode != null)
                        {
                            this.FocusNode(foundEntityNode);
                            this.SelectedItem = foundEntityNode;
                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
Ejemplo n.º 19
0
        public static void Attach(Debugger.Process process)
        {
            var classBrowser = SD.GetService <IClassBrowser>();

            classBrowser.AssemblyLists.Add(new DebuggerProcessAssemblyList(process));
        }