Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Customizing eclipse CDT c++ new class template(Customizing eclipse CDT c++ new class template)
Customizing eclipse CDT c++ new class template [message #986583] Tue, 20 November 2012 23:23 Go to next message
Eclipse UserFriend
I am using eclipse CDT Juno. Is it possible to customize C++ header and source files just after standard "New Class" dialog?

I want to change generated code a bit to include the copy constructor and assignment operator.

For example I want to add the following members to every generated class, so resulting class will looks like:

class ClassName
{
public:
ClassName();
virtual ~ClassName();

private:
// ---------- What I want to add: begin ---------
ClassName(const ClassName&);
ClassName& operator=(const ClassName&);
// ---------- What I want to add: end ---------
};
Re: Customizing eclipse CDT c++ new class template [message #987065 is a reply to message #986583] Fri, 23 November 2012 04:28 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

you could edit the existing template or add new templates:

http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Freference%2Fcdt_u_code_temp.htm&resultof=%22cdt%22%20%22templates%22%20%22templat%22

Hope this helps.

regards,
Klaus
Re: Customizing eclipse CDT c++ new class template [message #1071357 is a reply to message #987065] Fri, 19 July 2013 19:13 Go to previous message
Eclipse UserFriend
I was struggling with how to do this as well and found your question. I finally figured out a workaround and posted it here. Hope you find it helpful! (I realize it's an old post.)

http:// stackoverflow.com / questions / 3285359 / eclipse-cdt-new-class-template / 17756834#17756834

(Sorry, this is my first post, so I can't post the URL directly.)

Mr Klaus was right -- but that's not the place to do it if you're trying to use the New Class Wizard.

Good luck!
Previous Topic:What setting is wrong here?
Next Topic:File Header Template
Goto Forum:
  


Current Time: Wed May 21 21:24:59 EDT 2025

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

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

Back to the top