public CodeCompletionListItemProvider(string autoCompleteWord)
        {
            _textFormatter = new CodeCompletionTextFormatter(autoCompleteWord);

            _icons = UnityEditorCompositionContainer.GetExportedValue<IIcons>();

            // Todo: Transfer session data to CodeCompletionListItem items

            if (_debug)
            {
                // For test input we use icon names:
                Icons icons = _icons as Icons;
                string[] iconFilePaths = icons.GetIconFilePaths();

                _items = new List<IListItem>();
                for (int i = 0; i < iconFilePaths.Length; i++)
                {
                    string iconFilename = Path.GetFileNameWithoutExtension(iconFilePaths[i % iconFilePaths.Length]);
                    string iconType = iconFilename.Substring(12, iconFilename.Length - 12); // remove 'Icons.16x16.'
                    string itemText = string.Format("{0}", iconType);
                    if (_textFormatter.CanBeAutoCompleted(itemText))
                    {
                        _items.Add(new CodeCompletionListItem(itemText, iconFilename, null));
                    }
                }
            }
        }
        public CodeCompletionListItemProvider(string autoCompleteWord)
        {
            _textFormatter = new CodeCompletionTextFormatter(autoCompleteWord);

            _icons = UnityEditorCompositionContainer.GetExportedValue <IIcons>();

            // Todo: Transfer session data to CodeCompletionListItem items

            if (_debug)
            {
                // For test input we use icon names:
                Icons    icons         = _icons as Icons;
                string[] iconFilePaths = icons.GetIconFilePaths();

                _items = new List <IListItem>();
                for (int i = 0; i < iconFilePaths.Length; i++)
                {
                    string iconFilename = Path.GetFileNameWithoutExtension(iconFilePaths[i % iconFilePaths.Length]);
                    string iconType     = iconFilename.Substring(12, iconFilename.Length - 12);                 // remove 'Icons.16x16.'
                    string itemText     = string.Format("{0}", iconType);
                    if (_textFormatter.CanBeAutoCompleted(itemText))
                    {
                        _items.Add(new CodeCompletionListItem(itemText, iconFilename, null));
                    }
                }
            }
        }
        public CodeCompletionListItemGUI(int itemHeight, CodeCompletionListItemProvider owner)
        {
            ItemHeight = itemHeight;
            _owner     = owner;
            _icons     = UnityEditorCompositionContainer.GetExportedValue <IIcons>();

            GUISkin skin = UnityEditorCompositionContainer.GetExportedValue <IGUISkinProvider>().GetGUISkin();

            _text                  = skin.GetStyle("ListText");
            _textSelected          = skin.GetStyle("ListTextSelected");
            _text.richText         = true;
            _textSelected.richText = true;
        }
		public CodeCompletionListItemGUI(int itemHeight, CodeCompletionListItemProvider owner)
		{
			ItemHeight = itemHeight;
			_owner = owner;
			_icons = UnityEditorCompositionContainer.GetExportedValue<IIcons>();

			GUISkin skin = UnityEditorCompositionContainer.GetExportedValue<IGUISkinProvider>().GetGUISkin();
			_text = skin.GetStyle("ListText");
			_textSelected = skin.GetStyle("ListTextSelected");
			_text.richText = true;
			_textSelected.richText = true;
			
		}