Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » How to support Oracle Pro C/C++ syntax within CDT
How to support Oracle Pro C/C++ syntax within CDT [message #1747510] Tue, 15 November 2016 15:07 Go to next message
Guillaume Ame is currently offline Guillaume AmeFriend
Messages: 2
Registered: November 2016
Junior Member
I'm trying to setup a project that uses Pro C/C++ extensively.

That means that nearly all methods are stuffed with lines like these:
EXEC SQL BEGIN DECLARE SECTION ;

or
EXEC SQL
					 SELECT count(*)
					   INTO :nbProgramme
					   FROM GAdefProg
					  WHERE UPPER(cdProgramme) = UPPER(:ctxVarWeb.ctx_paramC3); 


I can add a #ifdef #endif around each of these lines, but my conservative co-workers would like to keep their decades long habits.

Is their any way to tell CDT to ignore some pattern in the sources ?

If there's no way to perform this action, how hard would it be to add the feature in CDT code base for someone that never wrote any plugin for eclipse ?

[Updated on: Wed, 16 November 2016 11:19]

Report message to a moderator

Re: How to support Oracle Pro C/C++ syntax within CDT [message #1747566 is a reply to message #1747510] Wed, 16 November 2016 01:26 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
You could try adding Indexer preprocessor macros (mostly defined as having no value or maybe just ';')
Could be tedious if there are a lot of them
If you're lucky there may be only one or two that need be defined which would effectively surround the rest with #if ... #endif

Three are two ways to enter an Indexer macro:
Project --> Properties --> C/C++ General --> Preprocessor Includes, Macro, etc. as a User Entry
Project --> Properties --> C/C++ General --> Paths and Symbols under the Symbols tab.

The first way provides for using a preprocessor macros file. Never tried it though.
You would also have to do this for each project.

[Updated on: Wed, 16 November 2016 01:52]

Report message to a moderator

Re: How to support Oracle Pro C/C++ syntax within CDT [message #1747593 is a reply to message #1747566] Wed, 16 November 2016 11:22 Go to previous messageGo to next message
Guillaume Ame is currently offline Guillaume AmeFriend
Messages: 2
Registered: November 2016
Junior Member
Is it possible to define a macro with a variable part, something like
 EXEC SQL * ; 


because there are thousands of call like this to manage, but they are all following this exact same pattern.

Otherwise, is it possible to extend the code analyser to dismiss this kind of statement ?
Re: How to support Oracle Pro C/C++ syntax within CDT [message #1747915 is a reply to message #1747593] Wed, 16 November 2016 18:01 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
The macro has to follow the preprocessor syntax.
As for changing codan you could submit a change request.
But it may never happen.
If you really want it done you'll probably have to do it yourself.
Re: How to support Oracle Pro C/C++ syntax within CDT [message #1747916 is a reply to message #1747593] Wed, 16 November 2016 18:01 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
The macro has to follow the preprocessor syntax.
As for changing codan you could submit a change request.
But it may never happen.
If you really want it done you'll probably have to do it yourself.
Previous Topic:Eclipse installer questions
Next Topic:Installing GDB Hardware Debugging
Goto Forum:
  


Current Time: Sat Apr 20 00:45:33 GMT 2024

Powered by FUDForum. Page generated in 0.03079 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top