Author Topic: color coding wrong for private member function  (Read 3670 times)

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
color coding wrong for private member function
« on: December 22, 2016, 10:13:27 pm »
I have set up my color coding so that private member functions are shown in dark red, and public are shown in green. The declaration of the function in the .h file is displayed by SE in red, as is the invocation of the function in the .cpp file. However, the definition of the function in the .cpp is displayed in green. Hovering over the function shows the correct info for the declaration and invocation, but not the definition. It does this for multiple classes in multiple files. Any idea why SE would get confused?

See attached screen shots for examples.

SlickEdit Pro 2016 (v21.0.1.0 64-bit)

Serial number: XXXXX
Licensed number of users: Single user
License file: C:\ProgramData\slickedit\21\slickedit.lic

Build Date: November 18, 2016
Emulation: CUA

OS: Windows 10 x64
OS Version: 10.00.0 
Memory: 42% Load, 10376MB/24454MB Physical, 12675MB/28038MB Page File, 658MB/134217727MB Virtual
Shell Information: C:\WINDOWS\system32\cmd.exe /q
Screen Size: 1920 x 1080, 1536 x 960, 1920 x 1200

Project Type: Cpp
Language: .cpp (C/C++)
Encoding: Automatic

Installation Directory: C:\Program Files\SlickEdit Pro 21.0.1\ (non-removable drive,NTFS,261163MB free)
Configuration Directory: C:\Users\David\OneDrive - physiowave.com\Documents\My SlickEdit Config\21.0.1\ (non-removable drive,NTFS,261163MB free)
Migrated from: C:\Users\David\OneDrive - physiowave.com\Documents\My SlickEdit Config\20.0.3\
Spill File: C:\Users\David\AppData\Local\Temp\$slk.4132 (non-removable drive,NTFS,261163MB free)

« Last Edit: December 22, 2016, 10:15:36 pm by davehohl »

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Re: color coding wrong for private member function
« Reply #1 on: December 29, 2016, 05:52:55 pm »
No one has any ideas on this?

Graeme

  • Senior Community Member
  • Posts: 2745
  • Hero Points: 340
Re: color coding wrong for private member function
« Reply #2 on: December 30, 2016, 01:17:44 am »
If possible can you export your entire config and post it here along with a complete example that demonstrates the problem?

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Re: color coding wrong for private member function
« Reply #3 on: December 30, 2016, 09:42:26 pm »
I have attached a zip file containing a simple test workspace and project, a zip file containing my exported option settings, and a screenshot illustrating the issue.

As you can see in the screenshot, the declaration of the fPrivate() function is properly shown in dark red in the .h file, and when invoked from within fPublic() in the .cpp file. But the definition of the fPrivate() function in the .cpp file is incorrectly shown in green.

Thanks for any help you can supply.

Graeme

  • Senior Community Member
  • Posts: 2745
  • Hero Points: 340
Re: color coding wrong for private member function
« Reply #4 on: December 31, 2016, 03:59:56 am »
Don't have a solution sorry.  Slick is also not applying the italic font to the private member function.  I also found that with a friend function, the call to the private member function was green when the class definition was in the header file and red when the class definition is in the cpp file.

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Re: color coding wrong for private member function
« Reply #5 on: January 01, 2017, 01:13:31 am »
Thanks for checking this out Graeme. At least I know now that it is not just something with my particular system.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3725
  • Hero Points: 490
Re: color coding wrong for private member function
« Reply #6 on: January 03, 2017, 06:41:24 pm »
Symbol coloring takes some shortcuts when it can for performance.  In this case, it just grabs the information about the current function from the symbols in the current file (the .cpp file).  This has the effect of missing out on determining that the function definition is associated with a declaration that is private.  I could add the code to do the extra work, though in the most common cases, it would come up dry (public, non-static).

I'll file a bug report and add this to my to-do list for a future release.

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Re: color coding wrong for private member function
« Reply #7 on: January 03, 2017, 08:14:57 pm »
Thanks, Dennis!