static void PresentItem(IPresentableItem item, Element element, PresentationState state, UnitTestElementImage type)
		{
			item.RichText = element.GetTitle();

			SetTextColor(item, element);
			SetImage(item, state, type);
		}
    static void SetTextColor(IPresentableItem item, Element element)
    {
      if (element.Explicit)
      {
        item.RichText.SetForeColor(SystemColors.GrayText);
      }

      item.RichText.SetForeColor(SystemColors.GrayText, 0, element.GetTitlePrefix().Length);
    }
		static void SetTextColor(resharper::JetBrains.CommonControls.IPresentableItem item, Element element)
		{
			if (element.IsExplicit)
			{
				item.RichText.SetForeColor(SystemColors.GrayText);
			}

			item.RichText.SetForeColor(SystemColors.GrayText, 0, element.GetTitlePrefix().Length);
		}
 protected FieldElement(TestProvider provider,
                        PsiModuleManager psiModuleManager,
                        CacheManager cacheManager, 
                        Element parent,
                        ProjectModelElementEnvoy projectEnvoy,
                        string declaringTypeName,
                        string fieldName,
                        bool isIgnored)
   : base(provider, psiModuleManager, cacheManager, parent, projectEnvoy, declaringTypeName, isIgnored || parent.Explicit)
 {
   _fieldName = fieldName;
   State = UnitTestElementState.Valid;
 }
    protected Element(TestProvider provider,
                      PsiModuleManager psiModuleManager,
                      CacheManager cacheManager,
                      Element parent,
                      ProjectModelElementEnvoy projectEnvoy, string declaringTypeName, bool isIgnored)
    {
      if (projectEnvoy == null && !Shell.Instance.IsTestShell)
      {
        throw new ArgumentNullException("project");
      }

      if (declaringTypeName == null)
      {
        throw new ArgumentNullException("declaringTypeName");
      }

      if (projectEnvoy != null)
      {
        _projectEnvoy = projectEnvoy;
      }

      _provider = provider;
      _declaringTypeName = declaringTypeName;
      _psiModuleManager = psiModuleManager;
      _cacheManager = cacheManager;

      if (isIgnored)
      {
        ExplicitReason = "Ignored";
      }

      TypeName = declaringTypeName;
      Parent = parent;

      Children = new List<IUnitTestElement>();
      State = UnitTestElementState.Valid;
      _taskFactory = new UnitTestTaskFactory(_provider.ID);
    }
 void RemoveChild(Element behaviorElement)
 {
   Children.Remove(behaviorElement);
 }
 void AddChild(Element behaviorElement)
 {
   Children.Add(behaviorElement);
 }