[gnome-builder] clang: highlight enumeration values



commit 4bcd17a9aa34e9f229eccd9a56d407c6f1840202
Author: Christian Hergert <christian hergert me>
Date:   Sat Mar 28 00:25:32 2015 -0700

    clang: highlight enumeration values

 data/style-schemes/builder-dark.xml |    2 +-
 data/style-schemes/builder.xml      |    2 +-
 libide/clang/ide-clang-service.c    |    6 ++++++
 3 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/data/style-schemes/builder-dark.xml b/data/style-schemes/builder-dark.xml
index 93556ee..d3156f1 100644
--- a/data/style-schemes/builder-dark.xml
+++ b/data/style-schemes/builder-dark.xml
@@ -126,7 +126,7 @@
   <style name="c:storage-class"             foreground="orange3" bold="true"/>
   <style name="c:type"                      foreground="#669900" bold="true"/>
   <style name="c:macro-name"                foreground="#677685" bold="false"/>
-  <style name="c:enum-name"                 foreground="#677685" bold="false"/>
+  <style name="c:enum-name"                 foreground="#dd4a68" bold="false"/>
   <style name="c:function-name"             foreground="#4186A8" bold="false"/>
 
   <style name="diff:added-line"             foreground="chameleon2"/>
diff --git a/data/style-schemes/builder.xml b/data/style-schemes/builder.xml
index 1fa4b6a..f999948 100644
--- a/data/style-schemes/builder.xml
+++ b/data/style-schemes/builder.xml
@@ -98,7 +98,7 @@
   <style name="c:storage-class"             foreground="orange3" bold="true"/>
   <style name="c:type"                      foreground="#669900" bold="true"/>
   <style name="c:macro-name"                foreground="#677685" bold="false"/>
-  <style name="c:enum-name"                 foreground="#677685" bold="false"/>
+  <style name="c:enum-name"                 foreground="pink1" bold="false"/>
   <style name="c:function-name"             foreground="#4186A8" bold="false"/>
 
   <style name="def:comment"                 foreground="blue1"/>
diff --git a/libide/clang/ide-clang-service.c b/libide/clang/ide-clang-service.c
index 0b143c4..39e6215 100644
--- a/libide/clang/ide-clang-service.c
+++ b/libide/clang/ide-clang-service.c
@@ -105,6 +105,12 @@ ide_clang_service_build_index_visitor (CXCursor     cursor,
       break;
 
     case CXCursor_EnumDecl:
+      style_name = "c:enum-name";
+      clang_visitChildren (cursor,
+                           ide_clang_service_build_index_visitor,
+                           user_data);
+      break;
+
     case CXCursor_EnumConstantDecl:
       style_name = "c:enum-name";
       break;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]