SF.net SVN: geany:[3706] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Thu Apr 9 12:41:30 UTC 2009
Revision: 3706
http://geany.svn.sourceforge.net/geany/?rev=3706&view=rev
Author: eht16
Date: 2009-04-09 12:41:29 +0000 (Thu, 09 Apr 2009)
Log Message:
-----------
When updating global type definitions for opened documents, take also C++ namespace symbols into account and don't ignore symbols which are defined inside a scope.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/symbols.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-04-09 12:12:58 UTC (rev 3705)
+++ trunk/ChangeLog 2009-04-09 12:41:29 UTC (rev 3706)
@@ -1,3 +1,11 @@
+2009-04-09 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/symbols.c:
+ When updating global type definitions for opened documents, take
+ also C++ namespace symbols into account and don't ignore symbols
+ which are defined inside a scope.
+
+
2009-04-09 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/plugins.c:
Modified: trunk/src/symbols.c
===================================================================
--- trunk/src/symbols.c 2009-04-09 12:12:58 UTC (rev 3705)
+++ trunk/src/symbols.c 2009-04-09 12:41:29 UTC (rev 3706)
@@ -54,7 +54,7 @@
const guint TM_GLOBAL_TYPE_MASK =
tm_tag_class_t | tm_tag_enum_t | tm_tag_interface_t |
- tm_tag_struct_t | tm_tag_typedef_t | tm_tag_union_t;
+ tm_tag_struct_t | tm_tag_typedef_t | tm_tag_union_t | tm_tag_namespace_t;
static gchar **html_entities = NULL;
@@ -210,6 +210,7 @@
TMTag *tag;
GString *s = NULL;
GPtrArray *typedefs;
+ gint tag_lang;
g_return_val_if_fail(G_LIKELY(tags_array != NULL), NULL);
@@ -221,22 +222,18 @@
for (j = 0; j < typedefs->len; ++j)
{
tag = TM_TAG(typedefs->pdata[j]);
- if (!(tag->atts.entry.scope))
- {
- /* tag->atts.file.lang contains (for some reason) the line of the tag if
- * tag->atts.entry.file is not NULL */
- gint tag_lang =
- (tag->atts.entry.file) ? tag->atts.entry.file->lang : tag->atts.file.lang;
+ /* tag->atts.file.lang contains (for some reason) the line of the tag if
+ * tag->atts.entry.file is not NULL */
+ tag_lang = (tag->atts.entry.file) ? tag->atts.entry.file->lang : tag->atts.file.lang;
- /* the check for tag_lang == lang is necessary to avoid wrong type colouring of
- * e.g. PHP classes in C++ files
- * lang = -2 disables the check */
- if (tag->name && (tag_lang == lang || lang == -2))
- {
- if (j != 0)
- g_string_append_c(s, ' ');
- g_string_append(s, tag->name);
- }
+ /* the check for tag_lang == lang is necessary to avoid wrong type colouring of
+ * e.g. PHP classes in C++ files
+ * lang = -2 disables the check */
+ if (tag->name && (tag_lang == lang || lang == -2))
+ {
+ if (j != 0)
+ g_string_append_c(s, ' ');
+ g_string_append(s, tag->name);
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list