private void HighlightIfNotEmbedded(ITreeNode hibernateMappingTag) { var projectFile = hibernateMappingTag.GetProjectFile(); if (projectFile != null) { var buildAction = projectFile.GetBuildActionProperty(); Logger.LogMessage("File {0}, Build action {1}", projectFile.Name, buildAction); if (!buildAction.Equals(BuildAction.EMBEDDED_RESOURCE)) { var firstChild = hibernateMappingTag.FirstChild; AddHighlighting(firstChild, new EmbeddedResourceHighlighting(string.Format("Build action of file '{0}' is not set to 'Embedded Resource'", projectFile.Name))); } } }