Author Topic: Navigation Bar shows incorrect class name in C Based Languages  (Read 2787 times)

Offline Anonymous

  • Anonymous
  • Jr. Member
  • **
  • Posts: 77
  • Karma: +0/-0
    • View Profile
Navigation Bar shows incorrect class name in C Based Languages
« on: October 07, 2011, 10:18:49 am »
Hi, all

While I was evaluating hippoedit with some simple C++ classes.
I noticed the class name would display incorrectly in the Navigation Bar when some macros are placed after the class keyword.

For Example:
Code: [Select]
class API ClassOne {}

The Navigation Bar would display "API" instead of "ClassOne"

After some digging around, I think the problem is in the cbase_spec.xml .

The regular expression would find a match on the first word.

So I changed the REGEX
from:
Code: XML
  1. <Label group="Class" match="class\s+(\w+)[^\;{]*\{" name="\1" descr="class \1" scope="1" image="5" style="data_types"/>
to
Code: XML
  1. <Label group="Class" match="class(\s+(\w+))*[^\;{]*\{" name="\1" descr="class \1" scope="1" image="5" style="data_types"/>

Now the Navigation Bar displays the class name "ClassOne".

I know nothing about regular expressions, I just searched on the net. So I don't know if this is correct, but it seems to work.
« Last Edit: October 07, 2011, 07:51:32 pm by alex »

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2171
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Navigation Bar shows incorrect class name in C Based Languages
« Reply #1 on: October 07, 2011, 07:53:43 pm »
Thanks for checking this an help with a schema.
I think more correct will be:
Code: XML
  1. <Label group="Class" match="class(\s+(\w+))+[^\;{]*\{" name="\1" descr="class \1" scope="1" image="5" style="data_types"/>
because at least class name should be presented. But I will check and will update schema in installation and on site (done).
« Last Edit: October 07, 2011, 10:00:52 pm by alex »

 

Related Topics

  Subject / Started by Replies Last post
6 Replies
2249 Views
Last post April 11, 2009, 05:54:41 pm
by Stefan
1 Replies
2131 Views
Last post June 18, 2009, 04:35:57 pm
by alex
2 Replies
3072 Views
Last post April 20, 2010, 09:28:57 pm
by Theno
5 Replies
3291 Views
Last post November 22, 2010, 05:22:10 am
by false007
6 Replies
1650 Views
Last post June 17, 2015, 11:17:54 pm
by paw