Пример #1
0
        private void FillListBox()
        {
            bool wholeWord = settings.TypeFormWholeWord;
            bool matchCase = settings.TypeFormMatchCase;

            List <string> matchedItems;

            if (textBox.Text.Length > 0)
            {
                matchedItems = SearchUtil.GetMatchedItems(openedTypes, textBox.Text, ".", 0, wholeWord, matchCase);
                if (matchedItems.Capacity > 0)
                {
                    matchedItems.Add(ITEM_SPACER);
                }

                matchedItems.AddRange(SearchUtil.GetMatchedItems(projectTypes, textBox.Text, ".", MAX_ITEMS, wholeWord, matchCase));
            }
            else
            {
                matchedItems = openedTypes;
            }

            foreach (string item in matchedItems)
            {
                listBox.Items.Add(item);
            }
        }
        private void RebuildJob()
        {
            IProject project = PluginBase.CurrentProject;

            foreach (string file in GetProjectFiles())
            {
                if (IsFileHidden(file))
                {
                    continue;
                }
                if (SearchUtil.IsFileOpened(file))
                {
                    openedFiles.Add(project.GetRelativePath(file));
                }
                else
                {
                    projectFiles.Add(project.GetRelativePath(file));
                }
            }
        }
Пример #3
0
        private bool FileModelDelegate(FileModel model)
        {
            foreach (ClassModel classModel in model.Classes)
            {
                if (dictionary.ContainsKey(classModel.QualifiedName))
                {
                    continue;
                }
                if (SearchUtil.IsFileOpened(classModel.InFile.FileName))
                {
                    openedTypes.Add(classModel.QualifiedName);
                }
                else
                {
                    projectTypes.Add(classModel.QualifiedName);
                }

                dictionary.Add(classModel.QualifiedName, classModel);
            }

            return(true);
        }