Author Topic: Activate Preprocessor directives for languages other than C/C++  (Read 7020 times)

terryarno

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
We use in-house languages here at work and we have those set up and running fine with SE Core. The languages use the standard C preprocessor directives so we would like to have the "Preprocessor directives" activated in Display/Selective Display... for our languages.

Is there a way to do that?

Thanks,
Terry

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: Activate Preprocessor directives for languages other than C/C++
« Reply #1 on: July 30, 2010, 02:37:39 PM »
I think so.  Try this...

Open up ECLIPSEDIR/plugins/com.slickedit.windows.libs_3.5.1/slickedit/macros/seldisp.e in Eclipse with the SlickEdit editor.  The path might be slightly different based on what platform you are on, and what version of Core you are running.  Find the function _preprocessing_supported...it should be about on line 357.  Change the return statement in that function from what it is:

Code: [Select]
return(lang=='c' || lang=='cs' || lang=='pas' || ('.'lang==_macro_ext));

to something like this:

Code: [Select]
return(lang=='c' || lang=='cs' || lang=='pas' || ('.'lang==_macro_ext) || lang=='mylang');

where 'mylang' is the p_LangId value for your in house language.  Now load the macro with F12.  Now if you open one of your in-house language files and go to Display > Selective Display, is the "Preprocessor directives" option enabled?

- Ryan
« Last Edit: July 31, 2010, 03:34:58 AM by Ryan »

terryarno

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: Activate Preprocessor directives for languages other than C/C++
« Reply #2 on: July 30, 2010, 06:17:38 PM »
Hey, that works great!

Thanks, Ryan

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: Activate Preprocessor directives for languages other than C/C++
« Reply #3 on: July 31, 2010, 03:38:22 AM »
Awesome!  Glad to hear it.

- Ryan