From 2eeb58101dcdc5c13e85bae56f688c1e8a164406 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Mon, 18 Mar 2013 17:50:50 +0100 Subject: [PATCH] Initialize all the colors for semantic highlighting. --- .../Project/Resources/CSharp-Semantic.xshd | 1 + .../Project/Src/CSharpSemanticHighlighter.cs | 16 ++++++++++++++-- .../Base/Project/Src/Project/AbstractProject.cs | 1 - 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Resources/CSharp-Semantic.xshd b/src/AddIns/BackendBindings/CSharpBinding/Project/Resources/CSharp-Semantic.xshd index a7d20f6cdd..53b7453e1b 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/Resources/CSharp-Semantic.xshd +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Resources/CSharp-Semantic.xshd @@ -36,6 +36,7 @@ + diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/CSharpSemanticHighlighter.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/CSharpSemanticHighlighter.cs index 1dc17f8100..3124cd8801 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/CSharpSemanticHighlighter.cs +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/CSharpSemanticHighlighter.cs @@ -47,11 +47,23 @@ namespace CSharpBinding //this.defaultTextColor = ???; this.referenceTypeColor = highlighting.GetNamedColor("ReferenceTypes"); this.valueTypeColor = highlighting.GetNamedColor("ValueTypes"); - this.methodCallColor = highlighting.GetNamedColor("MethodCall"); - this.fieldAccessColor = highlighting.GetNamedColor("FieldAccess"); + this.interfaceTypeColor = this.referenceTypeColor; + this.enumerationTypeColor = this.valueKeywordColor; + this.typeParameterTypeColor = this.referenceTypeColor; + this.delegateTypeColor = this.referenceTypeColor; + + this.methodDeclarationColor = this.methodCallColor = highlighting.GetNamedColor("MethodCall"); + //this.eventDeclarationColor = this.eventAccessColor = defaultTextColor; + //this.propertyDeclarationColor = this.propertyAccessColor = defaultTextColor; + this.fieldDeclarationColor = this.fieldAccessColor = highlighting.GetNamedColor("FieldAccess"); + //this.variableDeclarationColor = this.variableAccessColor = defaultTextColor; + //this.parameterDeclarationColor = this.parameterAccessColor = defaultTextColor; this.valueKeywordColor = highlighting.GetNamedColor("NullOrValueKeywords"); + //this.externAliasKeywordColor = ...; + this.parameterModifierColor = highlighting.GetNamedColor("ParameterModifiers"); this.inactiveCodeColor = highlighting.GetNamedColor("InactiveCode"); + this.syntaxErrorColor = highlighting.GetNamedColor("SemanticError"); if (document is TextDocument && SD.MainThread.CheckAccess()) { // Use the cache only for the live AvalonEdit document diff --git a/src/Main/Base/Project/Src/Project/AbstractProject.cs b/src/Main/Base/Project/Src/Project/AbstractProject.cs index e6465d00a5..72a1d4e9b3 100644 --- a/src/Main/Base/Project/Src/Project/AbstractProject.cs +++ b/src/Main/Base/Project/Src/Project/AbstractProject.cs @@ -46,7 +46,6 @@ namespace ICSharpCode.SharpDevelop.Project this.Name = information.ProjectName; this.FileName = information.FileName; this.idGuid = (information.IdGuid != Guid.Empty ? information.IdGuid : Guid.NewGuid()); - Debug.Assert(information.TypeGuid != Guid.Empty); this.TypeGuid = information.TypeGuid; if (information.ProjectSections != null) this.projectSections.AddRange(information.ProjectSections);