Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-core-dev] RE: cdt-core-dev Digest, Vol 11, Issue 2

For example, we use headers including them before each function and each
variable/constants block in order to setup where these all should be placed
into RAM/ROM. The headers include some config in the deep, where macros are
used to set different kind of pragmas etc. to rename sections, setting up
far/near jumps etc. pp.


> --- Ursprüngliche Nachricht ---
> Von: "Veenu Verma (AS/EAB)" <veenu.verma@xxxxxxxxxxxx>
> An: <cdt-core-dev@xxxxxxxxxxx>
> Betreff: [cdt-core-dev] RE: cdt-core-dev Digest, Vol 11, Issue 2
> Datum: Mon, 8 May 2006 11:02:41 +0200
> 
> Hello,
> It may not be wrong to the compiler but it doesn't look good 
> To have duplicate or triplicated include statements. 
> I can put the logic in my code but i think the right way is for 
> CDT to perform  a check before it adds an include statement. 
> It may not be a bug but Can it be a future improvement ? 
> 
> I'm sorry I didn't understand the Example that's mentioned. 
> Can you explain it a bit more about how can it be done or if you can
> direct me to the resources documenting that.
> (I am not a C++ person. :()
> 
> 
> -----Original Message-----
> From: cdt-core-dev-bounces@xxxxxxxxxxx
> [mailto:cdt-core-dev-bounces@xxxxxxxxxxx] On Behalf Of
cdt-core-dev-request@xxxxxxxxxxx
> Sent: Saturday, May 06, 2006 6:00 PM
> To: cdt-core-dev@xxxxxxxxxxx
> Subject: cdt-core-dev Digest, Vol 11, Issue 2
> 
> Send cdt-core-dev mailing list submissions to
> 	cdt-core-dev@xxxxxxxxxxx
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://dev.eclipse.org/mailman/listinfo/cdt-core-dev
> or, via email, send a message with subject or body 'help' to
> 	cdt-core-dev-request@xxxxxxxxxxx
> 
> You can reach the person managing the list at
> 	cdt-core-dev-owner@xxxxxxxxxxx
> 
> When replying, please edit your Subject line so it is more specific than
> "Re: Contents of cdt-core-dev digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: Manipulate Include statements in C++ source file
>       (kesselhaus@xxxxxxx)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Fri, 5 May 2006 22:31:01 +0200 (MEST)
> From: kesselhaus@xxxxxxx
> Subject: Re: [cdt-core-dev] Manipulate Include statements in C++
> 	source file
> To: "CDT Core developers list." <cdt-core-dev@xxxxxxxxxxx>
> Message-ID: <4742.1146861061@xxxxxxxxxxxxxx>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hmm, for me it sounds not to be wrong including a file more than once in
> C/C++! Java might be unhappy about this, but in C/C++ there is nothing
wrong
> about this. I'd say, for this case you should check yourself if the
> include is already there and put it again into the file or not.
> 
> e.g. some settings for locator pragma options could be configured in
> separate header files, using some special defines for each
function/variable to
> set up the code area, near/far jumps, near/far data, section renaming etc.
> 
> 
> 
> > --- Ursprüngliche Nachricht ---
> > Von: "Veenu Verma (AS/EAB)" <veenu.verma@xxxxxxxxxxxx>
> > An: <cdt-core-dev@xxxxxxxxxxx>
> > Betreff: [cdt-core-dev] Manipulate Include statements in C++ source 
> > file
> > Datum: Fri, 5 May 2006 10:16:37 +0200
> > 
> > 
> > Hello
> > I am manipulating include statements in a C++ source file using CDT 
> > API's and am facing some problems
> > 
> > I am doing something like this....
> > 
> > ICElement cFile = CoreModel.getDefault().create(currentFile);  // 
> > Where currentFile is c++ source file ITranslationUnit trUnit = 
> > (ITranslationUnit) cFile; trUnit.createInclude(includeSt, true, null, 
> > new NullProgressMonitor());
> > 
> > But I have noticed 3 problems...
> > 1. CDT doesn't check for duplication and add the include even if it 
> > already exists.
> > 
> > 2 .Also, I see that it doesn't add new line character before the 
> > include statement.
> > Include statement is added next to an existing include statement Like 
> > #include <abc.hh>#include <abc.hh>
> > 
> > 3. Currently, CDT adds the first include statement at the end of the 
> > source File, if sibling argument is null in createInclude(....) I want 
> > CDT to add the statement at the beginning of the file. How can i 
> > achieve that ?
> > 
> > I have done the same thing in JDT and it behaves in a normal way 1. It 
> > checks for duplication.
> > 2. Add imports in a new line.
> > 3. Add import as a first statement even if import statement or package 
> > statements are not there
> > 
> > The difference is that JDT uses ASTRewrite. 
> > 
> > I am using Eclipse 3.1.2 and CDT 3.0.0
> > 
> > Can someone help me and confirm if there is a bug or all the points 
> > are solvable by some means ?
> > 
> > Regards
> > Veenu
> > 
> > 
> > 
> 
> --
> Echte DSL-Flatrate dauerhaft für 0,- Euro*!
> "Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl
> 
> 
> ------------------------------
> 
> _______________________________________________
> cdt-core-dev mailing list
> cdt-core-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-core-dev
> 
> 
> End of cdt-core-dev Digest, Vol 11, Issue 2
> *******************************************
> _______________________________________________
> cdt-core-dev mailing list
> cdt-core-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-core-dev
> 

-- 
GMX Produkte empfehlen und ganz einfach Geld verdienen!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner


Back to the top