Esempio n. 1
0
            public int OnSelectionChanged(IVsHierarchy pHierOld, uint itemidOld, IVsMultiItemSelect pMISOld,
                                          ISelectionContainer pSCOld, IVsHierarchy pHierNew, uint itemidNew,
                                          IVsMultiItemSelect pMISNew, ISelectionContainer pSCNew)
            {
                if (pSCNew == _cloneIntersectionsControl.SelectionContainer)
                {
                    return(VSConstants.S_OK);
                }

                CloneFileSummary cloneFileSummary = GetCloneDetectiveSummary(pSCNew);

                if (cloneFileSummary != null)
                {
                    _cloneIntersectionsControl.UpdateSelection(cloneFileSummary.FullPath);
                    return(VSConstants.S_OK);
                }

                string filePath = GetFilePath(pHierNew, itemidNew);

                if (filePath != null)
                {
                    _cloneIntersectionsControl.UpdateSelection(filePath);
                    return(VSConstants.S_OK);
                }


                return(VSConstants.S_OK);
            }
        private void UpdatePropertyGrid()
        {
            object selectedObject;

            if (SelectedSourceNode == null)
            {
                selectedObject = null;
            }
            else
            {
                selectedObject = new CloneFileSummary(SelectedSourceNode);
            }

            UpdatePropertyGrid(selectedObject);
        }